Start fixing up Matchers: namespaces, composition ops

This commit also forbids composing lvalues of composed matchers, as
per previous deprecation notice. I do not expect this to be contentious
in practice, because there was a bug in that usage for years, and
nobody complained.
This commit is contained in:
Martin Hořeňovský
2020-02-18 23:31:16 +01:00
parent a1be19aa1b
commit cf6575576f
22 changed files with 230 additions and 296 deletions

View File

@@ -41,11 +41,12 @@ TEST_CASE( "Tag alias can be registered against tag patterns" ) {
TEST_CASE("shortened hide tags are split apart") {
using Catch::StringRef;
using Catch::Matchers::VectorContains;
auto testcase = Catch::makeTestCaseInfo("", {"fake test name", "[.magic-tag]"}, CATCH_INTERNAL_LINEINFO);
// Transform ...
std::vector<StringRef> tags;
for (auto const& tag : testcase->tags) {
tags.push_back(tag.original);
}
REQUIRE_THAT(tags, Catch::VectorContains("magic-tag"_catch_sr) && Catch::VectorContains("."_catch_sr));
REQUIRE_THAT(tags, VectorContains("magic-tag"_catch_sr) && VectorContains("."_catch_sr));
}