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:
dmsteck
2020-01-31 20:44:06 +00:00
committed by GitHub
parent 2d172dc688
commit 481f54b357
8 changed files with 171 additions and 98 deletions

View File

@@ -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")));
}