提交 b4b0d855 编写于 作者: 杜庆泉's avatar 杜庆泉

因JSON.parse解析数字返回类型修正为double,调整相关示例

上级 224ac5a0
......@@ -57,7 +57,7 @@ export function testUTSJSONObject() : Result {
}
let data2 = JSON.parse<UTSJSONObject>(JSON.stringify(data1))
expect(data2!.toJSONString()).toEqual('{"str":"test","num":1,"num2":2.369}')
expect(data2!.toJSONString()).toEqual('{"str":"test","num":1.0,"num2":2.369}')
class TestData2 implements IJSONStringify{
toJSON():any|null{
......
......@@ -30,7 +30,7 @@ export function testConsole() : Result {
let aj2 = JSON.parse('{"a":1}') as UTSJSONObject;
expect(obtainInnerObject(aj2['a']).get("type")).toEqual("Int");
expect(obtainInnerObject(aj2['a']).get("type")).toEqual("Double");
expect(obtainInnerObject(aj2['a']).get("subType")).toEqual("number");
// #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册