From 7415b7db59c78bb07d5dfa3ca5ed03b141cd6dec Mon Sep 17 00:00:00 2001 From: duqingquan Date: Thu, 13 Jun 2024 19:38:29 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85UTSNumber=20=E6=B5=8B?= =?UTF-8?q?=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 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/uni_modules/uts-tests/utssdk/Number.uts b/uni_modules/uts-tests/utssdk/Number.uts index 29440bb..6044348 100644 --- a/uni_modules/uts-tests/utssdk/Number.uts +++ b/uni_modules/uts-tests/utssdk/Number.uts @@ -76,6 +76,13 @@ export function testNumber() : Result { expect(aj?.a == ki).toEqual(true); expect(aj?.a == kd).toEqual(true); expect(aj?.a == kf).toEqual(true); + // 对比JSON.parse 和 new 得到的对象属性 + let newA = A(1) + expect(aj?.a == newA.a).toEqual(true); + newA.a = 1.0 + expect(aj?.a == newA.a).toEqual(true); + newA.a = 1.1 + expect(aj?.a == newA.a).toEqual(false); }) -- GitLab