From 540d102d87645394d1f6e1c5116f9507a269882c Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Thu, 10 Jan 2019 22:59:20 -0800 Subject: [PATCH] fix #10261 unittest now returns 1 on error instead of buggy behavior (#10264) --- lib/pure/unittest.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pure/unittest.nim b/lib/pure/unittest.nim index 135a24e9a866..ce147cccce65 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()