better tester

This commit is contained in:
Araq 2014-01-17 08:47:51 +01:00
commit 383fbca27e
21 changed files with 39 additions and 31 deletions

23
tests/macros/tmacro1.nim Normal file
View file

@ -0,0 +1,23 @@
import macros
from uri import `/`
macro test*(a: stmt): stmt {.immediate.} =
var nodes: tuple[a, b: int]
nodes.a = 4
nodes[1] = 45
type
TTypeEx = object
x, y: int
case b: bool
of false: nil
of true: z: float
var t: TTypeEx
t.b = true
t.z = 4.5
test:
"hi"