From 24d4704178e36da8e4a6995cd6b2d3389646af97 Mon Sep 17 00:00:00 2001 From: duqingquan Date: Tue, 18 Jul 2023 18:24:44 +0800 Subject: [PATCH] =?UTF-8?q?math.round=20=E7=A4=BA=E4=BE=8B=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uni_modules/uts-tests/utssdk/Math.uts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/uni_modules/uts-tests/utssdk/Math.uts b/uni_modules/uts-tests/utssdk/Math.uts index 1f5aa0d..e4ddabf 100644 --- a/uni_modules/uts-tests/utssdk/Math.uts +++ b/uni_modules/uts-tests/utssdk/Math.uts @@ -236,5 +236,10 @@ export function testMath(): Result { expect(Math.trunc(42.84)).toEqual(42); expect(Math.trunc(0.123)).toEqual(0); }) + test('round', () => { + expect(Math.round(0.9).toEqual(1)); + expect(Math.round(5.95)).toEqual(6); + expect(Math.round(-5.05)).toEqual(-5); + }) }) } -- GitLab