From 7871091d0f8ab946e3744a5b93e0f053d9571ce8 Mon Sep 17 00:00:00 2001 From: m0_75226990 Date: Thu, 5 Sep 2024 15:29:31 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99=E9=83=A8=E5=88=86=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E4=BE=8B=E5=8A=A0=E6=9D=A1=E4=BB=B6=E7=BC=96=E8=AF=91=EF=BC=8C?= =?UTF-8?q?=E9=81=BF=E5=85=8DiOS=E7=BC=96=E8=AF=91=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uni_modules/uts-tests/utssdk/Array.uts | 8 ++++++-- uni_modules/uts-tests/utssdk/Number.uts | 6 ++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/uni_modules/uts-tests/utssdk/Array.uts b/uni_modules/uts-tests/utssdk/Array.uts index ba51615..9035423 100644 --- a/uni_modules/uts-tests/utssdk/Array.uts +++ b/uni_modules/uts-tests/utssdk/Array.uts @@ -658,8 +658,9 @@ export function testArray() : Result { console.log(Array.isArray(new Array(5))); // Expected output: true - + // #ifdef APP-ANDROID console.log(Array.isArray(new Int16Array([15, 33]))); + // #endif // Expected output: false // #END }) @@ -679,7 +680,7 @@ export function testArray() : Result { // #END // #TEST Array.sampleForEach - fruits.forEach(function (item, index, array) { + fruits.forEach(function (item, index: number, array) { console.log(item, index) }) // Apple 0 @@ -782,7 +783,10 @@ export function testArray() : Result { // #END // #TEST Array.sampleFillError + // #ifdef APP-ANDROID new Array(20).fill(0) + // #endif + // #END }) diff --git a/uni_modules/uts-tests/utssdk/Number.uts b/uni_modules/uts-tests/utssdk/Number.uts index 10aeb5c..c782ed1 100644 --- a/uni_modules/uts-tests/utssdk/Number.uts +++ b/uni_modules/uts-tests/utssdk/Number.uts @@ -226,7 +226,9 @@ export function testNumber() : Result { // #ifdef APP // #TEST Number.toByte let a = 12 + // #ifdef APP-ANDROID console.log(a.toByte()); + // #endif // expected output: 12 // #END expect(a.toInt()).toEqual(12); @@ -234,7 +236,7 @@ export function testNumber() : Result { }) test('toLong', () => { - // #ifdef APP + // #ifdef APP-ANDROID // #TEST Number.toLong let a = 12 console.log(a.toLong()); @@ -247,7 +249,7 @@ export function testNumber() : Result { test('from', () => { // #ifdef APP // #TEST Number.from - let a = 12 + let a: Int = 12 let b = Number.from(a) console.log(b); // expected output: 12 -- GitLab