mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-03 13:55:39 +02: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:
@@ -299,7 +299,7 @@ Nor would this
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Compilation.tests.cpp" >
|
||||
<Original>
|
||||
"aaa", Catch::EndsWith("aaa")
|
||||
"aaa", Catch::Matchers::EndsWith("aaa")
|
||||
</Original>
|
||||
<Expanded>
|
||||
"aaa" ends with: "aaa"
|
||||
@@ -3011,25 +3011,6 @@ Nor would this
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<TestCase name="Composed matchers are distinct" tags="[composed][matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
|
||||
<Original>
|
||||
testStringForMatching2(), !composed1
|
||||
</Original>
|
||||
<Expanded>
|
||||
"some completely different text that contains one common word" not ( contains: "string" or contains: "random" )
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
|
||||
<Original>
|
||||
testStringForMatching2(), composed2
|
||||
</Original>
|
||||
<Expanded>
|
||||
"some completely different text that contains one common word" ( contains: "string" or contains: "random" or contains: "different" )
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<TestCase name="Contains string matcher" tags="[.][failing][matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
|
||||
<Expression success="false" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
|
||||
<Original>
|
||||
@@ -16273,7 +16254,7 @@ loose text artifact
|
||||
<TestCase name="shortened hide tags are split apart" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" >
|
||||
<Original>
|
||||
tags, Catch::VectorContains("magic-tag"_catch_sr) && Catch::VectorContains("."_catch_sr)
|
||||
tags, VectorContains("magic-tag"_catch_sr) && VectorContains("."_catch_sr)
|
||||
</Original>
|
||||
<Expanded>
|
||||
{ ., magic-tag } ( Contains: magic-tag and Contains: . )
|
||||
@@ -17283,7 +17264,7 @@ loose text artifact
|
||||
</Section>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<OverallResults successes="1689" failures="149" expectedFailures="21"/>
|
||||
<OverallResults successes="1687" failures="149" expectedFailures="21"/>
|
||||
</Group>
|
||||
<OverallResults successes="1689" failures="148" expectedFailures="21"/>
|
||||
<OverallResults successes="1687" failures="148" expectedFailures="21"/>
|
||||
</Catch>
|
||||
|
Reference in New Issue
Block a user