updated tests to be executed

This commit is contained in:
Arne Döring 2018-11-14 23:14:16 +01:00 • committed by Araq
commit e012eb1001
57 changed files with 341 additions and 90 deletions

View file

@ -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")