Skip to content

Commit

Permalink
fix #10261 unittest now returns 1 on error instead of buggy behavior (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour authored and Araq committed Jan 11, 2019
1 parent ab425d7 commit 540d102
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/pure/unittest.nim
Expand Up @@ -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,
Expand Down Expand Up @@ -540,7 +540,7 @@ template fail* =
when declared(testStatusIMPL):
testStatusIMPL = FAILED
else:
programResult += 1
programResult = 1

ensureInitialized()

Expand Down

0 comments on commit 540d102

Please sign in to comment.