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 | |
parent | 72237e2bcfc371d917e4e14b22a3c447289ea39f (diff) | |
download | Nim-80b508d33727a5b2fd8a3abd49df004e7d5c5138.tar.gz |
test suite: rename tests containing 'fail' for easier search in logs
-rw-r--r-- | testament/testament.nim | 2 | ||||
-rw-r--r-- | tests/assert/tassert2.nim (renamed from tests/assert/tfailedassert.nim) | 20 | ||||
-rw-r--r-- | tests/assert/tassert_c.nim (renamed from tests/assert/tfailedassert_stacktrace.nim) | 10 | ||||
-rw-r--r-- | tests/assert/tdoassert.nim (renamed from tests/assert/tfaileddoassert.nim) | 4 | ||||
-rw-r--r-- | tests/cpp/tembarrassing_generic_bug.nim (renamed from tests/cpp/tembarrassing_generic_failure.nim) | 0 | ||||
-rw-r--r-- | tests/testament/tshould_not_work.nim (renamed from tests/testament/tshouldfail.nim) | 0 |
6 files changed, 18 insertions, 18 deletions
diff --git a/testament/testament.nim b/testament/testament.nim index 86ef12d8c..a36cad20b 100644 --- a/testament/testament.nim +++ b/testament/testament.nim @@ -246,7 +246,7 @@ proc `$`(x: TResults): string = proc addResult(r: var TResults, test: TTest, target: TTarget, expected, given: string, successOrig: TResultEnum) = # test.name is easier to find than test.name.extractFilename - # A bit hacky but simple and works with tests/testament/tshouldfail.nim + # A bit hacky but simple and works with tests/testament/tshould_not_work.nim var name = test.name.replace(DirSep, '/') name.add " " & $target & test.options diff --git a/tests/assert/tfailedassert.nim b/tests/assert/tassert2.nim index 32600c82d..804e5708b 100644 --- a/tests/assert/tfailedassert.nim +++ b/tests/assert/tassert2.nim @@ -8,7 +8,7 @@ test5:ok test6:ok test7:ok -1 -tfailedassert.nim +tassert2.nim test8:ok test9:ok test10:ok @@ -29,17 +29,17 @@ echo("") try: doAssert(false, "msg1") # doAssert test except AssertionError as e: - checkMsg(e.msg, "tfailedassert.nim(30, 11) `false` msg1", "test1") + checkMsg(e.msg, "tassert2.nim(30, 11) `false` msg1", "test1") try: assert false, "msg2" # assert test except AssertionError as e: - checkMsg(e.msg, "tfailedassert.nim(35, 10) `false` msg2", "test2") + checkMsg(e.msg, "tassert2.nim(35, 10) `false` msg2", "test2") try: assert false # assert test with no msg except AssertionError as e: - checkMsg(e.msg, "tfailedassert.nim(40, 10) `false` ", "test3") + checkMsg(e.msg, "tassert2.nim(40, 10) `false` ", "test3") try: let a = 1 @@ -80,12 +80,12 @@ block: proc bar: int = # local overrides that are active only in this proc onFailedAssert(msg): - checkMsg(msg, "tfailedassert.nim(85, 11) `false` first assertion from bar", "test6") + checkMsg(msg, "tassert2.nim(85, 11) `false` first assertion from bar", "test6") assert(false, "first assertion from bar") onFailedAssert(msg): - checkMsg(msg, "tfailedassert.nim(91, 11) `false` second assertion from bar", "test7") + checkMsg(msg, "tassert2.nim(91, 11) `false` second assertion from bar", "test7") return -1 assert(false, "second assertion from bar") @@ -98,7 +98,7 @@ block: except: let e = EMyError(getCurrentException()) echo e.lineinfo.filename - checkMsg(e.msg, "tfailedassert.nim(77, 11) `false` assertion from foo", "test8") + checkMsg(e.msg, "tassert2.nim(77, 11) `false` assertion from foo", "test8") block: ## checks for issue https://github.com/nim-lang/Nim/issues/8518 template fun(a: string): string = @@ -109,14 +109,14 @@ block: ## checks for issue https://github.com/nim-lang/Nim/issues/8518 doAssert fun("foo1") == fun("foo2"), "mymsg" except AssertionError as e: # used to expand out the template instantiaiton, sometimes filling hundreds of lines - checkMsg(e.msg, """tfailedassert.nim(109, 14) `fun("foo1") == fun("foo2")` mymsg""", "test9") + checkMsg(e.msg, """tassert2.nim(109, 14) `fun("foo1") == fun("foo2")` mymsg""", "test9") block: ## checks for issue https://github.com/nim-lang/Nim/issues/9301 try: doAssert 1 + 1 == 3 except AssertionError as e: # used to const fold as false - checkMsg(e.msg, "tfailedassert.nim(116, 14) `1 + 1 == 3` ", "test10") + checkMsg(e.msg, "tassert2.nim(116, 14) `1 + 1 == 3` ", "test10") block: ## checks AST isnt' transformed as it used to let a = 1 @@ -124,4 +124,4 @@ block: ## checks AST isnt' transformed as it used to doAssert a > 1 except AssertionError as e: # used to rewrite as `1 < a` - checkMsg(e.msg, "tfailedassert.nim(124, 14) `a > 1` ", "test11") + checkMsg(e.msg, "tassert2.nim(124, 14) `a > 1` ", "test11") diff --git a/tests/assert/tfailedassert_stacktrace.nim b/tests/assert/tassert_c.nim index 002d65c53..877b3aead 100644 --- a/tests/assert/tfailedassert_stacktrace.nim +++ b/tests/assert/tassert_c.nim @@ -4,11 +4,11 @@ discard """ """ const expected = """ -tfailedassert_stacktrace.nim(35) tfailedassert_stacktrace -tfailedassert_stacktrace.nim(34) foo -assertions.nim(*) failedAssertImpl -assertions.nim(*) raiseAssert -fatal.nim(*) sysFatal""" +tassert_c.nim(35) tassert_c +tassert_c.nim(34) foo +assertions.nim(27) failedAssertImpl +assertions.nim(20) raiseAssert +fatal.nim(39) sysFatal""" proc tmatch(x, p: string): bool = var i = 0 diff --git a/tests/assert/tfaileddoassert.nim b/tests/assert/tdoassert.nim index e1245f578..fa9893505 100644 --- a/tests/assert/tfaileddoassert.nim +++ b/tests/assert/tdoassert.nim @@ -9,12 +9,12 @@ test2:ok import testhelper onFailedAssert(msg): - checkMsg(msg, "tfaileddoassert.nim(15, 9) `a == 2` foo", "test1") + checkMsg(msg, "tdoassert.nim(15, 9) `a == 2` foo", "test1") var a = 1 doAssert(a == 2, "foo") onFailedAssert(msg): - checkMsg(msg, "tfaileddoassert.nim(20, 10) `a == 3` ", "test2") + checkMsg(msg, "tdoassert.nim(20, 10) `a == 3` ", "test2") doAssert a == 3 diff --git a/tests/cpp/tembarrassing_generic_failure.nim b/tests/cpp/tembarrassing_generic_bug.nim index 4b5050948..4b5050948 100644 --- a/tests/cpp/tembarrassing_generic_failure.nim +++ b/tests/cpp/tembarrassing_generic_bug.nim diff --git a/tests/testament/tshouldfail.nim b/tests/testament/tshould_not_work.nim index aca73c308..aca73c308 100644 --- a/tests/testament/tshouldfail.nim +++ b/tests/testament/tshould_not_work.nim |