未验证 提交 c274ff59 编写于 作者: O openharmony_ci 提交者: Gitee

!7425 DFX 3.1Release分支测试用例代码修复

Merge pull request !7425 from chenxuihui/OpenHarmony-3.1-Release
......@@ -86,15 +86,21 @@ describe('HiCheckerTest', function () {
*/
it('HiCheckerTest003', 0, async function (done) {
console.info('HiCheckerTest003 start');
hichecker.addRule(-1);
hichecker.addRule(1n);
console.log('add right rule!');
expect(hichecker.contains(1n)).assertEqual(true);
try {
hichecker.addRule(0n);
} catch(e) {
console.log('add wrong rule!');
expect(hichecker.contains(-1)).assertEqual(false);
hichecker.addRule(0);
console.log('add wrong rule!');
expect(hichecker.contains(0)).assertEqual(false);
hichecker.addRule(999999);
expect(hichecker.contains(0n)).assertEqual(false);
}
try {
hichecker.addRule(999999n);
} catch(e) {
console.log('add wrong rule!');
expect(hichecker.contains(-1)).assertEqual(false);
expect(hichecker.contains(999999n)).assertEqual(false);
}
done();
})
......
......@@ -110,7 +110,7 @@ describe("FaultlogJsTest", function () {
expect(typeof(ret[i].module) == "string").assertTrue();
expect(typeof(ret[i].summary) == "string").assertTrue();
expect(typeof(ret[i].fullLog) == "string").assertTrue();
expect(typeof(ret[i].timestamp) == "number").assertTrue();
expect(typeof(ret[i].ts) == "number").assertTrue();
expect(true).assertTrue();
} else {
expect(false).assertTrue();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册