summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2019-01-10 22:59:20 -0800
committerAndreas Rumpf <rumpf_a@web.de>2019-01-11 07:59:20 +0100
commit540d102d87645394d1f6e1c5116f9507a269882c (patch)
tree4b14d1ce5d0b701010d56f1c0eef89e781cd52b6 /lib/pure
parentab425d793af1a5c0b221bfbeab382b4781479c63 (diff)
downloadNim-540d102d87645394d1f6e1c5116f9507a269882c.tar.gz
fix #10261 unittest now returns 1 on error instead of buggy behavior (#10264)
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/unittest.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/unittest.nim b/lib/pure/unittest.nim
index 135a24e9a..ce147cccc 100644
--- a/lib/pure/unittest.nim
+++ b/lib/pure/unittest.nim
@@ -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()