summary refs log tree commit diff stats
path: root/tests/fragmentation/tfragment_alloc.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fragmentation/tfragment_alloc.nim')
-rw-r--r--tests/fragmentation/tfragment_alloc.nim16
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/fragmentation/tfragment_alloc.nim b/tests/fragmentation/tfragment_alloc.nim
index 6ee8322c7..031588d27 100644
--- a/tests/fragmentation/tfragment_alloc.nim
+++ b/tests/fragmentation/tfragment_alloc.nim
@@ -1,7 +1,8 @@
 
-
-
-include system/ansi_c
+discard """
+  output: '''occupied ok: true
+total ok: true'''
+"""
 
 import strutils, data
 
@@ -16,4 +17,11 @@ proc main =
  #   c_fprintf(stdout, "iteration: %ld size: %ld\n", i, size)
 
 main()
-echo formatSize getOccupiedMem(), " / ", formatSize getTotalMem()
+
+let occ = getOccupiedMem()
+let total = getTotalMem()
+
+# Current values on Win64: 824KiB / 106.191MiB
+
+echo "occupied ok: ", occ < 2 * 1024 * 1024
+echo "total ok: ", total < 120 * 1024 * 1024