* refs #68 macro=>proc cSkipSymbol * refs #68 macro=>proc cDebug * refs #68 macro=>proc cDisableCaching * refs #68 notes for cDefine * refs #68 macro=>proc cAddSearchDir ; improve some runnableExamples * refs #68 macro=>proc cAddStdDir * $projpath/include => testsIncludeDir() everywhere * disable $projpath interpolation (error prone) * fix tests * make nim doc part of test suite; fix for 0.19.2
20 lines
365 B
Nim
20 lines
365 B
Nim
import unittest
|
|
import nimterop/cimport
|
|
import nimterop/paths
|
|
|
|
static:
|
|
cDebug()
|
|
cDisableCaching()
|
|
cAddSearchDir testsIncludeDir()
|
|
|
|
cIncludeDir testsIncludeDir()
|
|
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
|