add test for define, undef (#14443)

This commit is contained in:
Timothee Cour 2020-05-25 02:17:25 -07:00 • committed by GitHub
commit a008f591e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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)