more lent iterators (#30)

* more lent iterators

* bump
This commit is contained in:
Jacek Sieka 2023-08-22 17:26:10 +02:00 committed by GitHub
parent 0b44f30d9b
commit 299bc9a574
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -651,6 +651,7 @@ proc suiteStarted(name: string) =
withLock formattersLock:
{.gcsafe.}:
for formatter in formatters:
let formatter = formatter # avoid lent iterator
formatter.suiteStarted(name)
proc suiteEnded() =
@ -659,12 +660,14 @@ proc suiteEnded() =
withLock formattersLock:
{.gcsafe.}:
for formatter in formatters:
let formatter = formatter # avoid lent iterator
formatter.suiteEnded()
proc testStarted(name: string) =
withLock formattersLock:
{.gcsafe.}:
for formatter in formatters:
let formatter = formatter # avoid lent iterator
if not formatter.isNil:
# Useless check that somehow prevents a method dispatch failure on macOS
formatter.testStarted(name)
@ -673,6 +676,7 @@ proc testEnded(testResult: TestResult) =
withLock formattersLock:
{.gcsafe.}:
for formatter in formatters:
let formatter = formatter # avoid lent iterator
when paralleliseTests:
withLock outputLock:
formatter.testEnded(testResult)

View File

@ -1,8 +1,8 @@
mode = ScriptMode.Verbose
version = "0.0.8"
version = "0.0.9"
author = "Status Research & Development GmbH"
description = "unittest fork with support for parallel test execution"
license = "MIT"
requires "nim >= 1.2.0"
requires "nim >= 1.6.0"