From c2c4e73e592e6a949a13b6a0cece53fd08650322 Mon Sep 17 00:00:00 2001 From: duqingquan Date: Wed, 11 Oct 2023 17:53:43 +0800 Subject: [PATCH] =?UTF-8?q?hello=20uts=20=E4=BF=AE=E5=A4=8D=20=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=8C=96=E6=B5=8B=E8=AF=95android=209=E4=B8=80?= =?UTF-8?q?=E4=B8=8B=20=E9=83=A8=E5=88=86=E7=B2=BE=E5=BA=A6=E5=B7=AE?= =?UTF-8?q?=E5=BC=82=E6=8A=A5=E9=94=99=E7=9A=84=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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/uni_modules/uts-tests/utssdk/Math.uts b/uni_modules/uts-tests/utssdk/Math.uts index bcfd8b7..8755186 100644 --- a/uni_modules/uts-tests/utssdk/Math.uts +++ b/uni_modules/uts-tests/utssdk/Math.uts @@ -123,14 +123,14 @@ export function testMath(): Result { test('cosh', () => { // 解决精度问题 expect(Math.cosh(0)).toEqual(1.0); - expect(Math.cosh(1)).toEqual(1.5430806348152437); - expect(Math.cosh(-1)).toEqual(1.5430806348152437); + expectNumber(Math.cosh(1)).toEqualDouble(1.5430806348152437); + expectNumber(Math.cosh(-1)).toEqualDouble(1.5430806348152437); }) test('exp', () => { - expect(Math.exp(-1)).toEqual(0.36787944117144233); + expectNumber(Math.exp(-1)).toEqualDouble(0.36787944117144233); // 解决精度问题 expect(Math.exp(0)).toEqual(1.0); - expect(Math.exp(1)).toEqual(2.718281828459045); + expectNumber(Math.exp(1)).toEqualDouble(2.718281828459045); }) test('expm1', () => { expectNumber(Math.expm1(1)).toEqualDouble(1.718281828459045); -- GitLab