diff --git a/uni_modules/uts-tests/utssdk/Array.uts b/uni_modules/uts-tests/utssdk/Array.uts index f084e3c7e56f231823defdd3ba3f65c114aee221..6e13bd58037f78dd38095efe0550457666a08fe5 100644 --- a/uni_modules/uts-tests/utssdk/Array.uts +++ b/uni_modules/uts-tests/utssdk/Array.uts @@ -42,6 +42,20 @@ export function testArray(): Result { }) + test('convert-native', () => { + // #ifndef APP-ANDROID + let utsArray = ["1",2,3.0] + let javaArray = utsArray.toTypedArray(); + let kotlinArray = utsArray.toKotlinList() + + let convertArrayFromJava = Array.fromNative(javaArray); + let convertArrayFromKotlin = Array.fromNative(kotlinArray); + expect(convertArrayFromJava[0] == convertArrayFromKotlin[0]).toEqual(true); + expect(convertArrayFromJava[0]).toEqual("1"); + // #endif + + }) + test('length', () => { const arr = ['shoes', 'shirts', 'socks', 'sweaters']; expect(arr.length).toEqual(4);