summary refs log tree commit diff stats
path: root/tests/run
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2012-09-23 19:33:54 +0300
committerZahary Karadjov <zahary@gmail.com>2012-09-23 19:34:20 +0300
commit27dc9fcb8fb3da176d207e84109d8ae9229a3135 (patch)
tree6f4d357bc5a1c3f4ae543c8f1a2bc811ded1868e /tests/run
parent15dcb9a6a66162d25392eac78d0b3418358d8a12 (diff)
downloadNim-27dc9fcb8fb3da176d207e84109d8ae9229a3135.tar.gz
fixes #186 and the ttypedesc1 test case
Diffstat (limited to 'tests/run')
-rw-r--r--tests/run/ttypedesc1.nim14
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/run/ttypedesc1.nim b/tests/run/ttypedesc1.nim
index b74440176..eedb00792 100644
--- a/tests/run/ttypedesc1.nim
+++ b/tests/run/ttypedesc1.nim
@@ -19,16 +19,18 @@ proc foo(T: typedesc[int or bool]): string =
 template foo(T: typedesc[seq]): expr = "seq"
 
 test "types can be used as proc params":
-  check foo(TFoo[int, float], 1000) == "TFoo 1000"
+  # XXX: `check` needs to know that TFoo[int, float] is a type and 
+  # cannot be assigned for a local variable for later inspection
+  check ((foo(TFoo[int, float], 1000) == "TFoo 1000"))
   
   var f = 10.0
-  check foo(float, "long string") == "float true"
-  check foo(type(f), [1, 2, 3]) == "float false"
+  check ((foo(float, "long string") == "float true"))
+  check ((foo(type(f), [1, 2, 3]) == "float false"))
   
-  check foo(int) == "int or bool 10"
+  check ((foo(int) == "int or bool 10"))
 
-  check foo(seq[int]) == "seq"
-  check foo(seq[TFoo[bool, string]]) == "seq"
+  check ((foo(seq[int]) == "seq"))
+  check ((foo(seq[TFoo[bool, string]]) == "seq"))
 
 when false:
   proc foo(T: typedesc[seq], s: T) = nil