diff options
author | Araq <rumpf_a@web.de> | 2019-11-25 16:54:43 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-11-26 16:04:28 +0100 |
commit | 80b508d33727a5b2fd8a3abd49df004e7d5c5138 (patch) | |
tree | 61024aab41dcc42de667612f12c024c43b24df17 /tests/assert/tdoassert.nim | |
parent | 72237e2bcfc371d917e4e14b22a3c447289ea39f (diff) | |
download | Nim-80b508d33727a5b2fd8a3abd49df004e7d5c5138.tar.gz |
test suite: rename tests containing 'fail' for easier search in logs
Diffstat (limited to 'tests/assert/tdoassert.nim')
-rw-r--r-- | tests/assert/tdoassert.nim | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/assert/tdoassert.nim b/tests/assert/tdoassert.nim new file mode 100644 index 000000000..fa9893505 --- /dev/null +++ b/tests/assert/tdoassert.nim @@ -0,0 +1,20 @@ +discard """ + cmd: "nim $target -d:release $options $file" + output: ''' +test1:ok +test2:ok +''' +""" + +import testhelper + +onFailedAssert(msg): + checkMsg(msg, "tdoassert.nim(15, 9) `a == 2` foo", "test1") + +var a = 1 +doAssert(a == 2, "foo") + +onFailedAssert(msg): + checkMsg(msg, "tdoassert.nim(20, 10) `a == 3` ", "test2") + +doAssert a == 3 |