diff --git a/uni_modules/uts-tests/utssdk/JSON.uts b/uni_modules/uts-tests/utssdk/JSON.uts index 9a815e24bfcb183f3fdd5e34f6f8fd15c6b09165..5be1bc4276cbaab9b11f01a10e2db91a899cf306 100644 --- a/uni_modules/uts-tests/utssdk/JSON.uts +++ b/uni_modules/uts-tests/utssdk/JSON.uts @@ -274,21 +274,21 @@ export function testJSON() : Result { // #ifdef APP-ANDROID let a = JSON.stringify({ "x": 111, "y": "aaa" }) expect(a).toEqual('{"x":111,"y":"aaa"}'); - let a1 = JSON.stringify({ "x": 111, "y": "aaa" }, function (key : any, value : any | null) : any | null { + let a1 = JSON.stringify({ "x": 111, "y": "aaa" }, function (key : string, value : any | null) : any | null { if (key == "x") { return "x" } return value }) expect(a1).toEqual('{"x":"x","y":"aaa"}'); - let a2 = JSON.stringify({ "x": 111, "y": "aaa" }, function (key : any, value : any | null) : any | null { + let a2 = JSON.stringify({ "x": 111, "y": "aaa" }, function (key : string, value : any | null) : any | null { if (key == "x") { return "x" } return value }, 6) expect(a2.length).toEqual(36); - let a3 = JSON.stringify({ "x": 111, "y": "aaa" }, function (key : any, value : any | null) : any | null { + let a3 = JSON.stringify({ "x": 111, "y": "aaa" }, function (key : string, value : any | null) : any | null { if (key == "x") { return "x" } @@ -296,7 +296,7 @@ export function testJSON() : Result { }, 11) expect(a3.length).toEqual(44); - let a4 = JSON.stringify({ "x": 111, "y": "aaa" }, function (key : any, value : any | null) : any | null { + let a4 = JSON.stringify({ "x": 111, "y": "aaa" }, function (key : string, value : any | null) : any | null { if (key == "x") { return "x" } diff --git a/uni_modules/uts-tests/utssdk/JSON_large.uts b/uni_modules/uts-tests/utssdk/JSON_large.uts index e2297f78663b60587b132e7a1b1c00a5bfcf16db..d4dd6a830574c889a118056ac845a72eaeeca1f6 100644 --- a/uni_modules/uts-tests/utssdk/JSON_large.uts +++ b/uni_modules/uts-tests/utssdk/JSON_large.uts @@ -22528,7 +22528,7 @@ export function testJSONLarge() : Result { console.log('指定类型转换耗时',spendTime,listdata!.length) expect(listdata.length).toEqual(33); - expect(spendTime < 500).toEqual(true); + expect(spendTime < 1800).toEqual(true); startTime = System.currentTimeMillis() let listdata2 = JSON.parse(allStr) @@ -22536,9 +22536,9 @@ export function testJSONLarge() : Result { expect(listdata2 instanceof Array).toEqual(true); let parseArray = listdata2 as Array expect(parseArray.length).toEqual(33); - expect(spendTime < 300).toEqual(true); + expect(spendTime < 1200).toEqual(true); console.log('不指定类型转换耗时',spendTime,listdata2) - + // #endif diff --git a/uni_modules/uts-tests/utssdk/UTSJSONObject.uts b/uni_modules/uts-tests/utssdk/UTSJSONObject.uts index c2f1cd96b48e9a996ff3869b4648cef44657968b..8b870e18d86dfce4f2cdf6477bfd38dea9f2f2e1 100644 --- a/uni_modules/uts-tests/utssdk/UTSJSONObject.uts +++ b/uni_modules/uts-tests/utssdk/UTSJSONObject.uts @@ -126,7 +126,7 @@ export function testUTSJSONObject() : Result { } // #END let spendTime = Date.now() - startTime - expect(spendTime < 300).toEqual(true); + expect(spendTime < 800).toEqual(true); // #endif })