From 5c70ea1d67fe9d6857ac276e3945a02cc5f773a8 Mon Sep 17 00:00:00 2001 From: mahaifeng Date: Sat, 14 Sep 2024 12:02:23 +0800 Subject: [PATCH] =?UTF-8?q?[doc]=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E7=BC=96=E8=AF=91=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uni_modules/uts-tests/utssdk/Math.uts | 51 ++------------------------- 1 file changed, 2 insertions(+), 49 deletions(-) diff --git a/uni_modules/uts-tests/utssdk/Math.uts b/uni_modules/uts-tests/utssdk/Math.uts index ab2764c..d35461e 100644 --- a/uni_modules/uts-tests/utssdk/Math.uts +++ b/uni_modules/uts-tests/utssdk/Math.uts @@ -638,60 +638,13 @@ export function testMath() : Result { }) test('round', () => { - // #TEST Math.round - // #ifdef APP-ANDROID - console.log(Math.round(NaN)); - // #endif - // expected output: NaN - - console.log(Math.round(Math.E)); - // expected output: 3 - - // #ifdef APP-ANDROID - console.log(Math.round(Number.MAX_VALUE)); - // expected output: 1.7976931348623157e+308 - - console.log(Math.round(Number.MIN_VALUE)); - // expected output: 0 - - console.log(Math.round(Number.NEGATIVE_INFINITY)); - // expected output: -Infinity - - console.log(Math.round(Number.POSITIVE_INFINITY)); - // expected output: Infinity - - // #endif - - console.log(Math.round(0.9)); - // expected output: 1 - - console.log(Math.round(5.95)); - // expected output: 6 - - console.log(Math.round(-5.05)); - // expected output: -5 - - console.log(Math.round(37110233000.223)); - // expected output: 37110233000 - - console.log(Math.round(-37110233000.223)); - // expected output: -37110233000 - // #END - expect(Math.round(NaN)).toEqual(NaN); - expect(Math.round(Math.E)).toEqual(3); - - // #ifdef APP-ANDROID - expectNumber(Math.round(Number.MAX_VALUE)).toEqualDouble(1.7976931348623157e+308); - expect(Math.round(Number.MIN_VALUE)).toEqual(0); - expect(Math.round(Number.NEGATIVE_INFINITY)).toEqual(-Infinity); - expect(Math.round(Number.POSITIVE_INFINITY)).toEqual(Infinity); - // #endif - + // #TEST Math.round expect(Math.round(0.9)).toEqual(1); expect(Math.round(5.95)).toEqual(6); expect(Math.round(-5.05)).toEqual(-5); expect(Math.round(37110233000.223)).toEqual(37110233000); expect(Math.round(-37110233000.223)).toEqual(-37110233000); + // #END }) }) -- GitLab