diff --git a/uni_modules/uts-tests/utssdk/Array.uts b/uni_modules/uts-tests/utssdk/Array.uts index 8e43cac23a165d294fd09f82da1d1f86815f2bcd..7cc1727f09f0e2f9785845a1a350f479e1eb32ce 100644 --- a/uni_modules/uts-tests/utssdk/Array.uts +++ b/uni_modules/uts-tests/utssdk/Array.uts @@ -655,8 +655,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 }) @@ -676,7 +677,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 @@ -779,7 +780,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 ee182750ad5dbe7f4ae1e2833c7140679edf2f98..c4c089a3814b8655ddc061527b65197d798ce8b3 100644 --- a/uni_modules/uts-tests/utssdk/Number.uts +++ b/uni_modules/uts-tests/utssdk/Number.uts @@ -277,7 +277,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); @@ -285,7 +287,7 @@ export function testNumber() : Result { }) test('toLong', () => { - // #ifdef APP + // #ifdef APP-ANDROID // #TEST Number.toLong let a = 12 console.log(a.toLong()); @@ -298,7 +300,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