diff options
-rw-r--r-- | tests/pragmas/tpragmas_misc.nim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/pragmas/tpragmas_misc.nim b/tests/pragmas/tpragmas_misc.nim new file mode 100644 index 000000000..247fa471e --- /dev/null +++ b/tests/pragmas/tpragmas_misc.nim @@ -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) |