doAssert => check

This commit is contained in:
Timothee Cour 2018-11-27 18:27:59 -05:00
commit c1ea14c0d3

View file

@ -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()