Skip to content

Commit

Permalink
doAssert => check
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed Nov 27, 2018
1 parent 98404e4 commit 80f739c
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions tests/tnimterop_c.nim
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import std/unittest
import nimterop/cimport

cDebug()
Expand All @@ -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
Expand All @@ -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()

0 comments on commit 80f739c

Please sign in to comment.