diff --git a/uni_modules/uts-tests/utssdk/Operators.uts b/uni_modules/uts-tests/utssdk/Operators.uts index 288b3da6758f9d9c3e2d9597fefa78af8b7efc5f..7907c3360930a6682492157931c7b7b0ce767d9a 100644 --- a/uni_modules/uts-tests/utssdk/Operators.uts +++ b/uni_modules/uts-tests/utssdk/Operators.uts @@ -318,9 +318,11 @@ export function testOperators(): Result { let a = 5; // 00000000000000000000000000000101 a >>>= 2; // 00000000000000000000000000000001 expect(a).toEqual(1); + // #ifdef APP-ANDROID let b = -5; // -00000000000000000000000000000101 b >>>= 2; // 00111111111111111111111111111110 expect(b).toEqual(1073741822); + // #endif }) }) } diff --git a/uni_modules/uts-tests/utssdk/RegExp.uts b/uni_modules/uts-tests/utssdk/RegExp.uts index 1e2ac9ff05dc5c11da8459e872e7d99956daa37a..f66c10dd1ffcda9768d5b1d7aa8f911d5a5b3a60 100644 --- a/uni_modules/uts-tests/utssdk/RegExp.uts +++ b/uni_modules/uts-tests/utssdk/RegExp.uts @@ -256,8 +256,8 @@ export function testRegExp(): Result { const CHUNK_REGEXP = /^(\S*)?\s*(\d*\.?\d+(?:ms|s)?)?\s*(\S*)?\s*(\d*\.?\d+(?:ms|s)?)?$/ const match2 = CHUNK_REGEXP.exec('none') - expect(match2?.[0]).toEqual("none"); - expect(match2?.[1]).toEqual("none"); + expect(match2![0]).toEqual("none"); + expect(match2![1]).toEqual("none"); // expect(JSON.stringify(match2![2])).toEqual("null"); // expect(JSON.stringify(match2![3])).toEqual("null"); // expect(JSON.stringify(match2![4])).toEqual("null"); diff --git a/uni_modules/uts-tests/utssdk/String.uts b/uni_modules/uts-tests/utssdk/String.uts index 9c9d2f350e9f87d2300ac310f9edac18eda61357..c809c64c464189349f2ddcf7bc3590b380ef07ae 100644 --- a/uni_modules/uts-tests/utssdk/String.uts +++ b/uni_modules/uts-tests/utssdk/String.uts @@ -140,12 +140,12 @@ export function testString(): Result { const str = 'The quick brown fox jumps over the lazy dog. It barked.'; const result = str.match(new RegExp('[A-Z]', 'g')); // expect(result!.length).toEqual(2); - expect(result?.[0]).toEqual("T"); - expect(result?.[1]).toEqual("I"); + expect(result![0]).toEqual("T"); + expect(result![1]).toEqual("I"); const result2 = str.match(new RegExp('[A-Z]')); // expect(result2!.length).toEqual(1); - expect(result2?.[0]).toEqual("T"); + expect(result2![0]).toEqual("T"); // #ifdef APP-ANDROID const gradientString = 'linear-gradient(to right, rgb(255, 0, 0), #00FF00, hsl(120, 100%, 50%))';