Merge pull request #3172 from Nycto/devel

Unittest module: Fix multiple requires in a test
This commit is contained in:
Dominik Picheta
2015-08-05 19:42:14 +01:00
2 changed files with 6 additions and 1 deletions

View File

@@ -285,7 +285,7 @@ macro check*(conditions: stmt): stmt {.immediate.} =
result = getAst(rewrite(checked, checked.lineinfo, checked.toStrLit))
template require*(conditions: stmt): stmt {.immediate, dirty.} =
template require*(conditions: stmt): stmt {.immediate.} =
## Same as `check` except any failed test causes the program to quit
## immediately. Any teardown statements are not executed and the failed
## test output is not generated.

View File

@@ -21,6 +21,11 @@ test "unittest typedescs":
check(none(int) != some(1))
test "unittest multiple requires":
require(true)
require(true)
import math
from strutils import parseInt
proc defectiveRobot() =