mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 21:05:39 +02:00
Implement warning for unmatched test specs
This commit is contained in:
@@ -229,6 +229,23 @@ add_test(NAME TestSpecs::OverrideFailureWithNoMatchedTests
|
||||
COMMAND $<TARGET_FILE:SelfTest> "___nonexistent_test___" --allow-running-no-tests
|
||||
)
|
||||
|
||||
add_test(NAME Warnings::UnmatchedTestSpecIsAccepted
|
||||
COMMAND $<TARGET_FILE:SelfTest> Tracker --warn UnmatchedTestSpec
|
||||
)
|
||||
set_tests_properties(Warnings::UnmatchedTestSpecIsAccepted
|
||||
PROPERTIES
|
||||
FAIL_REGULAR_EXPRESSION "Unrecognised warning option: "
|
||||
)
|
||||
|
||||
add_test(NAME TestSpecs::WarnUnmatchedTestSpecFailsWithUnmatchedTestSpec
|
||||
COMMAND
|
||||
$<TARGET_FILE:SelfTest> Tracker, "___nonexistent_test___" --warn UnmatchedTestSpec
|
||||
)
|
||||
set_tests_properties(TestSpecs::WarnUnmatchedTestSpecFailsWithUnmatchedTestSpec
|
||||
PROPERTIES
|
||||
WILL_FAIL ON
|
||||
)
|
||||
|
||||
add_test(NAME UnmatchedOutputFilter COMMAND $<TARGET_FILE:SelfTest> [this-tag-does-not-exist])
|
||||
set_tests_properties(UnmatchedOutputFilter
|
||||
PROPERTIES
|
||||
|
Reference in New Issue
Block a user