diff options
Diffstat (limited to 'lib/pure/unittest.nim')
-rw-r--r-- | lib/pure/unittest.nim | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/pure/unittest.nim b/lib/pure/unittest.nim index db3e5a1db..7f70811b0 100644 --- a/lib/pure/unittest.nim +++ b/lib/pure/unittest.nim @@ -50,8 +50,9 @@ proc printStatus*(s: TestStatus, name: string) = styledEcho styleBright, color, "[", $s, "] ", fgWhite, name, "\n" template test*(name: expr, body: stmt): stmt = - if bind shouldRun(name): - bind checkpoints = @[] + bind shouldRun, checkPoints + if shouldRun(name): + checkpoints = @[] var TestStatusIMPL = OK try: @@ -67,7 +68,8 @@ proc checkpoint*(msg: string) = # TODO: add support for something like SCOPED_TRACE from Google Test template fail* = - for msg in items(bind checkpoints): + bind checkpoints + for msg in items(checkpoints): echo msg if AbortOnError: quit(1) |