tester reports ignored tests and supports 'nimout'; fixes #2211

This commit is contained in:
Araq 2015-02-25 12:59:19 +01:00
commit 335c19c869
7 changed files with 48 additions and 10 deletions

View file

@ -1,16 +1,16 @@
discard """
disabled: true
nimout: '''void
int'''
"""
import macros, typetraits
import macros
macro checkType(ex, expected: expr): stmt {.immediate.} =
var t = ex.typ
assert t.name == expected.strVal
macro checkType(ex: stmt; expected: expr): stmt =
var t = ex.getType()
echo t
proc voidProc = echo "hello"
proc intProc(a, b): int = 10
proc intProc(a: int, b: float): int = 10
checkType(voidProc(), "void")
checkType(intProc(10, 20.0), "int")
checkType(noproc(10, 20.0), "Error Type")