summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorflywind <xzsflywind@gmail.com>2022-04-27 02:14:39 +0800
committerGitHub <noreply@github.com>2022-04-26 20:14:39 +0200
commit8bfc396a4dfa722239818f399a119452a53fe07f (patch)
treefaa97a1e5566de2e71a791264691fe2783260d44 /tests
parentef4ac5a0d23fcffac9963670b73fa69ad0d0aa73 (diff)
downloadNim-8bfc396a4dfa722239818f399a119452a53fe07f.tar.gz
fixes #18612; apply cache and memcmp for methods in arc/orc (#19749)
* try using endsWith

* use memcmp

* add cache

* cleanup

* better

* minor

* fix

* improve test coverage for methods with ARC
Diffstat (limited to 'tests')
-rw-r--r--tests/metatype/ttypedesc3.nim3
-rw-r--r--tests/method/tgeneric_methods.nim1
-rw-r--r--tests/method/tmethod_issues.nim1
-rw-r--r--tests/method/tmethod_various.nim1
-rw-r--r--tests/method/tsingle_methods.nim2
-rw-r--r--tests/misc/parsecomb.nim4
-rw-r--r--tests/pragmas/tlocks.nim3
7 files changed, 13 insertions, 2 deletions
diff --git a/tests/metatype/ttypedesc3.nim b/tests/metatype/ttypedesc3.nim
index 98a59f613..d3a58853d 100644
--- a/tests/metatype/ttypedesc3.nim
+++ b/tests/metatype/ttypedesc3.nim
@@ -1,5 +1,6 @@
 discard """
-output: '''
+  matrix: "--mm:arc; --mm:refc"
+  output: '''
 proc Base
 proc Child
 method Base
diff --git a/tests/method/tgeneric_methods.nim b/tests/method/tgeneric_methods.nim
index 0e2aeeede..ab92c66d8 100644
--- a/tests/method/tgeneric_methods.nim
+++ b/tests/method/tgeneric_methods.nim
@@ -1,4 +1,5 @@
 discard """
+  matrix: "--mm:arc; --mm:refc"
   output: '''wow2
 X 1
 X 3'''
diff --git a/tests/method/tmethod_issues.nim b/tests/method/tmethod_issues.nim
index df4c3771a..13467f2b3 100644
--- a/tests/method/tmethod_issues.nim
+++ b/tests/method/tmethod_issues.nim
@@ -1,4 +1,5 @@
 discard """
+  matrix: "--mm:arc; --mm:refc"
   output: '''
 wof!
 wof!
diff --git a/tests/method/tmethod_various.nim b/tests/method/tmethod_various.nim
index fd022717b..f9d067a72 100644
--- a/tests/method/tmethod_various.nim
+++ b/tests/method/tmethod_various.nim
@@ -1,4 +1,5 @@
 discard """
+  matrix: "--mm:arc; --mm:refc"
   output: '''
 do nothing
 HELLO WORLD!
diff --git a/tests/method/tsingle_methods.nim b/tests/method/tsingle_methods.nim
index 40269559a..b564e7d87 100644
--- a/tests/method/tsingle_methods.nim
+++ b/tests/method/tsingle_methods.nim
@@ -1,5 +1,5 @@
 discard """
-  cmd: "nim c --multimethods:off $file"
+  matrix: "--mm:arc --multimethods:off; --mm:refc --multimethods:off"
   output: '''base
 base
 base
diff --git a/tests/misc/parsecomb.nim b/tests/misc/parsecomb.nim
index 4ff2f65d2..4f149cbf6 100644
--- a/tests/misc/parsecomb.nim
+++ b/tests/misc/parsecomb.nim
@@ -1,3 +1,7 @@
+discard """
+  matrix: "--mm:arc; --mm:refc"
+"""
+
 type Input[T] = object
   toks: seq[T]
   index: int
diff --git a/tests/pragmas/tlocks.nim b/tests/pragmas/tlocks.nim
index ba66a2dca..6c2a9f9e9 100644
--- a/tests/pragmas/tlocks.nim
+++ b/tests/pragmas/tlocks.nim
@@ -1,3 +1,6 @@
+discard """
+  matrix: "--mm:arc; --mm:refc"
+"""
 
 type SomeBase* = ref object of RootObj
 type SomeDerived* = ref object of SomeBase