提交 72e921d6 编写于 作者: C chenxuihui

修改hidebug测试用例代码

Signed-off-by: Nchenxuihui <chenxuhui2@huawei.com>
上级 0d3437d1
...@@ -85,7 +85,7 @@ describe('HiCheckerTest', function () { ...@@ -85,7 +85,7 @@ describe('HiCheckerTest', function () {
expect(hichecker.contains(0)).assertEqual(false); expect(hichecker.contains(0)).assertEqual(false);
hichecker.addRule(999999); hichecker.addRule(999999);
console.log('add wrong rule!'); console.log('add wrong rule!');
expect(hichecker.contains(-1)).assertEqual(false); expect(hichecker.contains(999999)).assertEqual(false);
}) })
/** /**
......
...@@ -30,7 +30,7 @@ describe('HidebugJsTest', function () { ...@@ -30,7 +30,7 @@ describe('HidebugJsTest', function () {
console.log('************* DFX_DFR_Hiprofiler_Interface_0600 Test start*************'); console.log('************* DFX_DFR_Hiprofiler_Interface_0600 Test start*************');
try { try {
let heapSize = hidebug.getNativeHeapSize(); let heapSize = hidebug.getNativeHeapSize();
expect(heapSize>BigInt(0)).assertTrue(); expect(heapSize>=BigInt(0)).assertTrue();
} catch (error) { } catch (error) {
expect().assertFail(); expect().assertFail();
} }
...@@ -46,7 +46,7 @@ describe('HidebugJsTest', function () { ...@@ -46,7 +46,7 @@ describe('HidebugJsTest', function () {
console.log('************* DFX_DFR_Hiprofiler_Interface_0400 Test start*************'); console.log('************* DFX_DFR_Hiprofiler_Interface_0400 Test start*************');
try { try {
let heapAllocatedSize = hidebug.getNativeHeapAllocatedSize(); let heapAllocatedSize = hidebug.getNativeHeapAllocatedSize();
expect(heapAllocatedSize>BigInt(0)).assertTrue(); expect(heapAllocatedSize>=BigInt(0)).assertTrue();
} catch (error) { } catch (error) {
expect().assertFail(); expect().assertFail();
} }
...@@ -62,7 +62,7 @@ describe('HidebugJsTest', function () { ...@@ -62,7 +62,7 @@ describe('HidebugJsTest', function () {
console.log('************* DFX_DFR_Hiprofiler_Interface_0500 Test start*************'); console.log('************* DFX_DFR_Hiprofiler_Interface_0500 Test start*************');
try { try {
let heapFreeSize = hidebug.getNativeHeapFreeSize(); let heapFreeSize = hidebug.getNativeHeapFreeSize();
expect(heapFreeSize>BigInt(0)).assertTrue(); expect(heapFreeSize>=BigInt(0)).assertTrue();
} catch (error) { } catch (error) {
expect().assertFail(); expect().assertFail();
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册