From f1176b2de3eec5a96f79bcbd2d06b63324b36440 Mon Sep 17 00:00:00 2001 From: duqingquan Date: Wed, 25 Sep 2024 16:50:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=83=A8=E5=88=86=E7=A4=BA?= =?UTF-8?q?=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uni_modules/uts-tests/utssdk/JSON.uts | 8 ++++---- uni_modules/uts-tests/utssdk/JSON_large.uts | 6 +++--- uni_modules/uts-tests/utssdk/UTSJSONObject.uts | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/uni_modules/uts-tests/utssdk/JSON.uts b/uni_modules/uts-tests/utssdk/JSON.uts index 9a815e2..5be1bc4 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 e2297f7..d4dd6a8 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 c2f1cd9..8b870e1 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 }) -- GitLab