diff options
author | Araq <rumpf_a@web.de> | 2017-03-18 20:57:45 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2017-03-18 20:57:45 +0100 |
commit | aa4260ffa86cf4059bad71587364194bef141de0 (patch) | |
tree | a26d0a759b064838d4b2a003031447e136501c67 /lib | |
parent | 242fb3240f0a5f96952f3cd8902341f3ec701ca2 (diff) | |
download | Nim-aa4260ffa86cf4059bad71587364194bef141de0.tar.gz |
overloading resolution for getAst; breaking change
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/unittest.nim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/pure/unittest.nim b/lib/pure/unittest.nim index dd7009d63..1163b7440 100644 --- a/lib/pure/unittest.nim +++ b/lib/pure/unittest.nim @@ -324,8 +324,8 @@ macro check*(conditions: untyped): untyped = case checked.kind of nnkCallKinds: - template rewrite(call, lineInfoLit: expr, callLit: string, - argAssgs, argPrintOuts: stmt): stmt = + template rewrite(call, lineInfoLit, callLit, + argAssgs, argPrintOuts) = block: argAssgs #all callables (and assignments) are run here if not call: @@ -345,8 +345,8 @@ macro check*(conditions: untyped): untyped = result.add(newCall(!"check", checked[i])) else: - template rewrite(Exp, lineInfoLit: expr, expLit: string): stmt = - if not Exp: + template rewrite(exp, lineInfoLit, expLit) = + if not exp: checkpoint(lineInfoLit & ": Check failed: " & expLit) fail() |