From 5755b42bc3f6ee4606a94b8dd4390c056c28ca05 Mon Sep 17 00:00:00 2001 From: duqingquan Date: Mon, 17 Jun 2024 17:29:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85UTSNumber=20=E7=9B=B8?= =?UTF-8?q?=E7=AD=89=E7=9A=84=E6=B5=8B=E8=AF=95=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uni_modules/uts-tests/utssdk/Number.uts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/uni_modules/uts-tests/utssdk/Number.uts b/uni_modules/uts-tests/utssdk/Number.uts index 1ef6e64..8919e3a 100644 --- a/uni_modules/uts-tests/utssdk/Number.uts +++ b/uni_modules/uts-tests/utssdk/Number.uts @@ -93,6 +93,15 @@ export function testNumber() : Result { newA.a = 1.1 expect(aj?.a == newA.a).toEqual(false); expect(aj?.a === newA.a).toEqual(false); + + let a10 = JSON.parse("10") + let b10 = JSON.parse("10") + let c10 = JSON.parse("10.0") + expect(a10 == b10).toEqual(true); + expect(a10 == c10).toEqual(true); + let aj2 = JSON.parse('{"a":1}'); + expect(aj?.a == aj2?.a).toEqual(true); + }) -- GitLab