fix #10261 unittest now returns 1 on error instead of buggy behavior (#10264)

This commit is contained in:
Timothee Cour
2019-01-10 22:59:20 -08:00
committed by Andreas Rumpf
parent ab425d793a
commit 540d102d87

View File

@@ -499,7 +499,7 @@ template test*(name, body) {.dirty.} =
finally:
if testStatusIMPL == FAILED:
programResult += 1
programResult = 1
let testResult = TestResult(
suiteName: when declared(testSuiteName): testSuiteName else: "",
testName: name,
@@ -540,7 +540,7 @@ template fail* =
when declared(testStatusIMPL):
testStatusIMPL = FAILED
else:
programResult += 1
programResult = 1
ensureInitialized()