diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2023-11-30 21:05:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-30 14:05:45 +0100 |
commit | b5f5b74fc8308593f04e3bc11f7c5ead24b73eb5 (patch) | |
tree | e373a39deab03649a8fbc4bed9a9c0582f48ba64 /tests | |
parent | 9140f8e2212c91347704cec0f98c0345ddf0ea1e (diff) | |
download | Nim-b5f5b74fc8308593f04e3bc11f7c5ead24b73eb5.tar.gz |
enable vtable implementation for C++ and make it an experimental feature (#23004)
follow up https://github.com/nim-lang/Nim/pull/22991 - [x] turning it into an experimental feature --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/config.nims | 3 | ||||
-rw-r--r-- | tests/generics/tobjecttyperel.nim | 2 | ||||
-rw-r--r-- | tests/method/tgeneric_methods.nim | 2 | ||||
-rw-r--r-- | tests/method/tmethods_old.nim | 2 | ||||
-rw-r--r-- | tests/method/tvtable.nim | 5 |
5 files changed, 9 insertions, 5 deletions
diff --git a/tests/config.nims b/tests/config.nims index 0e58c7c14..690123c4a 100644 --- a/tests/config.nims +++ b/tests/config.nims @@ -44,5 +44,4 @@ switch("define", "nimPreviewNonVarDestructor") switch("warningAserror", "UnnamedBreak") switch("legacy", "verboseTypeMismatch") -switch("define", "nimPreviewVtables") - +switch("experimental", "vtables") diff --git a/tests/generics/tobjecttyperel.nim b/tests/generics/tobjecttyperel.nim index 0349184bb..6f223c154 100644 --- a/tests/generics/tobjecttyperel.nim +++ b/tests/generics/tobjecttyperel.nim @@ -1,5 +1,5 @@ discard """ - matrix: "-u:nimPreviewVtables" + matrix: "-d:nimInternalNonVtablesTesting" output: '''(peel: 0, color: 15) (color: 15) 17 diff --git a/tests/method/tgeneric_methods.nim b/tests/method/tgeneric_methods.nim index 0f1e7e1f0..f8d068cc5 100644 --- a/tests/method/tgeneric_methods.nim +++ b/tests/method/tgeneric_methods.nim @@ -1,5 +1,5 @@ discard """ - matrix: "--mm:arc --multimethods:on -u:nimPreviewVtables; --mm:refc --multimethods:on -u:nimPreviewVtables" + matrix: "--mm:arc --multimethods:on -d:nimInternalNonVtablesTesting; --mm:refc --multimethods:on -d:nimInternalNonVtablesTesting" output: '''wow2 X 1 X 3''' diff --git a/tests/method/tmethods_old.nim b/tests/method/tmethods_old.nim index cd3f67217..d24eb0cc7 100644 --- a/tests/method/tmethods_old.nim +++ b/tests/method/tmethods_old.nim @@ -1,5 +1,5 @@ discard """ - matrix: "--mm:arc -u:nimPreviewVtables" + matrix: "--mm:arc -d:nimInternalNonVtablesTesting" output: ''' do nothing ''' diff --git a/tests/method/tvtable.nim b/tests/method/tvtable.nim index 8d98dd42c..a1b33d6b7 100644 --- a/tests/method/tvtable.nim +++ b/tests/method/tvtable.nim @@ -1,3 +1,7 @@ +discard """ + targets: "c cpp" +""" + type FooBase = ref object of RootObj dummy: int type Foo = ref object of FooBase @@ -15,5 +19,6 @@ method bar(x: Foo2, a: float32) = proc test() = var x = new Foo2 x.bar(2.3) + doAssert x.value <= 2.3 test() \ No newline at end of file |