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
5 lines
128 B
Nim
5 lines
128 B
Nim
template tests*(body: stmt) {.immediate.} =
|
|
when defined(selftest):
|
|
when not defined(unittest): import unittest
|
|
body
|
|
|