fix stand-alone "check" for <Nim-1.4.0
and prevent a theoretical integer overflow
This commit is contained in:
parent
06063acac7
commit
72a6ae5ce6
|
@ -177,3 +177,7 @@ when defined(testing):
|
|||
check false == matchFilter("suite1", "foo", "*ite2::")
|
||||
check matchFilter("suite1", "q**we::foo", "q**we::foo")
|
||||
check matchFilter("suite1", "a::b*c::d*e", "a::b*c::d*e")
|
||||
|
||||
# Also supposed to work outside tests:
|
||||
check 1 == 1
|
||||
|
||||
|
|
|
@ -687,7 +687,7 @@ template test*(name, body) =
|
|||
|
||||
finally:
|
||||
if testStatusIMPL == TestStatus.FAILED:
|
||||
programResult += 1
|
||||
programResult = 1
|
||||
let testResult = TestResult(
|
||||
suiteName: testSuiteName,
|
||||
testName: name,
|
||||
|
@ -734,7 +734,7 @@ template fail* =
|
|||
when declared(testStatusIMPL):
|
||||
testStatusIMPL = TestStatus.FAILED
|
||||
else:
|
||||
setProgramResult 1
|
||||
programResult = 1
|
||||
|
||||
ensureInitialized()
|
||||
|
||||
|
|
Loading…
Reference in New Issue