diff --git a/uni_modules/uts-tests/utssdk/UTSJSONObject.uts b/uni_modules/uts-tests/utssdk/UTSJSONObject.uts index 4533cda29f0ebadbf118b145eb93997be3e67a0c..92f4468df6b923d956394f2ec76b7e959c6a48ed 100644 --- a/uni_modules/uts-tests/utssdk/UTSJSONObject.uts +++ b/uni_modules/uts-tests/utssdk/UTSJSONObject.uts @@ -22,13 +22,21 @@ export function testUTSJSONObject() : Result { expect(returnedTarget.toMap().size).toEqual(3); type A = { - username:"张三", - age:12 + username:string + age:number } type C = { - work:0.001 + work:number } - let b = UTSJSONObject.assign(new A("张三",12),{b:2},new C(0.002)) + + let b = UTSJSONObject.assign( { + username:"张三", + age:12 + } as A, + {b:2}, + { + work:0.002 + } as C) expect(b['age']).toEqual(12); expect(b['username']).toEqual("张三"); expect(b['b']).toEqual(2);