From 6c62b7462d17072753ca46864522cf067edbdf81 Mon Sep 17 00:00:00 2001 From: duqingquan Date: Tue, 3 Sep 2024 16:06:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20google-service.json=20?= =?UTF-8?q?=E9=9B=86=E6=88=90=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nativeResources/android/google-services.json | 1 + uni_modules/uts-tests/utssdk/Math.uts | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 nativeResources/android/google-services.json diff --git a/nativeResources/android/google-services.json b/nativeResources/android/google-services.json new file mode 100644 index 0000000..efd261b --- /dev/null +++ b/nativeResources/android/google-services.json @@ -0,0 +1 @@ +demo \ No newline at end of file diff --git a/uni_modules/uts-tests/utssdk/Math.uts b/uni_modules/uts-tests/utssdk/Math.uts index 0099b4e..10418ad 100644 --- a/uni_modules/uts-tests/utssdk/Math.uts +++ b/uni_modules/uts-tests/utssdk/Math.uts @@ -93,6 +93,7 @@ export function testMath(): Result { expect(Math.atan2(90, 15)).toEqual(1.4056476493802699); expect(Math.atan2(15, 90)).toEqual(0.16514867741462683); }) + test('atanh', () => { // 解决精度问题 expect(Math.atanh(0)).toEqual(0.0); @@ -241,6 +242,7 @@ export function testMath(): Result { expect(Math.trunc(0.123)).toEqual(0); }) test('round', () => { + expect(Math.round(NaN)).toEqual(NaN); expect(Math.round(0.9)).toEqual(1); expect(Math.round(5.95)).toEqual(6); expect(Math.round(-5.05)).toEqual(-5); -- GitLab