Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed Oct 18, 2020
1 parent fe109b1 commit 708ec11
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/stdlib/tasserts.nim
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#[
see also tassert2
]#

import std/asserts
import std/strutils



# line 10
block: ## checks AST isn't transformed as it used to
let a = 1
enforce a == 1
try:
enforce a > 1
except CatchableError as e:
echo e.msg
assert e.msg.endsWith "tasserts.nim(15, 13) `a > 1` "
doAssertRaises(CatchableError): enforce a > 1

0 comments on commit 708ec11

Please sign in to comment.