mirror of
https://github.com/status-im/nim-unittest2.git
synced 2025-02-20 13:48:09 +00:00
mark runTest() as "fastcall"
to get proper error messages about variable access that would make it a closure - which we can't have in a spawned proc. "nimcall" doesn't work here, because of https://github.com/nim-lang/Nim/issues/8473
This commit is contained in:
parent
65f6fb7ef2
commit
37d4ee81df
@ -578,7 +578,10 @@ template test*(name, body) =
|
|||||||
|
|
||||||
# `gensym` can't be in here because it's not a first-class pragma
|
# `gensym` can't be in here because it's not a first-class pragma
|
||||||
when paralleliseTests:
|
when paralleliseTests:
|
||||||
{.pragma: testrunner, gcsafe.}
|
# We use "fastcall" to get proper error messages about variable access that
|
||||||
|
# would make runTest() a closure - which we can't have in a spawned proc.
|
||||||
|
# "nimcall" doesn't work here, because of https://github.com/nim-lang/Nim/issues/8473
|
||||||
|
{.pragma: testrunner, gcsafe, fastcall.}
|
||||||
else:
|
else:
|
||||||
{.pragma: testrunner.}
|
{.pragma: testrunner.}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user