summary refs log tree commit diff stats
path: root/tests/destructor
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2020-10-15 12:52:30 +0200
committerGitHub <noreply@github.com>2020-10-15 12:52:30 +0200
commitda4aa2e1fb8b0084fcf03b85edf4a5c1d0170856 (patch)
tree4d8fe99314d844bb7b44377568eebfd7b86e7f92 /tests/destructor
parent42c180c665cb283bcb07e078a5ff91c69c84fa62 (diff)
downloadNim-da4aa2e1fb8b0084fcf03b85edf4a5c1d0170856.tar.gz
renamed '=' to '=copy' [backport:1.2] (#15585)
* Assign hook name changed to `=copy`
* Adapt destructors.rst
* [nobackport] Duplicate tests for =copy hook
* Fix tests
* added a changelog entry

Co-authored-by: Clyybber <darkmine956@gmail.com>
Diffstat (limited to 'tests/destructor')
-rw-r--r--tests/destructor/tconsume_twice.nim2
-rw-r--r--tests/destructor/tprevent_assign.nim2
-rw-r--r--tests/destructor/tprevent_assign2.nim2
-rw-r--r--tests/destructor/tprevent_assign3.nim2
-rw-r--r--tests/destructor/tuse_ownedref_after_move.nim2
5 files changed, 5 insertions, 5 deletions
diff --git a/tests/destructor/tconsume_twice.nim b/tests/destructor/tconsume_twice.nim
index 0030267f8..b0a039e9b 100644
--- a/tests/destructor/tconsume_twice.nim
+++ b/tests/destructor/tconsume_twice.nim
@@ -1,6 +1,6 @@
 discard """
   cmd: "nim c --newruntime $file"
-  errormsg: "'=' is not available for type <owned Foo>; requires a copy because it's not the last read of 'a'; another read is done here: tconsume_twice.nim(13, 10); routine: consumeTwice"
+  errormsg: "'=copy' is not available for type <owned Foo>; requires a copy because it's not the last read of 'a'; another read is done here: tconsume_twice.nim(13, 10); routine: consumeTwice"
   line: 11
 """
 type
diff --git a/tests/destructor/tprevent_assign.nim b/tests/destructor/tprevent_assign.nim
index 108ccc371..4c484ebc1 100644
--- a/tests/destructor/tprevent_assign.nim
+++ b/tests/destructor/tprevent_assign.nim
@@ -1,5 +1,5 @@
 discard """
-  errormsg: "'=' is not available for type <Foo>; requires a copy because it's not the last read of 'otherTree'"
+  errormsg: "'=copy' is not available for type <Foo>; requires a copy because it's not the last read of 'otherTree'"
   line: 29
 """
 
diff --git a/tests/destructor/tprevent_assign2.nim b/tests/destructor/tprevent_assign2.nim
index 0e4481710..ef20672d5 100644
--- a/tests/destructor/tprevent_assign2.nim
+++ b/tests/destructor/tprevent_assign2.nim
@@ -1,5 +1,5 @@
 discard """
-  errormsg: "'=' is not available for type <Foo>; requires a copy because it's not the last read of 'otherTree'"
+  errormsg: "'=copy' is not available for type <Foo>; requires a copy because it's not the last read of 'otherTree'"
   file: "tprevent_assign2.nim"
   line: 48
 """
diff --git a/tests/destructor/tprevent_assign3.nim b/tests/destructor/tprevent_assign3.nim
index a8a35ea5e..0577aa5ff 100644
--- a/tests/destructor/tprevent_assign3.nim
+++ b/tests/destructor/tprevent_assign3.nim
@@ -1,5 +1,5 @@
 discard """
-  errormsg: "'=' is not available for type <Foo>; requires a copy because it's not the last read of 'otherTree'"
+  errormsg: "'=copy' is not available for type <Foo>; requires a copy because it's not the last read of 'otherTree'"
   file: "tprevent_assign3.nim"
   line: 46
 """
diff --git a/tests/destructor/tuse_ownedref_after_move.nim b/tests/destructor/tuse_ownedref_after_move.nim
index 46540837c..ce96b741e 100644
--- a/tests/destructor/tuse_ownedref_after_move.nim
+++ b/tests/destructor/tuse_ownedref_after_move.nim
@@ -1,6 +1,6 @@
 discard """
   cmd: '''nim c --newruntime $file'''
-  errormsg: "'=' is not available for type <owned Button>; requires a copy because it's not the last read of ':envAlt.b1'; another read is done here: tuse_ownedref_after_move.nim(52, 4)"
+  errormsg: "'=copy' is not available for type <owned Button>; requires a copy because it's not the last read of ':envAlt.b1'; another read is done here: tuse_ownedref_after_move.nim(52, 4)"
   line: 48
 """