summary refs log tree commit diff stats
path: root/tests/destructor
diff options
context:
space:
mode:
authorArne Döring <arne.doering@gmx.net>2018-12-05 19:03:01 +0100
committerAraq <rumpf_a@web.de>2018-12-11 21:23:22 +0100
commita5ecbf823f178c2800d40bcff562bc4eca0f2030 (patch)
tree50c3812eaa7a1100c30623755263d4ef35dd1c3b /tests/destructor
parentc0c35839cc65717283edda72ce34579b992563ca (diff)
downloadNim-a5ecbf823f178c2800d40bcff562bc4eca0f2030.tar.gz
lots of small changes
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()