summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--testament/lib/stdtest/testutils.nim6
1 files changed, 4 insertions, 2 deletions
diff --git a/testament/lib/stdtest/testutils.nim b/testament/lib/stdtest/testutils.nim
index 6d8620dc7..a5476b8d7 100644
--- a/testament/lib/stdtest/testutils.nim
+++ b/testament/lib/stdtest/testutils.nim
@@ -107,10 +107,12 @@ macro assertAll*(body) =
   # remove this once these support VM, pending #10129 (closed but not yet fixed)
   result = newStmtList()
   for a in body:
-    result.add genAst(a) do:
+    result.add genAst(a, a2 = a.repr, info = lineInfo(a)) do:
       # D20210421T014713:here
       # xxx pending https://github.com/nim-lang/Nim/issues/12030,
       # `typeof` should introduce its own scope, so that this
       # is sufficient: `typeof(a)` instead of `typeof(block: a)`
       when typeof(block: a) is void: a
-      else: doAssert a
+      else:
+        if not a:
+          raise newException(AssertionDefect, info & " " & a2)