summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--doc/testament.rst2
-rw-r--r--testament/testament.nim2
-rw-r--r--tests/float/tfloatmod.nim2
-rw-r--r--tests/misc/taddr.nim (renamed from tests/js/taddr.nim)28
-rw-r--r--tests/osproc/passenv.nim2
-rw-r--r--tests/stdlib/tfrexp1.nim2
6 files changed, 18 insertions, 20 deletions
diff --git a/doc/testament.rst b/doc/testament.rst
index 09c248d1f..1a1909022 100644
--- a/doc/testament.rst
+++ b/doc/testament.rst
@@ -26,7 +26,7 @@ Options
 * ``--print``                   Also print results to the console
 * ``--simulate``                See what tests would be run but don't run them (for debugging)
 * ``--failing``                 Only show failing/ignored tests
-* ``--targets:"c c++ js objc"`` Run tests for specified targets (default: all)
+* ``--targets:"c cpp js objc"`` Run tests for specified targets (default: all)
 * ``--nim:path``                Use a particular nim executable (default: ``$PATH/nim``)
 * ``--directory:dir``           Change to directory dir before reading the tests or doing anything else.
 * ``--colors:on|off``           Turn messages coloring on|off.
diff --git a/testament/testament.nim b/testament/testament.nim
index 8fead76ef..2912b03ab 100644
--- a/testament/testament.nim
+++ b/testament/testament.nim
@@ -41,7 +41,7 @@ Options:
   --print                   also print results to the console
   --simulate                see what tests would be run but don't run them (for debugging)
   --failing                 only show failing/ignored tests
-  --targets:"c c++ js objc" run tests for specified targets (default: all)
+  --targets:"c cpp js objc" run tests for specified targets (default: all)
   --nim:path                use a particular nim executable (default: $$PATH/nim)
   --directory:dir           Change to directory dir before reading the tests or doing anything else.
   --colors:on|off           Turn messages coloring on|off.
diff --git a/tests/float/tfloatmod.nim b/tests/float/tfloatmod.nim
index 0b84ec7e0..37546a64c 100644
--- a/tests/float/tfloatmod.nim
+++ b/tests/float/tfloatmod.nim
@@ -1,5 +1,5 @@
 discard """
-  targets: "c c++ js"
+  targets: "c cpp js"
   output: "ok"
   exitcode: "0"
 """
diff --git a/tests/js/taddr.nim b/tests/misc/taddr.nim
index 9c45621a8..4d0aebc01 100644
--- a/tests/js/taddr.nim
+++ b/tests/misc/taddr.nim
@@ -1,5 +1,6 @@
 discard """
-  targets: "c js"
+  targets: "c cpp js"
+  matrix: "; -d:release"
 """
 
 type T = object
@@ -79,7 +80,7 @@ someGlobalPtr[] = 10
 doAssert(someGlobal == 10)
 
 block:
-  # issue #14576
+  # bug #14576
   # lots of these used to give: Error: internal error: genAddr: 2
   proc byLent[T](a: T): lent T = a
   proc byPtr[T](a: T): ptr T = a.unsafeAddr
@@ -89,24 +90,21 @@ block:
     let (x,y) = byLent(a)
     doAssert (x,y) == a
 
-  block:
-    when defined(c) and defined(release):
-      # bug; pending https://github.com/nim-lang/Nim/issues/14578
-      discard
-    else:
-      let a = 10
-      doAssert byLent(a) == 10
-      let a2 = byLent(a)
-      doAssert a2 == 10
+  block: # (with -d:release) bug #14578
+    let a = 10
+    doAssert byLent(a) == 10
+    let a2 = byLent(a)
+    doAssert a2 == 10
 
   block:
-    let a = [11,12]
-    doAssert byLent(a) == [11,12]
+    when not defined(cpp): # pending bug #15958
+      let a = [11,12]
+      doAssert byLent(a) == [11,12]
     let a2 = (11,)
     doAssert byLent(a2) == (11,)
 
   block:
-    when defined(c) and defined(release):
+    when (defined(c) or defined(cpp)) and defined(release):
       discard # probably not a bug since optimizer is free to pass by value, and `unsafeAddr` is used
     else:
       var a = @[12]
@@ -134,6 +132,6 @@ block:
     bar(a2).inc
     doAssert a2 == 13
 
-  block: # xxx: bug this doesn't work
+  block: # pending bug #15959
     when false:
       proc byLent2[T](a: T): lent type(a[0]) = a[0]
diff --git a/tests/osproc/passenv.nim b/tests/osproc/passenv.nim
index 815f7536f..40b1c3f7c 100644
--- a/tests/osproc/passenv.nim
+++ b/tests/osproc/passenv.nim
@@ -1,7 +1,7 @@
 discard """
   file: "passenv.nim"
   output: "123"
-  targets: "c c++ objc"
+  targets: "c cpp objc"
 """
 
 import osproc, os, strtabs
diff --git a/tests/stdlib/tfrexp1.nim b/tests/stdlib/tfrexp1.nim
index 6da185420..21ecc7491 100644
--- a/tests/stdlib/tfrexp1.nim
+++ b/tests/stdlib/tfrexp1.nim
@@ -1,5 +1,5 @@
 discard """
-  targets: "js c c++"
+  targets: "js c cpp"
   output: '''ok'''
 """