mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-16 02:05:38 +02:00
Add tests for case insensitive string matching
This commit is contained in:
@@ -1469,10 +1469,18 @@
|
||||
<TestCase name="Contains string matcher" tags="[.][failing][matchers]" filename="projects/<exe-name>/MatchersTests.cpp" >
|
||||
<Expression success="false" type="CHECK_THAT" filename="projects/<exe-name>/MatchersTests.cpp" >
|
||||
<Original>
|
||||
testStringForMatching(), Contains( "not there" )
|
||||
testStringForMatching(), Contains( "not there", Catch::CaseSensitive::No )
|
||||
</Original>
|
||||
<Expanded>
|
||||
"this string contains 'abc' as a substring" contains: "not there"
|
||||
"this string contains 'abc' as a substring" contains: "not there" (case insensitive)
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="false" type="CHECK_THAT" filename="projects/<exe-name>/MatchersTests.cpp" >
|
||||
<Original>
|
||||
testStringForMatching(), Contains( "STRING" )
|
||||
</Original>
|
||||
<Expanded>
|
||||
"this string contains 'abc' as a substring" contains: "STRING"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="false"/>
|
||||
@@ -1533,10 +1541,18 @@
|
||||
<TestCase name="EndsWith string matcher" tags="[.][failing][matchers]" filename="projects/<exe-name>/MatchersTests.cpp" >
|
||||
<Expression success="false" type="CHECK_THAT" filename="projects/<exe-name>/MatchersTests.cpp" >
|
||||
<Original>
|
||||
testStringForMatching(), EndsWith( "this" )
|
||||
testStringForMatching(), EndsWith( "Substring" )
|
||||
</Original>
|
||||
<Expanded>
|
||||
"this string contains 'abc' as a substring" ends with: "this"
|
||||
"this string contains 'abc' as a substring" ends with: "Substring"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="false" type="CHECK_THAT" filename="projects/<exe-name>/MatchersTests.cpp" >
|
||||
<Original>
|
||||
testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No )
|
||||
</Original>
|
||||
<Expanded>
|
||||
"this string contains 'abc' as a substring" ends with: "this" (case insensitive)
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="false"/>
|
||||
@@ -1727,15 +1743,31 @@
|
||||
"this string contains 'abc' as a substring" equals: "this string contains 'abc' as a substring"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/MatchersTests.cpp" >
|
||||
<Original>
|
||||
testStringForMatching(), Equals( "this string contains 'ABC' as a substring", Catch::CaseSensitive::No )
|
||||
</Original>
|
||||
<Expanded>
|
||||
"this string contains 'abc' as a substring" equals: "this string contains 'abc' as a substring" (case insensitive)
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<TestCase name="Equals string matcher" tags="[.][failing][matchers]" filename="projects/<exe-name>/MatchersTests.cpp" >
|
||||
<Expression success="false" type="CHECK_THAT" filename="projects/<exe-name>/MatchersTests.cpp" >
|
||||
<Original>
|
||||
testStringForMatching(), Equals( "something else" )
|
||||
testStringForMatching(), Equals( "this string contains 'ABC' as a substring" )
|
||||
</Original>
|
||||
<Expanded>
|
||||
"this string contains 'abc' as a substring" equals: "something else"
|
||||
"this string contains 'abc' as a substring" equals: "this string contains 'ABC' as a substring"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="false" type="CHECK_THAT" filename="projects/<exe-name>/MatchersTests.cpp" >
|
||||
<Original>
|
||||
testStringForMatching(), Equals( "something else", Catch::CaseSensitive::No )
|
||||
</Original>
|
||||
<Expanded>
|
||||
"this string contains 'abc' as a substring" equals: "something else" (case insensitive)
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="false"/>
|
||||
@@ -5307,10 +5339,18 @@ Message from section two
|
||||
<TestCase name="StartsWith string matcher" tags="[.][failing][matchers]" filename="projects/<exe-name>/MatchersTests.cpp" >
|
||||
<Expression success="false" type="CHECK_THAT" filename="projects/<exe-name>/MatchersTests.cpp" >
|
||||
<Original>
|
||||
testStringForMatching(), StartsWith( "string" )
|
||||
testStringForMatching(), StartsWith( "This String" )
|
||||
</Original>
|
||||
<Expanded>
|
||||
"this string contains 'abc' as a substring" starts with: "string"
|
||||
"this string contains 'abc' as a substring" starts with: "This String"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="false" type="CHECK_THAT" filename="projects/<exe-name>/MatchersTests.cpp" >
|
||||
<Original>
|
||||
testStringForMatching(), StartsWith( "string", Catch::CaseSensitive::No )
|
||||
</Original>
|
||||
<Expanded>
|
||||
"this string contains 'abc' as a substring" starts with: "string" (case insensitive)
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="false"/>
|
||||
@@ -5324,6 +5364,14 @@ Message from section two
|
||||
"this string contains 'abc' as a substring" contains: "string"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/MatchersTests.cpp" >
|
||||
<Original>
|
||||
testStringForMatching(), Contains( "string", Catch::CaseSensitive::No )
|
||||
</Original>
|
||||
<Expanded>
|
||||
"this string contains 'abc' as a substring" contains: "string" (case insensitive)
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/MatchersTests.cpp" >
|
||||
<Original>
|
||||
testStringForMatching(), Contains( "abc" )
|
||||
@@ -5332,6 +5380,14 @@ Message from section two
|
||||
"this string contains 'abc' as a substring" contains: "abc"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/MatchersTests.cpp" >
|
||||
<Original>
|
||||
testStringForMatching(), Contains( "aBC", Catch::CaseSensitive::No )
|
||||
</Original>
|
||||
<Expanded>
|
||||
"this string contains 'abc' as a substring" contains: "abc" (case insensitive)
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/MatchersTests.cpp" >
|
||||
<Original>
|
||||
testStringForMatching(), StartsWith( "this" )
|
||||
@@ -5340,6 +5396,14 @@ Message from section two
|
||||
"this string contains 'abc' as a substring" starts with: "this"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/MatchersTests.cpp" >
|
||||
<Original>
|
||||
testStringForMatching(), StartsWith( "THIS", Catch::CaseSensitive::No )
|
||||
</Original>
|
||||
<Expanded>
|
||||
"this string contains 'abc' as a substring" starts with: "this" (case insensitive)
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/MatchersTests.cpp" >
|
||||
<Original>
|
||||
testStringForMatching(), EndsWith( "substring" )
|
||||
@@ -5348,6 +5412,14 @@ Message from section two
|
||||
"this string contains 'abc' as a substring" ends with: "substring"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/MatchersTests.cpp" >
|
||||
<Original>
|
||||
testStringForMatching(), EndsWith(" SuBsTrInG", Catch::CaseSensitive::No )
|
||||
</Original>
|
||||
<Expanded>
|
||||
"this string contains 'abc' as a substring" ends with: " substring" (case insensitive)
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/MatchersTests.cpp" >
|
||||
<Original>
|
||||
testStringForMatching(), Matches("this string contains 'abc' as a substring")
|
||||
@@ -8831,7 +8903,7 @@ loose text artifact
|
||||
</Section>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<OverallResults successes="824" failures="103" expectedFailures="21"/>
|
||||
<OverallResults successes="829" failures="107" expectedFailures="21"/>
|
||||
</Group>
|
||||
<OverallResults successes="824" failures="102" expectedFailures="21"/>
|
||||
<OverallResults successes="829" failures="106" expectedFailures="21"/>
|
||||
</Catch>
|
||||
|
Reference in New Issue
Block a user