summary refs log tree commit diff stats
path: root/tests/destructor
diff options
context:
space:
mode:
Diffstat (limited to 'tests/destructor')
-rw-r--r--tests/destructor/tmove_objconstr.nim2
-rw-r--r--tests/destructor/turn_destroy_into_finalizer.nim7
2 files changed, 6 insertions, 3 deletions
diff --git a/tests/destructor/tmove_objconstr.nim b/tests/destructor/tmove_objconstr.nim
index 51aba1592..875f78283 100644
--- a/tests/destructor/tmove_objconstr.nim
+++ b/tests/destructor/tmove_objconstr.nim
@@ -36,7 +36,7 @@ proc pointlessWrapper(s: string): Data =
 proc main =
   var x = pointlessWrapper"test"
 
-when isMainModule:
+when true:
   main()
 
 # bug #985
diff --git a/tests/destructor/turn_destroy_into_finalizer.nim b/tests/destructor/turn_destroy_into_finalizer.nim
index f5b705593..b3f34003e 100644
--- a/tests/destructor/turn_destroy_into_finalizer.nim
+++ b/tests/destructor/turn_destroy_into_finalizer.nim
@@ -1,5 +1,5 @@
 discard """
-  output: '''true'''
+  output: "turn_destroy_into_finalizer works"
 """
 
 type
@@ -17,6 +17,9 @@ proc main =
   for i in 1..50_000:
     new(r)
     r.id = i
-  echo destroyed > 30_000
+  if destroyed > 30_000:
+    echo "turn_destroy_into_finalizer works"
+  else:
+    echo "turn_destroy_into_finalizer failed: ", destroyed
 
 main()