Skip to content

Commit 9d569a7

Browse files
committed
add test
1 parent 8d89302 commit 9d569a7

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/stdlib/tasserts.nim

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#[
2+
see also tassert2
3+
]#
4+
5+
import std/asserts
6+
import std/strutils
7+
8+
9+
10+
# line 10
11+
block: ## checks AST isn't transformed as it used to
12+
let a = 1
13+
enforce a == 1
14+
try:
15+
enforce a > 1
16+
except CatchableError as e:
17+
echo e.msg
18+
assert e.msg.endsWith "tasserts.nim(15, 13) `a > 1` "
19+
doAssertRaises(CatchableError): enforce a > 1

0 commit comments

Comments
 (0)