summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/arc/tcomputedgoto.nim15
-rw-r--r--tests/arc/tcomputedgotocopy.nim11
2 files changed, 16 insertions, 10 deletions
diff --git a/tests/arc/tcomputedgoto.nim b/tests/arc/tcomputedgoto.nim
index 541a748c6..07487684a 100644
--- a/tests/arc/tcomputedgoto.nim
+++ b/tests/arc/tcomputedgoto.nim
@@ -1,16 +1,19 @@
 discard """
-  cmd: '''nim c --gc:arc $file'''
-  output: '''2
-2'''
+  cmd: '''nim c --mm:arc $file'''
+  output: '''
+2
+2
+destroyed
+'''
 """
 
 type
   ObjWithDestructor = object
     a: int
-proc `=destroy`(self: var ObjWithDestructor) =
+proc `=destroy`(self: ObjWithDestructor) =
   echo "destroyed"
 
-proc `=`(self: var ObjWithDestructor, other: ObjWithDestructor) =
+proc `=copy`(self: var ObjWithDestructor, other: ObjWithDestructor) =
   echo "copied"
 
 proc test(a: range[0..1], arg: ObjWithDestructor) =
@@ -38,4 +41,4 @@ proc test(a: range[0..1], arg: ObjWithDestructor) =
       if iteration == 2:
         break
 
-test(1, ObjWithDestructor())
\ No newline at end of file
+test(1, ObjWithDestructor())
diff --git a/tests/arc/tcomputedgotocopy.nim b/tests/arc/tcomputedgotocopy.nim
index 8337123ba..07487684a 100644
--- a/tests/arc/tcomputedgotocopy.nim
+++ b/tests/arc/tcomputedgotocopy.nim
@@ -1,13 +1,16 @@
 discard """
-  cmd: '''nim c --gc:arc $file'''
-  output: '''2
-2'''
+  cmd: '''nim c --mm:arc $file'''
+  output: '''
+2
+2
+destroyed
+'''
 """
 
 type
   ObjWithDestructor = object
     a: int
-proc `=destroy`(self: var ObjWithDestructor) =
+proc `=destroy`(self: ObjWithDestructor) =
   echo "destroyed"
 
 proc `=copy`(self: var ObjWithDestructor, other: ObjWithDestructor) =