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

17
tests/macros/typesapi.nim Normal file
View file

@ -0,0 +1,17 @@
discard """
nimout: '''proc (x: int): string => typeDesc[proc[string, int]]
proc (x: int): void => typeDesc[proc[void, int]]
proc (x: int) => typeDesc[proc[void, int]]'''
"""
#2211
import macros
macro showType(t:stmt): stmt =
let ty = t.getType
echo t.repr, " => ", ty.repr
showType(proc(x:int): string)
showType(proc(x:int): void)
showType(proc(x:int))