mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-02 21:35:40 +02:00
Rename Contains string matcher builder to ContainsSubstring
The problem with the old name was that it collided with the range matcher `Contains`, and it was not really possible to disambiguate them just with argument types. Closes #2131
This commit is contained in:
@@ -398,17 +398,17 @@ Exception.tests.cpp:<line number>
|
||||
<testcase classname="<exe-name>.global" name="Composed matchers shortcircuit/MatchAllOf" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Composed matchers shortcircuit/MatchAnyOf" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Contains string matcher" time="{duration}" status="run">
|
||||
<failure message="testStringForMatching(), Contains( "not there", Catch::CaseSensitive::No )" type="CHECK_THAT">
|
||||
<failure message="testStringForMatching(), ContainsSubstring( "not there", Catch::CaseSensitive::No )" type="CHECK_THAT">
|
||||
FAILED:
|
||||
CHECK_THAT( testStringForMatching(), Contains( "not there", Catch::CaseSensitive::No ) )
|
||||
CHECK_THAT( testStringForMatching(), ContainsSubstring( "not there", Catch::CaseSensitive::No ) )
|
||||
with expansion:
|
||||
"this string contains 'abc' as a substring" contains: "not there" (case
|
||||
insensitive)
|
||||
Matchers.tests.cpp:<line number>
|
||||
</failure>
|
||||
<failure message="testStringForMatching(), Contains( "STRING" )" type="CHECK_THAT">
|
||||
<failure message="testStringForMatching(), ContainsSubstring( "STRING" )" type="CHECK_THAT">
|
||||
FAILED:
|
||||
CHECK_THAT( testStringForMatching(), Contains( "STRING" ) )
|
||||
CHECK_THAT( testStringForMatching(), ContainsSubstring( "STRING" ) )
|
||||
with expansion:
|
||||
"this string contains 'abc' as a substring" contains: "STRING"
|
||||
Matchers.tests.cpp:<line number>
|
||||
@@ -800,9 +800,9 @@ Condition.tests.cpp:<line number>
|
||||
<testcase classname="<exe-name>.global" name="Matchers can be (AnyOf) composed with the || operator" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Matchers can be composed with both && and ||" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Matchers can be composed with both && and || - failing" time="{duration}" status="run">
|
||||
<failure message="testStringForMatching(), ( Contains( "string" ) || Contains( "different" ) ) && Contains( "random" )" type="CHECK_THAT">
|
||||
<failure message="testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "random" )" type="CHECK_THAT">
|
||||
FAILED:
|
||||
CHECK_THAT( testStringForMatching(), ( Contains( "string" ) || Contains( "different" ) ) && Contains( "random" ) )
|
||||
CHECK_THAT( testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "random" ) )
|
||||
with expansion:
|
||||
"this string contains 'abc' as a substring" ( ( contains: "string" or
|
||||
contains: "different" ) and contains: "random" )
|
||||
@@ -811,9 +811,9 @@ Matchers.tests.cpp:<line number>
|
||||
</testcase>
|
||||
<testcase classname="<exe-name>.global" name="Matchers can be negated (Not) with the ! operator" time="{duration}" status="run"/>
|
||||
<testcase classname="<exe-name>.global" name="Matchers can be negated (Not) with the ! operator - failing" time="{duration}" status="run">
|
||||
<failure message="testStringForMatching(), !Contains( "substring" )" type="CHECK_THAT">
|
||||
<failure message="testStringForMatching(), !ContainsSubstring( "substring" )" type="CHECK_THAT">
|
||||
FAILED:
|
||||
CHECK_THAT( testStringForMatching(), !Contains( "substring" ) )
|
||||
CHECK_THAT( testStringForMatching(), !ContainsSubstring( "substring" ) )
|
||||
with expansion:
|
||||
"this string contains 'abc' as a substring" not contains: "substring"
|
||||
Matchers.tests.cpp:<line number>
|
||||
|
Reference in New Issue
Block a user