summary refs log tree commit diff stats
path: root/tests/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cpp')
-rw-r--r--tests/cpp/t8241.nim11
-rw-r--r--tests/cpp/tcasts.nim12
-rw-r--r--tests/cpp/tnativesockets.nim1
-rw-r--r--tests/cpp/tsigbreak.nim1
4 files changed, 23 insertions, 2 deletions
diff --git a/tests/cpp/t8241.nim b/tests/cpp/t8241.nim
index cbee1d85a..9aed13fcb 100644
--- a/tests/cpp/t8241.nim
+++ b/tests/cpp/t8241.nim
@@ -20,4 +20,13 @@ proc findlib2: string =
 proc imported_func2*(a: cint): cstring {.importc, dynlib: findlib2().}
 
 echo imported_func(1)
-echo imported_func2(1)
\ No newline at end of file
+echo imported_func2(1)
+
+# issue #8946
+
+from json import JsonParsingError
+import marshal
+
+const nothing = ""
+doAssertRaises(JsonParsingError):
+  var bar = marshal.to[int](nothing)
diff --git a/tests/cpp/tcasts.nim b/tests/cpp/tcasts.nim
index 24ebb8f62..d968d87db 100644
--- a/tests/cpp/tcasts.nim
+++ b/tests/cpp/tcasts.nim
@@ -1,6 +1,6 @@
 discard """
   cmd: "nim cpp $file"
-  output: ""
+  output: '''{"vas": "kas", "123": "123"}'''
   targets: "cpp"
 """
 
@@ -9,3 +9,13 @@ block: #5979
   var p: pointer = cast[pointer](a)
   var c = cast[char](p)
   doAssert(c == 'a')
+
+
+#----------------------------------------------------
+# bug #9739
+import tables
+
+var t = initTable[string, string]()
+discard t.hasKeyOrPut("123", "123")
+discard t.mgetOrPut("vas", "kas")
+echo t
\ No newline at end of file
diff --git a/tests/cpp/tnativesockets.nim b/tests/cpp/tnativesockets.nim
index c62008050..1284811b5 100644
--- a/tests/cpp/tnativesockets.nim
+++ b/tests/cpp/tnativesockets.nim
@@ -1,5 +1,6 @@
 discard """
   targets: "cpp"
+outputsub: ""
 """
 
 import nativesockets
diff --git a/tests/cpp/tsigbreak.nim b/tests/cpp/tsigbreak.nim
index 9a381d84f..14d29adf7 100644
--- a/tests/cpp/tsigbreak.nim
+++ b/tests/cpp/tsigbreak.nim
@@ -1,5 +1,6 @@
 discard """
   targets: "cpp"
+  action: compile
 """
 
 import tables, lists