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":
|
task test, "Test":
|
||||||
execCmd "nim c -r tests/tnimterop_c.nim"
|
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"
|
execCmd "nim cpp -r tests/tnimterop_cpp.nim"
|
||||||
# when defined(windows):
|
# when defined(windows):
|
||||||
# execCmd "nim c -r tests/tmath.nim"
|
# execCmd "nim c -r tests/tmath.nim"
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,9 @@ extern "C" {
|
||||||
#define OSDEF 30
|
#define OSDEF 30
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define foobar1(x) OSDEF * x
|
||||||
|
#define foobar2(x) x + 1
|
||||||
|
|
||||||
typedef uint8_t PRIMTYPE;
|
typedef uint8_t PRIMTYPE;
|
||||||
typedef PRIMTYPE CUSTTYPE;
|
typedef PRIMTYPE CUSTTYPE;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,10 @@ elif defined(windows):
|
||||||
else:
|
else:
|
||||||
check OSDEF == 30
|
check OSDEF == 30
|
||||||
|
|
||||||
|
block:
|
||||||
|
# workaround for https://github.com/nim-lang/Nim/issues/10129
|
||||||
|
const ok = OSDEF
|
||||||
|
|
||||||
var
|
var
|
||||||
pt: PRIMTYPE
|
pt: PRIMTYPE
|
||||||
ct: CUSTTYPE
|
ct: CUSTTYPE
|
||||||
|
|
@ -79,3 +83,10 @@ check e3 == enum7
|
||||||
check e4 == enum11
|
check e4 == enum11
|
||||||
|
|
||||||
cAddStdDir()
|
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