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

!7564 DFX 3.1Release分支faultlogger和hichecker用例代码回退

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