提交 d7c46cfc 编写于 作者: lizhongyi_'s avatar lizhongyi_

调整部分测试例

上级 a50b562d
......@@ -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
}
......
......@@ -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)
......
......@@ -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.
先完成此消息的编辑!
想要评论请 注册