add test for define, undef (#14443)
This commit is contained in:
parent
acae3b02c7
commit
a008f591e2
1 changed files with 12 additions and 0 deletions
12
tests/pragmas/tpragmas_misc.nim
Normal file
12
tests/pragmas/tpragmas_misc.nim
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
##[
|
||||||
|
tests for misc pragmas that don't need a separate file
|
||||||
|
]##
|
||||||
|
|
||||||
|
block:
|
||||||
|
static: doAssert not defined(tpragmas_misc_def)
|
||||||
|
{.undef(tpragmas_misc_def).} # works even if not set
|
||||||
|
static: doAssert not defined(tpragmas_misc_def)
|
||||||
|
{.define(tpragmas_misc_def).}
|
||||||
|
static: doAssert defined(tpragmas_misc_def)
|
||||||
|
{.undef(tpragmas_misc_def).}
|
||||||
|
static: doAssert not defined(tpragmas_misc_def)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue