unit test for #100

unittest: the check macro will print only the non-literal part of the checked expression
tests/run: added tunittests.nim as a single central executable where unittests could be added for quicker compilation/execution of the test suite
This commit is contained in:
Zahary Karadjov 2012-03-10 17:26:34 +02:00
commit f9876d379d
4 changed files with 26 additions and 5 deletions

View file

@ -89,7 +89,12 @@ type
PNimrodNode* = expr
## represents a Nimrod AST node. Macros operate on this type.
const
nnkLiterals* = {nnkCharLit..nnkNilLit}
nnkCallKinds* = {nnkCall, nnkInfix, nnkPrefix, nnkPostfix, nnkCommand,
nnkCallStrLit}
# Nodes should be reference counted to make the `copy` operation very fast!
# However, this is difficult to achieve: modify(n[0][1]) should propagate to
# its father. How to do this without back references? Hm, BS, it works without