add failing tests; add a test at CT
This commit is contained in:
parent
1e086d5959
commit
9f7d2ca956
3 changed files with 15 additions and 1 deletions
|
|
@ -18,7 +18,7 @@ proc execCmd(cmd:string)=
|
|||
|
||||
task test, "Test":
|
||||
execCmd "nim c -r tests/tnimterop_c.nim"
|
||||
#execCmd "nim cpp -r tests/tnimterop_c.nim"
|
||||
# execCmd "nim cpp -r tests/tnimterop_c.nim"
|
||||
execCmd "nim cpp -r tests/tnimterop_cpp.nim"
|
||||
# when defined(windows):
|
||||
# execCmd "nim c -r tests/tmath.nim"
|
||||
|
|
|
|||
|
|
@ -20,6 +20,9 @@ extern "C" {
|
|||
#define OSDEF 30
|
||||
#endif
|
||||
|
||||
#define foobar1(x) OSDEF * x
|
||||
#define foobar2(x) x + 1
|
||||
|
||||
typedef uint8_t PRIMTYPE;
|
||||
typedef PRIMTYPE CUSTTYPE;
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,10 @@ elif defined(windows):
|
|||
else:
|
||||
check OSDEF == 30
|
||||
|
||||
block:
|
||||
# workaround for https://github.com/nim-lang/Nim/issues/10129
|
||||
const ok = OSDEF
|
||||
|
||||
var
|
||||
pt: PRIMTYPE
|
||||
ct: CUSTTYPE
|
||||
|
|
@ -79,3 +83,10 @@ check e3 == enum7
|
|||
check e4 == enum11
|
||||
|
||||
cAddStdDir()
|
||||
|
||||
## failing tests
|
||||
when false:
|
||||
static: # Error: undeclared identifier: 'foobar1'
|
||||
doAssert foobar1(3) == OSDEF * 3
|
||||
when false: # Error: undeclared identifier: 'foobar2'
|
||||
doAssert foobar2(3) == 3 + 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue