disable some tests for the C++ target; refs #7870
This commit is contained in:
parent
c5c4da4f3c
commit
9a05fd9dcf
8 changed files with 25 additions and 44 deletions
|
|
@ -1,34 +0,0 @@
|
|||
discard """
|
||||
output: '''i: 1
|
||||
success'''
|
||||
"""
|
||||
|
||||
type
|
||||
ESomething = object of Exception
|
||||
ESomeOtherErr = object of Exception
|
||||
|
||||
proc genErrors(s: string) =
|
||||
if s == "error!":
|
||||
raise newException(ESomething, "Test")
|
||||
else:
|
||||
raise newException(EsomeotherErr, "bla")
|
||||
|
||||
proc foo() =
|
||||
var i = 0
|
||||
try:
|
||||
inc i
|
||||
onRaise(proc (e: ref Exception): bool =
|
||||
echo "i: ", i)
|
||||
genErrors("errssor!")
|
||||
except ESomething:
|
||||
echo("ESomething happened")
|
||||
except:
|
||||
echo("Some other error happened")
|
||||
|
||||
# test that raise handler is gone:
|
||||
try:
|
||||
genErrors("error!")
|
||||
except ESomething:
|
||||
echo "success"
|
||||
|
||||
foo()
|
||||
Loading…
Add table
Add a link
Reference in a new issue