提交 4a540be3 编写于 作者: C chenxuihui

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

Signed-off-by: Nchenxuihui <chenxuhui2@huawei.com>
上级 6de68a83
...@@ -86,15 +86,21 @@ describe('HiCheckerTest', function () { ...@@ -86,15 +86,21 @@ 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(-1); hichecker.addRule(1n);
console.log('add wrong rule!'); console.log('add right rule!');
expect(hichecker.contains(-1)).assertEqual(false); expect(hichecker.contains(1n)).assertEqual(true);
hichecker.addRule(0); try {
console.log('add wrong rule!'); hichecker.addRule(0n);
expect(hichecker.contains(0)).assertEqual(false); } catch(e) {
hichecker.addRule(999999); console.log('add wrong rule!');
console.log('add wrong rule!'); expect(hichecker.contains(0n)).assertEqual(false);
expect(hichecker.contains(-1)).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].timestamp) == "number").assertTrue(); expect(typeof(ret[i].ts) == "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.
先完成此消息的编辑!
想要评论请 注册