fixes #8223
This commit is contained in:
parent
fc0bcccc15
commit
ae09879b3a
1 changed files with 2 additions and 3 deletions
|
|
@ -4128,11 +4128,10 @@ template doAssertRaises*(exception, code: untyped): typed =
|
|||
## .. code-block:: nim
|
||||
## doAssertRaises(ValueError):
|
||||
## raise newException(ValueError, "Hello World")
|
||||
# TODO: investigate why runnableExamples here caused
|
||||
# https://github.com/nim-lang/Nim/issues/8223
|
||||
var wrong = false
|
||||
try:
|
||||
code
|
||||
if true:
|
||||
code
|
||||
wrong = true
|
||||
except exception:
|
||||
discard
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue