mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 21:05:39 +02:00
Make hidden tags behave identically (#1847)
Add both `[.]` and `[!hide]` tags when registering a hidden test case, as per documentation. Co-authored-by: Martin Hořeňovský <martin.horenovsky@gmail.com>
This commit is contained in:
@@ -45,3 +45,10 @@ TEST_CASE("shortened hide tags are split apart") {
|
||||
auto testcase = Catch::makeTestCase(nullptr, "", {"fake test name", "[.magic-tag]"}, CATCH_INTERNAL_LINEINFO);
|
||||
REQUIRE_THAT(testcase.tags, Catch::VectorContains(std::string("magic-tag")) && Catch::VectorContains(std::string(".")));
|
||||
}
|
||||
|
||||
TEST_CASE("adding a hide tag implicitly enables all others", "[tags]") {
|
||||
using Catch::VectorContains;
|
||||
auto tag = GENERATE(as<char const*>{}, "[!hide]", "[.]", "[.foo]");
|
||||
auto testcase = Catch::makeTestCase(nullptr, "", {"fake test name", tag}, CATCH_INTERNAL_LINEINFO);
|
||||
REQUIRE_THAT(testcase.tags, VectorContains(std::string(".")) && VectorContains(std::string("!hide")));
|
||||
}
|
||||
|
Reference in New Issue
Block a user