diff options
Diffstat (limited to 'tests/coroutines/texceptions.nim')
-rw-r--r-- | tests/coroutines/texceptions.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/coroutines/texceptions.nim b/tests/coroutines/texceptions.nim index e67f954c3..323eb055d 100644 --- a/tests/coroutines/texceptions.nim +++ b/tests/coroutines/texceptions.nim @@ -14,6 +14,7 @@ proc testExceptions(id: int, sleep: float) = numbers.add(id) raise (ref ValueError)() except: + suspend(sleep) numbers.add(id) suspend(sleep) numbers.add(id) @@ -22,6 +23,6 @@ proc testExceptions(id: int, sleep: float) = start(proc() = testExceptions(1, 0.01)) start(proc() = testExceptions(2, 0.011)) -run() +coro.run() doAssert(stackCheckValue == 1100220033, "Thread stack got corrupted") doAssert(numbers == @[1, 2, 1, 2, 1, 2, 1, 2, 1, 2], "Coroutines executed in incorrect order") |