mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 22:10:33 +00:00
add test for define, undef (#14443)
This commit is contained in:
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)
|
||||
Reference in New Issue
Block a user