From e282cc6f75b7c1c7369cac032f0810e57c0ce22d Mon Sep 17 00:00:00 2001 From: m0_75226990 Date: Tue, 16 Jul 2024 20:18:12 +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=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/Operators.uts | 2 ++ uni_modules/uts-tests/utssdk/RegExp.uts | 4 ++-- uni_modules/uts-tests/utssdk/String.uts | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/uni_modules/uts-tests/utssdk/Operators.uts b/uni_modules/uts-tests/utssdk/Operators.uts index 288b3da..7907c33 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 1e2ac9f..f66c10d 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 9c9d2f3..c809c64 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%))'; -- GitLab