new tester; all tests categorized

This commit is contained in:
Araq 2014-01-13 02:10:03 +01:00
commit 20b5f31c03
481 changed files with 794 additions and 2506 deletions

View file

@ -0,0 +1,12 @@
import macros, typetraits
macro checkType(ex, expected: expr): stmt {.immediate.} =
var t = ex.typ
assert t.name == expected.strVal
proc voidProc = echo "hello"
proc intProc(a, b): int = 10
checkType(voidProc(), "void")
checkType(intProc(10, 20.0), "int")
checkType(noproc(10, 20.0), "Error Type")