diff options
Diffstat (limited to 'tests/tnimterop_cpp.nim')
| -rw-r--r-- | tests/tnimterop_cpp.nim | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/tnimterop_cpp.nim b/tests/tnimterop_cpp.nim new file mode 100644 index 0000000..bed052c --- /dev/null +++ b/tests/tnimterop_cpp.nim @@ -0,0 +1,17 @@ +import nimterop/cimport +import unittest + +cDebug() + +cIncludeDir "$projpath/include" +cAddSearchDir "$projpath/include" +cCompile cSearchPath "test2.cpp" +cImport cSearchPath "test2.hpp" + +check TEST_INT == 512 +check TEST_FLOAT == 5.12 +check TEST_HEX == 0x512 +check test_call_int() == 5 + +var foo: Foo +check foo.bar == 0 |
