blob: 50793c3d6ed2d30d0974d76ee8b2812575340568 (
plain) (
tree)
|
|
discard """
file: "tassert.nim"
outputsub: "assertion failure!this shall be always written"
"""
# test assert and exception handling
proc callB() = assert(False)
proc callA() = callB()
proc callC() = callA()
try:
callC()
except EAssertionFailed:
write(stdout, "assertion failure!")
except:
write(stdout, "unknown exception!")
finally:
system.write(stdout, "this shall be always written")
assert(false) #OUT assertion failure!this shall be always written
|