add `dualTest` which tests both compile-time and runtime
This commit is contained in:
parent
333e74fa2d
commit
262b697f38
|
@ -1149,13 +1149,21 @@ template runtimeTest*(nameParam: string, body: untyped) =
|
|||
|
||||
template staticTest*(nameParam: string, body: untyped) =
|
||||
## Similar to `test` but runs only at compiletime, no matter the
|
||||
## `unittest2Static` setting
|
||||
## `unittest2Static` flag
|
||||
static:
|
||||
block:
|
||||
echo "[Test ] ", nameParam
|
||||
body
|
||||
echo "[", TestStatus.OK, " ] ", nameParam
|
||||
|
||||
template dualTest*(nameParam: string, body: untyped) =
|
||||
## Similar to `test` but run the test both compuletime and run time, no
|
||||
## matter the `unittest2Static` flag
|
||||
staticTest nameParam:
|
||||
body
|
||||
runtimeTest nameParam:
|
||||
body
|
||||
|
||||
template test*(nameParam: string, body: untyped) =
|
||||
## Define a single test case identified by `name`.
|
||||
##
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
mode = ScriptMode.Verbose
|
||||
|
||||
version = "0.2.0"
|
||||
version = "0.2.1"
|
||||
author = "Status Research & Development GmbH"
|
||||
description = "unittest fork with support for parallel test execution"
|
||||
license = "MIT"
|
||||
|
|
Loading…
Reference in New Issue