diff --git a/hiviewdfx/hicheckertest/hicheckerjstest/src/main/js/test/HiChecker.test.js b/hiviewdfx/hicheckertest/hicheckerjstest/src/main/js/test/HiChecker.test.js index 9e3b49f2facc0dc8c3d266a895b59d9910e7d5ba..c04058738e0048ff6a8fa118e055497b1b9cedf2 100644 --- a/hiviewdfx/hicheckertest/hicheckerjstest/src/main/js/test/HiChecker.test.js +++ b/hiviewdfx/hicheckertest/hicheckerjstest/src/main/js/test/HiChecker.test.js @@ -85,7 +85,7 @@ describe('HiCheckerTest', function () { expect(hichecker.contains(0)).assertEqual(false); hichecker.addRule(999999); console.log('add wrong rule!'); - expect(hichecker.contains(-1)).assertEqual(false); + expect(hichecker.contains(999999)).assertEqual(false); }) /** diff --git a/hiviewdfx/hidebugtest/hidebugtestjstest/src/main/js/test/Hidebug.test.js b/hiviewdfx/hidebugtest/hidebugtestjstest/src/main/js/test/Hidebug.test.js index f69927142305ddb3493b3b44d69c83312630a151..4452e0fdda1d1a805693881cccc968018f7cbf52 100644 --- a/hiviewdfx/hidebugtest/hidebugtestjstest/src/main/js/test/Hidebug.test.js +++ b/hiviewdfx/hidebugtest/hidebugtestjstest/src/main/js/test/Hidebug.test.js @@ -30,7 +30,7 @@ describe('HidebugJsTest', function () { console.log('************* DFX_DFR_Hiprofiler_Interface_0600 Test start*************'); try { let heapSize = hidebug.getNativeHeapSize(); - expect(heapSize>BigInt(0)).assertTrue(); + expect(heapSize>=BigInt(0)).assertTrue(); } catch (error) { expect().assertFail(); } @@ -46,7 +46,7 @@ describe('HidebugJsTest', function () { console.log('************* DFX_DFR_Hiprofiler_Interface_0400 Test start*************'); try { let heapAllocatedSize = hidebug.getNativeHeapAllocatedSize(); - expect(heapAllocatedSize>BigInt(0)).assertTrue(); + expect(heapAllocatedSize>=BigInt(0)).assertTrue(); } catch (error) { expect().assertFail(); } @@ -62,7 +62,7 @@ describe('HidebugJsTest', function () { console.log('************* DFX_DFR_Hiprofiler_Interface_0500 Test start*************'); try { let heapFreeSize = hidebug.getNativeHeapFreeSize(); - expect(heapFreeSize>BigInt(0)).assertTrue(); + expect(heapFreeSize>=BigInt(0)).assertTrue(); } catch (error) { expect().assertFail(); }