add tests for Testament "reject" action (#15709)
* add test for reject action * highlight that a compilation failure is expected * add the converse test for action=reject * add trailing newline * fix wording
This commit is contained in:
parent
58a1eec96a
commit
066f3ebc2a
3 changed files with 15 additions and 0 deletions
7
testament/tests/shouldfail/treject.nim
Normal file
7
testament/tests/shouldfail/treject.nim
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
discard """
|
||||||
|
action: "reject"
|
||||||
|
"""
|
||||||
|
|
||||||
|
# Because we set action="reject", we expect this line not to compile. But the
|
||||||
|
# line does compile, therefore the test fails.
|
||||||
|
assert true
|
||||||
6
tests/testament/treject.nim
Normal file
6
tests/testament/treject.nim
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
discard """
|
||||||
|
action: "reject"
|
||||||
|
"""
|
||||||
|
|
||||||
|
# this line does not compile, so the test should pass, since action="reject"
|
||||||
|
let x: int = "type mismatch"
|
||||||
|
|
@ -25,6 +25,8 @@ FAIL: tests/shouldfail/toutput.nim C
|
||||||
Failure: reOutputsDiffer
|
Failure: reOutputsDiffer
|
||||||
FAIL: tests/shouldfail/toutputsub.nim C
|
FAIL: tests/shouldfail/toutputsub.nim C
|
||||||
Failure: reOutputsDiffer
|
Failure: reOutputsDiffer
|
||||||
|
FAIL: tests/shouldfail/treject.nim C
|
||||||
|
Failure: reFilesDiffer
|
||||||
FAIL: tests/shouldfail/tsortoutput.nim C
|
FAIL: tests/shouldfail/tsortoutput.nim C
|
||||||
Failure: reOutputsDiffer
|
Failure: reOutputsDiffer
|
||||||
FAIL: tests/shouldfail/ttimeout.nim C
|
FAIL: tests/shouldfail/ttimeout.nim C
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue