-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fe109b1
commit 708ec11
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |