updated tests to be executed
This commit is contained in:
parent
8ea72bdcea
commit
e012eb1001
57 changed files with 341 additions and 90 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue