diff --git a/uni_modules/uts-tests/utssdk/Number.uts b/uni_modules/uts-tests/utssdk/Number.uts index 29440bb4806b8206ba60c270fe429e5b52dcb77d..604434836221841df5c5f14d7d4c83a71ca86685 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); })