parent
c8954b2b34
commit
310b73b556
2 changed files with 8 additions and 2 deletions
|
|
@ -375,7 +375,6 @@ template test*(name, body) {.dirty.} =
|
||||||
ensureFormattersInitialized()
|
ensureFormattersInitialized()
|
||||||
|
|
||||||
if shouldRun(name):
|
if shouldRun(name):
|
||||||
var stackTrace {.inject.}: string
|
|
||||||
checkpoints = @[]
|
checkpoints = @[]
|
||||||
var testStatusIMPL {.inject.} = OK
|
var testStatusIMPL {.inject.} = OK
|
||||||
|
|
||||||
|
|
@ -391,7 +390,7 @@ template test*(name, body) {.dirty.} =
|
||||||
except:
|
except:
|
||||||
when not defined(js):
|
when not defined(js):
|
||||||
checkpoint("Unhandled exception: " & getCurrentExceptionMsg())
|
checkpoint("Unhandled exception: " & getCurrentExceptionMsg())
|
||||||
stackTrace = getCurrentException().getStackTrace()
|
var stackTrace {.inject.} = getCurrentException().getStackTrace()
|
||||||
fail()
|
fail()
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
|
|
|
||||||
|
|
@ -96,5 +96,12 @@ suite "bug #4494":
|
||||||
check:
|
check:
|
||||||
allIt(0..3, tags[it] != tags[it + 1])
|
allIt(0..3, tags[it] != tags[it + 1])
|
||||||
|
|
||||||
|
suite "bug #5571":
|
||||||
|
test "can define gcsafe procs within tests":
|
||||||
|
proc doTest {.gcsafe.} =
|
||||||
|
let line = "a"
|
||||||
|
check: line == "a"
|
||||||
|
doTest()
|
||||||
|
|
||||||
static:
|
static:
|
||||||
echo "compile end"
|
echo "compile end"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue