add test for raise-only patterns (#391)
* add test for raise-only patterns https://github.com/status-im/nim-chronos/issues/56 * fix
This commit is contained in:
parent
148ddf49c2
commit
4c07da6abb
|
@ -139,3 +139,20 @@ suite "Closure iterator's exception transformation issues":
|
|||
answer.inc(10)
|
||||
waitFor(a())
|
||||
check answer == 42
|
||||
|
||||
test "raise-only":
|
||||
# https://github.com/status-im/nim-chronos/issues/56
|
||||
proc trySync() {.async.} =
|
||||
return
|
||||
|
||||
proc x() {.async.} =
|
||||
try:
|
||||
await trySync()
|
||||
return
|
||||
except ValueError:
|
||||
discard
|
||||
|
||||
raiseAssert "shouldn't reach"
|
||||
|
||||
waitFor(x())
|
||||
|
||||
|
|
Loading…
Reference in New Issue