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

调整测试例

上级 222e2162
...@@ -602,16 +602,32 @@ export function testString() : Result { ...@@ -602,16 +602,32 @@ export function testString() : Result {
c: 'collapse' c: 'collapse'
} }
let b:string = `fdsfa${visibilitylist['n']}` let b:string = `fdsfa${visibilitylist['n']}`
// #ifdef APP-ANDROID
expect(b).toEqual("fdsfanull"); expect(b).toEqual("fdsfanull");
// #endif
// TODO: 需要编译器协助调用自定义函数将nil转成null
// #ifdef APP-IOS
expect(b).toEqual("fdsfanil");
// #endif
let a:Number|null = null let a:Number|null = null
let ab:string = `aaa${a}` let ab:string = `aaa${a}`
// #ifdef APP-ANDROID
expect(ab).toEqual("aaanull"); expect(ab).toEqual("aaanull");
// #endif
// #ifdef APP-IOS
expect(ab).toEqual("aaanil");
// #endif
let c:Any|null = "123" // let c:Any|null = "123"
c = null // c = null
let ac:string = `ccc${a}` let ac:string = `ccc${a}`
// #ifdef APP-ANDROID
expect(ac).toEqual("cccnull"); expect(ac).toEqual("cccnull");
// #endif
// #ifdef APP-IOS
expect(ac).toEqual("cccnil");
// #endif
}) })
test("matchAll", () => { test("matchAll", () => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册