tests themselves contain the expected result

This commit is contained in:
Araq 2011-02-20 20:12:22 +01:00
commit 2cdfe35e73
144 changed files with 957 additions and 200 deletions

View file

@ -1,3 +1,7 @@
discard """
file: "tcurrncy.nim"
output: "25"
"""
template Additive(typ: typeDesc): stmt =
proc `+` *(x, y: typ): typ {.borrow.}
proc `-` *(x, y: typ): typ {.borrow.}
@ -30,3 +34,5 @@ DefineCurrency(TDollar, int)
DefineCurrency(TEuro, int)
echo($( 12.TDollar + 13.TDollar )) #OUT 25