namespace testWebJson

import labs.ATest;
import web.json;

..io.open();
//加载测试框架内核
web.json@ = labs.ATest;

//加载测试用例
flname = web.json@.path.dir+"test_usecase\web\json.json";
jsonStr = ..string.load(flname);

//调用testAssert对象
testAssert = web.json@.testAssert();

//运行测试
web.json@.doTest(jsonStr,web.json,"decode-1",testAssert,"assertHashEquals found errors");
web.json@.doTest(jsonStr,web.json,"decode-2",testAssert,"assertArrayEquals found errors");
web.json@.doTest(jsonStr,web.json,"encode",testAssert,"assertJsonEquals found errors");

//测试结果
..io.print(testAssert.getTestResults());