aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/tnimterop_c.nim17
1 files changed, 9 insertions, 8 deletions
diff --git a/tests/tnimterop_c.nim b/tests/tnimterop_c.nim
index 1f2aaab..eff7039 100644
--- a/tests/tnimterop_c.nim
+++ b/tests/tnimterop_c.nim
@@ -1,3 +1,4 @@
+import std/unittest
import nimterop/cimport
cDebug()
@@ -8,9 +9,9 @@ cAddSearchDir "$projpath/include"
cCompile cSearchPath("test.c")
cImport cSearchPath "test.h"
-doAssert TEST_INT == 512
-doAssert TEST_FLOAT == 5.12
-doAssert TEST_HEX == 0x512
+check TEST_INT == 512
+check TEST_FLOAT == 5.12
+check TEST_HEX == 0x512
var
pt: PRIMTYPE
@@ -37,10 +38,10 @@ s3.field1 = 7
e = enum1
e2 = enum4
-doAssert test_call_int() == 5
-doAssert test_call_int_param(5).field1 == 5
-doAssert test_call_int_param2(5, s2).field1 == 11
-doAssert test_call_int_param3(5, s).field1 == 10
-doAssert test_call_int_param4(e) == e2
+check test_call_int() == 5
+check test_call_int_param(5).field1 == 5
+check test_call_int_param2(5, s2).field1 == 11
+check test_call_int_param3(5, s).field1 == 10
+check test_call_int_param4(e) == e2
cAddStdDir()