tester reports ignored tests and supports 'nimout'; fixes #2211
This commit is contained in:
parent
dc8b07fe0b
commit
335c19c869
7 changed files with 48 additions and 10 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue