Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
Hello UTS
提交
d7c46cfc
H
Hello UTS
项目概览
DCloud
/
Hello UTS
通知
1780
Star
33
Fork
10
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
5
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
Hello UTS
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
5
Issue
5
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
d7c46cfc
编写于
5月 21, 2025
作者:
lizhongyi_
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
调整部分测试例
上级
a50b562d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
15 addition
and
6 deletion
+15
-6
uni_modules/uts-tests/utssdk/Class.uts
uni_modules/uts-tests/utssdk/Class.uts
+7
-4
uni_modules/uts-tests/utssdk/Date.uts
uni_modules/uts-tests/utssdk/Date.uts
+7
-1
uni_modules/uts-tests/utssdk/JSON.uts
uni_modules/uts-tests/utssdk/JSON.uts
+1
-1
未找到文件。
uni_modules/uts-tests/utssdk/Class.uts
浏览文件 @
d7c46cfc
...
...
@@ -5,10 +5,13 @@ class TestStaticMethodClass {
// 测试静态方法内的class继承
class A { }
class B extends A {
bool : boolean = true
constructor() {
super()
}
bool : boolean = true
// #ifdef APP-ANDROID
constructor() {
super()
}
// #endif
}
return new B().bool
}
...
...
uni_modules/uts-tests/utssdk/Date.uts
浏览文件 @
d7c46cfc
...
...
@@ -135,9 +135,11 @@ export function testDate(): Result {
}
let startMill2 = Date.now()
// 使用示例
// #ifdef APP-ANDROID
for(let perDateObj of nextDateList){
perDateObj.setHours(startMill2 % 12)
}
// #endif
let diffMill2 = Date.now() - startMill2
expect(diffMill2 < 200).toEqual(true)
...
...
@@ -156,18 +158,22 @@ export function testDate(): Result {
let startMill4 = Date.now()
// 使用示例
// #ifdef APP-ANDROID
for(let perDateObj of nextDateList){
perDateObj.setMilliseconds(startMill4 % 300)
}
// #endif
let diffMill4 = Date.now() - startMill2
expect(diffMill4 < 500).toEqual(true)
let startMill5 = Date.now()
let millList5:Array<string> = []
// 使用示例
for(let perDateObj of nextDateList){
// #ifdef APP-ANDROID
for(let perDateObj of nextDateList){
millList5.push(perDateObj.toISOString())
}
// #endif
console.log(millList.length)
let diffMill5 = Date.now() - startMill5
expect(diffMill5 < 200).toEqual(true)
...
...
uni_modules/uts-tests/utssdk/JSON.uts
浏览文件 @
d7c46cfc
...
...
@@ -90,7 +90,7 @@ export function testJSON(): Result {
expect(JSON.stringify(new A3())).toEqual('"json"')
expect(JSON.stringify(new A4())).toEqual('null')
// #endif
// #ifdef APP-ANDROID
|| APP-IOS
// #ifdef APP-ANDROID
// js引擎toJSON不会归调用
expect(JSON.stringify(new A5())!.length).toEqual(28)
expect(JSON.stringify(new A6())!.length).toEqual(28)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录