Fix multiple requires in a test

This commit is contained in:
Nycto
2015-08-01 18:48:41 -07:00
parent 1b4116702b
commit eac484167c
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() =