summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-09-08 22:33:15 +0200
committerAraq <rumpf_a@web.de>2012-09-08 22:33:15 +0200
commit46f652b93eec44f25de25df9e9362448d857bfbe (patch)
tree43fa7b37d6768cac4f81b64a36c243cd5583096d /tests
parent580d85d233044b22c98ad8b6cae2369b250c289f (diff)
downloadNim-46f652b93eec44f25de25df9e9362448d857bfbe.tar.gz
unittest bugfix; made some tests green
Diffstat (limited to 'tests')
-rw-r--r--tests/patterns/tmatrix.nim4
-rw-r--r--tests/run/tenumitems.nim2
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/patterns/tmatrix.nim b/tests/patterns/tmatrix.nim
index 5074e068d..1d411ad25 100644
--- a/tests/patterns/tmatrix.nim
+++ b/tests/patterns/tmatrix.nim
@@ -12,9 +12,11 @@ proc `*`(a, b: TMat): TMat = nil
 proc `+`(a, b: TMat): TMat = nil
 proc `-`(a, b: TMat): TMat = nil
 proc `$`(a: TMat): string = result = $a.dummy
+proc mat32(): TMat =
+  result.dummy = 21
 
 macro optOps{ (`+`|`-`|`*`) *| a }(a: TMat): expr =
-  result = callsite()
+  result = newCall(bindSym"mat32")
 
 #macro optPlus{ `+` * a }(a: varargs[TMat]): expr =
 #  result = newIntLitNode(21)
diff --git a/tests/run/tenumitems.nim b/tests/run/tenumitems.nim
index f4f04e2c0..db4c6b554 100644
--- a/tests/run/tenumitems.nim
+++ b/tests/run/tenumitems.nim
@@ -5,7 +5,7 @@ discard """
 type TAlphabet = enum
   A, B, C
 
-iterator items(E: typedesc{enum}): E =
+iterator items(E: typedesc[enum]): E =
   for v in low(E)..high(E):
     yield v