Skip to content

Commit

Permalink
adjust test assert on heap size
Browse files Browse the repository at this point in the history
  • Loading branch information
crusso committed Feb 18, 2024
1 parent 51df947 commit bf55ff5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions test/run/idl-ops.mo
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ assert(null == deserArrayNat (serArrayInt arrayInt));
assert((?arrayInt) == deserArrayInt (serArrayInt arrayInt));
let heapDifference = Prim.rts_heap_size() : Int - started_with;
// Difference between incremental and non-incremental GC
Prim.debugPrint(debug_show heapDifference);
assert(heapDifference <= +8_176);
//SKIP run
Expand Down
6 changes: 4 additions & 2 deletions test/run/idl.mo
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ assert(arrayNat == deserArrayNat (serArrayNat arrayNat));
assert(arrayNat == deserArrayInt (serArrayNat arrayNat));
assert(arrayNat == deserArrayInt (serArrayInt arrayNat));
assert(arrayInt == deserArrayInt (serArrayInt arrayInt));
let heapDifference = Prim.rts_heap_size() : Int - started_with;
// Difference between incremental and non-incremental GC
assert(heapDifference == +4_892 or heapDifference == +5_340);
assert(heapDifference == 4_488 or // no rtti
heapDifference == 4_888 or // no rtti and incremental GC
heapDifference == +4_892 or // rtti
heapDifference == +5_340); // rtti and incremental GC
//SKIP run
//SKIP run-ir
Expand Down

0 comments on commit bf55ff5

Please sign in to comment.