summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAman Gupta <aman@tmm1.net>2015-10-02 18:56:57 -0700
committerAman Gupta <aman@tmm1.net>2015-10-02 18:56:57 -0700
commitb33d97621d9e0c73d9512e74b44407394858eb08 (patch)
treee32ad25809f280bf646f69c56c6eb9fc2d39ee59 /lib
parent2fbdf9320c43b1a8b8ca0a7b28ffdda6680c5237 (diff)
downloadNim-b33d97621d9e0c73d9512e74b44407394858eb08.tar.gz
only compile coro.nim by avoiding "when isMainModule" string match in
testament/tester

FAIL: coro.nim
Test "lib/pure/coro.nim" in category "lib"
Failure: reOutputsDiffer
Expected:

Gotten:
c1
c2
c2
c1
c2
c1
c2
c1
c1 exits
c2 exits
done 1100220033
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/coro.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/coro.nim b/lib/pure/coro.nim
index 8fa529474..c5724f26f 100644
--- a/lib/pure/coro.nim
+++ b/lib/pure/coro.nim
@@ -119,7 +119,7 @@ proc wait*(c: proc(), interval=0.01) =
   while alive(c):
     suspend interval
 
-when isMainModule:
+when defined(nimCoroutines) and isMainModule:
   var stackCheckValue = 1100220033
   proc c2()