Removed test code from coro.nim and created three real tests for coroutines
This commit is contained in:
parent
f80ddbbcc6
commit
5aef77a3d3
8 changed files with 71 additions and 92 deletions
|
|
@ -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.}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue