aboutsummaryrefslogtreecommitdiff
path: root/tests/tnimterop_cpp.nim
blob: bed052c99ad0795c1d3eaef2d51a819a46d2a084 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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