diff options
author | Araq <rumpf_a@web.de> | 2017-11-21 01:42:58 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2017-11-21 01:42:58 +0100 |
commit | 1bbab827c494d41cc87d6cb94524f5f23c54fe88 (patch) | |
tree | 4fbc478c72dbdc0dd5b84e6b1e581e7fa934d91e /tests/cpp | |
parent | fba5f5acd6ab1b0aaca79241f55f95b089fbad2c (diff) | |
parent | 2ad49836d95f5d825ba271d64cab1c312f3ccc31 (diff) | |
download | Nim-1bbab827c494d41cc87d6cb94524f5f23c54fe88.tar.gz |
Merge branch 'devel' of github.com:nim-lang/Nim into devel
Diffstat (limited to 'tests/cpp')
-rw-r--r-- | tests/cpp/tasync_cpp.nim | 2 | ||||
-rw-r--r-- | tests/cpp/tcasts.nim | 10 | ||||
-rw-r--r-- | tests/cpp/tcovariancerules.nim | 2 | ||||
-rw-r--r-- | tests/cpp/tcppraise.nim | 2 | ||||
-rw-r--r-- | tests/cpp/tdont_init_instantiation.nim | 2 | ||||
-rw-r--r-- | tests/cpp/tembarrassing_generic_failure.nim | 1 | ||||
-rw-r--r-- | tests/cpp/temitlist.nim | 2 | ||||
-rw-r--r-- | tests/cpp/tempty_generic_obj.nim | 2 | ||||
-rw-r--r-- | tests/cpp/tgen_prototype_for_importc.nim | 2 | ||||
-rw-r--r-- | tests/cpp/tget_subsystem.nim | 2 | ||||
-rw-r--r-- | tests/cpp/tnativesockets.nim | 2 | ||||
-rw-r--r-- | tests/cpp/treturn_array.nim | 3 | ||||
-rw-r--r-- | tests/cpp/tsigbreak.nim | 2 | ||||
-rw-r--r-- | tests/cpp/tstaticvar_via_typedesc.nim | 2 | ||||
-rw-r--r-- | tests/cpp/ttemplatetype.nim | 4 | ||||
-rw-r--r-- | tests/cpp/tthread_createthread.nim | 1 | ||||
-rw-r--r-- | tests/cpp/ttypeinfo.nim | 2 | ||||
-rw-r--r-- | tests/cpp/ttypeinfo2.nim | 2 | ||||
-rw-r--r-- | tests/cpp/tvector_iterator.nim | 2 | ||||
-rw-r--r-- | tests/cpp/tvectorseq.nim | 2 |
20 files changed, 34 insertions, 15 deletions
diff --git a/tests/cpp/tasync_cpp.nim b/tests/cpp/tasync_cpp.nim index ec78ae26c..a5e3374b6 100644 --- a/tests/cpp/tasync_cpp.nim +++ b/tests/cpp/tasync_cpp.nim @@ -1,5 +1,5 @@ discard """ - cmd: "nim cpp $file" + targets: "cpp" output: "hello" """ diff --git a/tests/cpp/tcasts.nim b/tests/cpp/tcasts.nim new file mode 100644 index 000000000..35f06234d --- /dev/null +++ b/tests/cpp/tcasts.nim @@ -0,0 +1,10 @@ +discard """ + cmd: "nim cpp $file" + output: "" +""" + +block: #5979 + var a = 'a' + var p: pointer = cast[pointer](a) + var c = cast[char](p) + doAssert(c == 'a') diff --git a/tests/cpp/tcovariancerules.nim b/tests/cpp/tcovariancerules.nim index dfe4cb941..9365a3a18 100644 --- a/tests/cpp/tcovariancerules.nim +++ b/tests/cpp/tcovariancerules.nim @@ -1,5 +1,5 @@ discard """ -cmd: "nim cpp $file" +targets: "cpp" output: ''' cat cat diff --git a/tests/cpp/tcppraise.nim b/tests/cpp/tcppraise.nim index a9ea8e6ce..7db9c0cfa 100644 --- a/tests/cpp/tcppraise.nim +++ b/tests/cpp/tcppraise.nim @@ -1,5 +1,5 @@ discard """ - cmd: "nim cpp $file" + targets: "cpp" output: '''foo bar Need odd and >= 3 digits## diff --git a/tests/cpp/tdont_init_instantiation.nim b/tests/cpp/tdont_init_instantiation.nim index 652cb1414..fe487fba0 100644 --- a/tests/cpp/tdont_init_instantiation.nim +++ b/tests/cpp/tdont_init_instantiation.nim @@ -1,5 +1,5 @@ discard """ - cmd: "nim cpp $file" + targets: "cpp" output: '''''' disabled: true """ diff --git a/tests/cpp/tembarrassing_generic_failure.nim b/tests/cpp/tembarrassing_generic_failure.nim index 3c31dcdb8..4b5050948 100644 --- a/tests/cpp/tembarrassing_generic_failure.nim +++ b/tests/cpp/tembarrassing_generic_failure.nim @@ -1,4 +1,5 @@ discard """ + targets: "cpp" cmd: "nim cpp --threads:on $file" """ diff --git a/tests/cpp/temitlist.nim b/tests/cpp/temitlist.nim index cef0fc52d..a7a8ebde4 100644 --- a/tests/cpp/temitlist.nim +++ b/tests/cpp/temitlist.nim @@ -1,5 +1,5 @@ discard """ - cmd: "nim cpp $file" + targets: "cpp" output: '''6.0''' """ diff --git a/tests/cpp/tempty_generic_obj.nim b/tests/cpp/tempty_generic_obj.nim index e2957a5cd..b4c746a30 100644 --- a/tests/cpp/tempty_generic_obj.nim +++ b/tests/cpp/tempty_generic_obj.nim @@ -1,5 +1,5 @@ discard """ - cmd: "nim cpp $file" + targets: "cpp" output: '''int float''' """ diff --git a/tests/cpp/tgen_prototype_for_importc.nim b/tests/cpp/tgen_prototype_for_importc.nim index 91f34755b..4e5a197a8 100644 --- a/tests/cpp/tgen_prototype_for_importc.nim +++ b/tests/cpp/tgen_prototype_for_importc.nim @@ -1,5 +1,5 @@ discard """ - cmd: "nim cpp $file" + targets: "cpp" output: '''Hello world''' """ diff --git a/tests/cpp/tget_subsystem.nim b/tests/cpp/tget_subsystem.nim index 81009dd39..e9a3fabdd 100644 --- a/tests/cpp/tget_subsystem.nim +++ b/tests/cpp/tget_subsystem.nim @@ -1,5 +1,5 @@ discard """ - cmd: "nim cpp $file" + targets: "cpp" """ {.emit: """ diff --git a/tests/cpp/tnativesockets.nim b/tests/cpp/tnativesockets.nim index 6108380a8..c62008050 100644 --- a/tests/cpp/tnativesockets.nim +++ b/tests/cpp/tnativesockets.nim @@ -1,5 +1,5 @@ discard """ - cmd: "nim cpp $file" + targets: "cpp" """ import nativesockets diff --git a/tests/cpp/treturn_array.nim b/tests/cpp/treturn_array.nim index ba4fbd6cc..432b9ce3b 100644 --- a/tests/cpp/treturn_array.nim +++ b/tests/cpp/treturn_array.nim @@ -1,3 +1,6 @@ +discard """ + targets: "cpp" +""" # bug #2259 type Mat4f* = array[0..15, float] diff --git a/tests/cpp/tsigbreak.nim b/tests/cpp/tsigbreak.nim index c8044f2bf..9a381d84f 100644 --- a/tests/cpp/tsigbreak.nim +++ b/tests/cpp/tsigbreak.nim @@ -1,5 +1,5 @@ discard """ - cmd: "nim cpp $file" + targets: "cpp" """ import tables, lists diff --git a/tests/cpp/tstaticvar_via_typedesc.nim b/tests/cpp/tstaticvar_via_typedesc.nim index 7a9fa2afc..0d8f424d0 100644 --- a/tests/cpp/tstaticvar_via_typedesc.nim +++ b/tests/cpp/tstaticvar_via_typedesc.nim @@ -1,5 +1,5 @@ discard """ - cmd: "nim cpp $file" + targets: "cpp" output: "42" """ diff --git a/tests/cpp/ttemplatetype.nim b/tests/cpp/ttemplatetype.nim index 7f56a225d..ef24e4cdc 100644 --- a/tests/cpp/ttemplatetype.nim +++ b/tests/cpp/ttemplatetype.nim @@ -1,3 +1,7 @@ +discard """ + targets: "cpp" +""" + type Map {.importcpp: "std::map", header: "<map>".} [T,U] = object diff --git a/tests/cpp/tthread_createthread.nim b/tests/cpp/tthread_createthread.nim index 363136e9d..b46b876b7 100644 --- a/tests/cpp/tthread_createthread.nim +++ b/tests/cpp/tthread_createthread.nim @@ -1,4 +1,5 @@ discard """ + targets: "cpp" cmd: "nim cpp --hints:on --threads:on $options $file" """ diff --git a/tests/cpp/ttypeinfo.nim b/tests/cpp/ttypeinfo.nim index 282c682b2..97825f452 100644 --- a/tests/cpp/ttypeinfo.nim +++ b/tests/cpp/ttypeinfo.nim @@ -1,6 +1,6 @@ discard """ + targets: "cpp" output: '''100''' - cmd: "nim cpp $file" """ import typeinfo diff --git a/tests/cpp/ttypeinfo2.nim b/tests/cpp/ttypeinfo2.nim index 64bd43e96..e3661c848 100644 --- a/tests/cpp/ttypeinfo2.nim +++ b/tests/cpp/ttypeinfo2.nim @@ -1,5 +1,5 @@ discard """ - cmd: "nim cpp $file" + targets: "cpp" """ # bug #2841 import typeinfo diff --git a/tests/cpp/tvector_iterator.nim b/tests/cpp/tvector_iterator.nim index cb5ab33af..9df3754ba 100644 --- a/tests/cpp/tvector_iterator.nim +++ b/tests/cpp/tvector_iterator.nim @@ -1,5 +1,5 @@ discard """ - cmd: "nim cpp $file" + targets: "cpp" """ {.emit: """ diff --git a/tests/cpp/tvectorseq.nim b/tests/cpp/tvectorseq.nim index 6eb5dc9e4..4d9ffc3d6 100644 --- a/tests/cpp/tvectorseq.nim +++ b/tests/cpp/tvectorseq.nim @@ -1,7 +1,7 @@ discard """ + targets: "cpp" output: '''(x: 1.0) (x: 0.0)''' - cmd: "nim cpp $file" disabled: "true" """ |