Removed test code from coro.nim and created three real tests for coroutines

This commit is contained in:
Rokas Kupstys 2017-02-20 17:03:39 +02:00
commit 5aef77a3d3
8 changed files with 71 additions and 92 deletions

View file

@ -2471,12 +2471,15 @@ template coroutinesSupportedPlatform(): bool =
true
when defined(nimCoroutines):
# Explicit opt-in.
when not coroutinesSupportedPlatform():
{.error: "Coroutines are not supported on this architecture and/or garbage collector.".}
const nimCoroutines* = true
elif defined(noNimCoroutines):
# Explicit opt-out.
const nimCoroutines* = false
else:
# Autodetect coroutine support.
const nimCoroutines* = false
{.push checks: off.}