examples from the talk part of test suite

This commit is contained in:
Araq 2013-09-27 08:45:14 +02:00
commit 2f0671eb79
9 changed files with 153 additions and 3 deletions

View file

@ -0,0 +1,11 @@
import macros
macro check(ex: expr): stmt =
var info = ex.lineinfo
var expString = ex.toStrLit
result = quote do:
if not `ex`:
echo `info`, ": Check failed: ", `expString`
check 1 < 2