Skip to content

Commit

Permalink
add test for define, undef (nim-lang#14443)
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour authored and EchoPouet committed Jun 13, 2020
1 parent f28b0e7 commit 55c5b32
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/pragmas/tpragmas_misc.nim
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 55c5b32

Please sign in to comment.