summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authoryglukhov <yuriy.glukhov@gmail.com>2015-05-27 16:48:10 +0300
committeryglukhov <yuriy.glukhov@gmail.com>2015-05-29 10:48:14 +0300
commitc5f7d553e969bd90223570059c199c8459b16a54 (patch)
tree7f991ea3806c9fd2aed21029c94dae4002b63e46 /lib
parentd270c8ebe8b35f4c9bdf23e4153f299e7919bdb7 (diff)
downloadNim-c5f7d553e969bd90223570059c199c8459b16a54.tar.gz
Perform lambda lifting for compile-time stuff when targeting JS. Enable unittest test.
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/unittest.nim9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/pure/unittest.nim b/lib/pure/unittest.nim
index 092b1fba2..dbbd3cabc 100644
--- a/lib/pure/unittest.nim
+++ b/lib/pure/unittest.nim
@@ -99,8 +99,9 @@ template test*(name: expr, body: stmt): stmt {.immediate, dirty.} =
       body
 
     except:
-      checkpoint("Unhandled exception: " & getCurrentExceptionMsg())
-      echo getCurrentException().getStackTrace()
+      when not defined(js):
+        checkpoint("Unhandled exception: " & getCurrentExceptionMsg())
+        echo getCurrentException().getStackTrace()
       fail()
 
     finally:
@@ -114,9 +115,7 @@ proc checkpoint*(msg: string) =
 template fail* =
   bind checkpoints
   for msg in items(checkpoints):
-    # this used to be 'echo' which now breaks due to a bug. XXX will revisit
-    # this issue later.
-    stdout.writeln msg
+    echo msg
 
   when not defined(ECMAScript):
     if abortOnError: quit(1)