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
|
## .. code-block:: nim
|
||||||
## doAssertRaises(ValueError):
|
## doAssertRaises(ValueError):
|
||||||
## raise newException(ValueError, "Hello World")
|
## raise newException(ValueError, "Hello World")
|
||||||
# TODO: investigate why runnableExamples here caused
|
|
||||||
# https://github.com/nim-lang/Nim/issues/8223
|
|
||||||
var wrong = false
|
var wrong = false
|
||||||
try:
|
try:
|
||||||
code
|
if true:
|
||||||
|
code
|
||||||
wrong = true
|
wrong = true
|
||||||
except exception:
|
except exception:
|
||||||
discard
|
discard
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue