summary refs log tree commit diff stats
path: root/tests/assert/tassert_c.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/assert/tassert_c.nim')
-rw-r--r--tests/assert/tassert_c.nim15
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/assert/tassert_c.nim b/tests/assert/tassert_c.nim
index 84ccea823..e3e3b8147 100644
--- a/tests/assert/tassert_c.nim
+++ b/tests/assert/tassert_c.nim
@@ -1,14 +1,14 @@
 discard """
-  cmd: "nim $target $options --excessiveStackTrace:off $file"
+  matrix: "-d:nimPreviewSlimSystem --stackTrace:on --excessiveStackTrace:off"
   output: '''true'''
 """
-
+import std/assertions
 const expected = """
 tassert_c.nim(35)        tassert_c
 tassert_c.nim(34)        foo
-assertions.nim(27)       failedAssertImpl
-assertions.nim(20)       raiseAssert
-fatal.nim(55)            sysFatal"""
+assertions.nim(*)       failedAssertImpl
+assertions.nim(*)       raiseAssert
+"""
 
 proc tmatch(x, p: string): bool =
   var i = 0
@@ -33,7 +33,8 @@ try:
   proc foo() =
     assert(false)
   foo()
-except AssertionError:
+except AssertionDefect:
   let e = getCurrentException()
   let trace = e.getStackTrace
-  echo tmatch(trace, expected)
+  if tmatch(trace, expected): echo true
+  else: echo "wrong trace:\n" & trace