mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 20:27:11 +01:00 
			
		
		
		
	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:
		| @@ -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)); | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Martin Hořeňovský
					Martin Hořeňovský