Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorMartin Hořeňovský2021-12-18 19:59:23 +0100
committerMartin Hořeňovský2021-12-18 20:50:03 +0100
commit840acedf62b2dabb98bf4ab372a7582131d6b530 (patch)
tree2246182676b827884962a1a62ed216a14de0d992 /tests
parent9f2dca5384a6a8f9f37a7dc2d998cac616545592 (diff)
downloadcatch3-840acedf62b2dabb98bf4ab372a7582131d6b530.tar.gz
Implement warning for unmatched test specs
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 4a84ad8e..838227aa 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -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