summary refs log tree commit diff stats
path: root/tests/assert
diff options
context:
space:
mode:
authorawr1 <41453959+awr1@users.noreply.github.com>2018-08-23 03:20:58 -0500
committerAndreas Rumpf <rumpf_a@web.de>2018-08-23 10:20:58 +0200
commitbf973d29da48fc6e6d6eeedce3adda84e0b45a64 (patch)
tree9cb106d9241997c8401bf6a7de7a4a1c49e8d7e6 /tests/assert
parent52bee6baba1b5aeb5abe763c06478cd3139a5a84 (diff)
downloadNim-bf973d29da48fc6e6d6eeedce3adda84e0b45a64.tar.gz
Fixes #8719 (onFailedAssert now works for doAssert) (#8731)
Diffstat (limited to 'tests/assert')
-rw-r--r--tests/assert/tfaileddoassert.nim11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/assert/tfaileddoassert.nim b/tests/assert/tfaileddoassert.nim
new file mode 100644
index 000000000..3195fb406
--- /dev/null
+++ b/tests/assert/tfaileddoassert.nim
@@ -0,0 +1,11 @@
+discard """
+  cmd: "nim $target -d:release $options $file"
+  output: '''
+assertion occured!!!!!! false
+'''
+"""
+
+onFailedAssert(msg):
+  echo("assertion occured!!!!!! ", msg)
+
+doAssert(1 == 2)