mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 09:24:36 +00:00
see sigmatch as an example. tests are compiled only when the compiler is compiled with -d:selftest to execute them, just run the resulting binary without arguments
6 lines
128 B
Nim
6 lines
128 B
Nim
template tests*(body: stmt) {.immediate.} =
|
|
when defined(selftest):
|
|
when not defined(unittest): import unittest
|
|
body
|
|
|