diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2023-01-18 16:03:03 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-18 09:03:03 +0100 |
commit | c4035d7f7c424caa81ee449d2032ecd8e8967ebd (patch) | |
tree | 06f70bfa42a11c1f0fc9a689d86410a65c2490fb | |
parent | cc08a9015e446471be8b734c2895d99c91c59cb3 (diff) | |
download | Nim-c4035d7f7c424caa81ee449d2032ecd8e8967ebd.tar.gz |
fixes unittest warnings (#21271)
-rw-r--r-- | lib/pure/unittest.nim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/pure/unittest.nim b/lib/pure/unittest.nim index c87fe38f1..9dafa8f03 100644 --- a/lib/pure/unittest.nim +++ b/lib/pure/unittest.nim @@ -544,11 +544,14 @@ template test*(name, body) {.dirty.} = for formatter in formatters: formatter.testStarted(name) + {.warning[BareExcept]:off.} try: when declared(testSetupIMPLFlag): testSetupIMPL() when declared(testTeardownIMPLFlag): defer: testTeardownIMPL() + {.warning[BareExcept]:on.} body + {.warning[BareExcept]:off.} except: let e = getCurrentException() @@ -570,6 +573,7 @@ template test*(name, body) {.dirty.} = ) testEnded(testResult) checkpoints = @[] + {.warning[BareExcept]:on.} proc checkpoint*(msg: string) = ## Set a checkpoint identified by `msg`. Upon test failure all |