diff options
Diffstat (limited to 'lib/pure/unittest.nim')
-rw-r--r-- | lib/pure/unittest.nim | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/pure/unittest.nim b/lib/pure/unittest.nim index cdca02ed7..49e24037a 100644 --- a/lib/pure/unittest.nim +++ b/lib/pure/unittest.nim @@ -24,7 +24,7 @@ ## echo "run before each test" ## ## teardown: -## echo "run after each test": +## echo "run after each test" ## ## test "essential truths": ## # give up and stop if this fails @@ -95,7 +95,7 @@ proc shouldRun(testName: string): bool = result = true proc startSuite(name: string) = - template rawPrint() = echo("\n[Suite] ", name) + template rawPrint() = echo("\n[Suite] ", name) when not defined(ECMAScript): if colorOutput: styledEcho styleBright, fgBlue, "\n[Suite] ", resetStyle, name @@ -134,15 +134,15 @@ template suite*(name, body) {.dirty.} = ## [OK] (2 + -2) != 4 block: bind startSuite - template setup(setupBody: untyped) {.dirty.} = - var testSetupIMPLFlag = true + template setup(setupBody: untyped) {.dirty, used.} = + var testSetupIMPLFlag {.used.} = true template testSetupIMPL: untyped {.dirty.} = setupBody - template teardown(teardownBody: untyped) {.dirty.} = - var testTeardownIMPLFlag = true + template teardown(teardownBody: untyped) {.dirty, used.} = + var testTeardownIMPLFlag {.used.} = true template testTeardownIMPL: untyped {.dirty.} = teardownBody - let testInSuiteImplFlag = true + let testInSuiteImplFlag {.used.} = true startSuite name body |