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:
Martin Hořeňovský 2021-09-23 23:28:59 +02:00
parent f02c2678a1
commit 426954032f
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
17 changed files with 275 additions and 275 deletions

View File

@ -35,10 +35,10 @@ operators, that is `&&`, `||`, and `!`, like so:
```cpp
using Catch::Matchers::EndsWith;
using Catch::Matchers::Contains;
using Catch::Matchers::ContainsSubstring;
REQUIRE_THAT( getSomeString(),
EndsWith("as a service") && Contains("web scale"));
EndsWith("as a service") && ContainsSubstring("web scale"));
```
The example above asserts that the string returned from `getSomeString`
@ -64,7 +64,7 @@ TEST_CASE("Bugs, bugs, bugs", "[Bug]"){
std::string str = "Bugs as a service";
auto match_expression = Catch::Matchers::EndsWith( "as a service" ) ||
(Catch::Matchers::StartsWith( "Big data" ) && !Catch::Matchers::Contains( "web scale" ) );
(Catch::Matchers::StartsWith( "Big data" ) && !Catch::Matchers::ContainsSubstring( "web scale" ) );
REQUIRE_THAT(str, match_expression);
}
```
@ -88,7 +88,7 @@ Out of the box, Catch2 provides the following matchers:
Catch2 provides 5 different matchers that work with `std::string`,
* `StartsWith(std::string str, CaseSensitive)`,
* `EndsWith(std::string str, CaseSensitive)`,
* `Contains(std::string str, CaseSensitive)`,
* `ContainsSubstring(std::string str, CaseSensitive)`,
* `Equals(std::string str, CaseSensitive)`, and
* `Matches(std::string str, CaseSensitive)`.

View File

@ -96,7 +96,7 @@ namespace Matchers {
StringEqualsMatcher Equals( std::string const& str, CaseSensitive caseSensitivity ) {
return StringEqualsMatcher( CasedString( str, caseSensitivity) );
}
StringContainsMatcher Contains( std::string const& str, CaseSensitive caseSensitivity ) {
StringContainsMatcher ContainsSubstring( std::string const& str, CaseSensitive caseSensitivity ) {
return StringContainsMatcher( CasedString( str, caseSensitivity) );
}
EndsWithMatcher EndsWith( std::string const& str, CaseSensitive caseSensitivity ) {

View File

@ -64,7 +64,7 @@ namespace Matchers {
//! Creates matcher that accepts strings that are exactly equal to `str`
StringEqualsMatcher Equals( std::string const& str, CaseSensitive caseSensitivity = CaseSensitive::Yes );
//! Creates matcher that accepts strings that contain `str`
StringContainsMatcher Contains( std::string const& str, CaseSensitive caseSensitivity = CaseSensitive::Yes );
StringContainsMatcher ContainsSubstring( std::string const& str, CaseSensitive caseSensitivity = CaseSensitive::Yes );
//! Creates matcher that accepts strings that _end_ with `str`
EndsWithMatcher EndsWith( std::string const& str, CaseSensitive caseSensitivity = CaseSensitive::Yes );
//! Creates matcher that accepts strings that _start_ with `str`

View File

@ -447,8 +447,8 @@ Matchers.tests.cpp:<line number>: passed: !second.matchCalled for: true
Matchers.tests.cpp:<line number>: passed: matcher.match( 1 ) for: true
Matchers.tests.cpp:<line number>: passed: first.matchCalled for: true
Matchers.tests.cpp:<line number>: passed: !second.matchCalled for: true
Matchers.tests.cpp:<line number>: failed: testStringForMatching(), Contains( "not there", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" contains: "not there" (case insensitive)
Matchers.tests.cpp:<line number>: failed: testStringForMatching(), Contains( "STRING" ) for: "this string contains 'abc' as a substring" contains: "STRING"
Matchers.tests.cpp:<line number>: failed: testStringForMatching(), ContainsSubstring( "not there", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" contains: "not there" (case insensitive)
Matchers.tests.cpp:<line number>: failed: testStringForMatching(), ContainsSubstring( "STRING" ) for: "this string contains 'abc' as a substring" contains: "STRING"
Generators.tests.cpp:<line number>: passed: elem % 2 == 1 for: 1 == 1
Generators.tests.cpp:<line number>: passed: elem % 2 == 1 for: 1 == 1
Generators.tests.cpp:<line number>: passed: elem % 2 == 1 for: 1 == 1
@ -528,8 +528,8 @@ Exception.tests.cpp:<line number>: passed: thisThrows(), "expected exception" fo
Exception.tests.cpp:<line number>: passed: thisThrows(), Equals( "expecteD Exception", Catch::CaseSensitive::No ) for: "expected exception" equals: "expected exception" (case insensitive)
Exception.tests.cpp:<line number>: passed: thisThrows(), StartsWith( "expected" ) for: "expected exception" starts with: "expected"
Exception.tests.cpp:<line number>: passed: thisThrows(), EndsWith( "exception" ) for: "expected exception" ends with: "exception"
Exception.tests.cpp:<line number>: passed: thisThrows(), Contains( "except" ) for: "expected exception" contains: "except"
Exception.tests.cpp:<line number>: passed: thisThrows(), Contains( "exCept", Catch::CaseSensitive::No ) for: "expected exception" contains: "except" (case insensitive)
Exception.tests.cpp:<line number>: passed: thisThrows(), ContainsSubstring( "except" ) for: "expected exception" contains: "except"
Exception.tests.cpp:<line number>: passed: thisThrows(), ContainsSubstring( "exCept", Catch::CaseSensitive::No ) for: "expected exception" contains: "except" (case insensitive)
Matchers.tests.cpp:<line number>: passed: throwsDerivedException(), DerivedException, Message( "DerivedException::what" ) for: DerivedException::what exception message matches "DerivedException::what"
Matchers.tests.cpp:<line number>: passed: throwsDerivedException(), DerivedException, !Message( "derivedexception::what" ) for: DerivedException::what not exception message matches "derivedexception::what"
Matchers.tests.cpp:<line number>: passed: throwsSpecialException( 2 ), SpecialException, !Message( "DerivedException::what" ) for: SpecialException::what not exception message matches "DerivedException::what"
@ -904,13 +904,13 @@ Approx.tests.cpp:<line number>: passed: d <= Approx( 1.23 ) for: 1.23 <= Approx(
Approx.tests.cpp:<line number>: passed: !(d <= Approx( 1.22 )) for: !(1.23 <= Approx( 1.22 ))
Approx.tests.cpp:<line number>: passed: d <= Approx( 1.22 ).epsilon(0.1) for: 1.23 <= Approx( 1.22 )
Misc.tests.cpp:<line number>: passed: with 1 message: 'was called'
Matchers.tests.cpp:<line number>: passed: testStringForMatching(), Contains( "string" ) && Contains( "abc" ) && Contains( "substring" ) && Contains( "contains" ) for: "this string contains 'abc' as a substring" ( contains: "string" and contains: "abc" and contains: "substring" and contains: "contains" )
Matchers.tests.cpp:<line number>: passed: testStringForMatching(), Contains( "string" ) || Contains( "different" ) || Contains( "random" ) for: "this string contains 'abc' as a substring" ( contains: "string" or contains: "different" or contains: "random" )
Matchers.tests.cpp:<line number>: passed: testStringForMatching2(), Contains( "string" ) || Contains( "different" ) || Contains( "random" ) for: "some completely different text that contains one common word" ( contains: "string" or contains: "different" or contains: "random" )
Matchers.tests.cpp:<line number>: passed: testStringForMatching(), ( Contains( "string" ) || Contains( "different" ) ) && Contains( "substring" ) for: "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "substring" )
Matchers.tests.cpp:<line number>: failed: testStringForMatching(), ( Contains( "string" ) || Contains( "different" ) ) && Contains( "random" ) for: "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" )
Matchers.tests.cpp:<line number>: passed: testStringForMatching(), !Contains( "different" ) for: "this string contains 'abc' as a substring" not contains: "different"
Matchers.tests.cpp:<line number>: failed: testStringForMatching(), !Contains( "substring" ) for: "this string contains 'abc' as a substring" not contains: "substring"
Matchers.tests.cpp:<line number>: passed: testStringForMatching(), ContainsSubstring( "string" ) && ContainsSubstring( "abc" ) && ContainsSubstring( "substring" ) && ContainsSubstring( "contains" ) for: "this string contains 'abc' as a substring" ( contains: "string" and contains: "abc" and contains: "substring" and contains: "contains" )
Matchers.tests.cpp:<line number>: passed: testStringForMatching(), ContainsSubstring( "string" ) || ContainsSubstring( "different" ) || ContainsSubstring( "random" ) for: "this string contains 'abc' as a substring" ( contains: "string" or contains: "different" or contains: "random" )
Matchers.tests.cpp:<line number>: passed: testStringForMatching2(), ContainsSubstring( "string" ) || ContainsSubstring( "different" ) || ContainsSubstring( "random" ) for: "some completely different text that contains one common word" ( contains: "string" or contains: "different" or contains: "random" )
Matchers.tests.cpp:<line number>: passed: testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "substring" ) for: "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "substring" )
Matchers.tests.cpp:<line number>: failed: testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "random" ) for: "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" )
Matchers.tests.cpp:<line number>: passed: testStringForMatching(), !ContainsSubstring( "different" ) for: "this string contains 'abc' as a substring" not contains: "different"
Matchers.tests.cpp:<line number>: failed: testStringForMatching(), !ContainsSubstring( "substring" ) for: "this string contains 'abc' as a substring" not contains: "substring"
Exception.tests.cpp:<line number>: passed: thisThrows(), "expected exception" for: "expected exception" equals: "expected exception"
Exception.tests.cpp:<line number>: failed: thisThrows(), "should fail" for: "expected exception" equals: "should fail"
Generators.tests.cpp:<line number>: passed: values > -6 for: 3 > -6
@ -1216,7 +1216,7 @@ CmdLine.tests.cpp:<line number>: passed: cli.parse({"test", "--reporter", "junit
CmdLine.tests.cpp:<line number>: passed: config.reporterName == "junit" for: "junit" == "junit"
CmdLine.tests.cpp:<line number>: passed: !(cli.parse({ "test", "-r", "xml", "-r", "junit" })) for: !{?}
CmdLine.tests.cpp:<line number>: passed: !result for: true
CmdLine.tests.cpp:<line number>: passed: result.errorMessage(), Contains("Unrecognized reporter") for: "Unrecognized reporter, 'unsupported'. Check available with --list-reporters" contains: "Unrecognized reporter"
CmdLine.tests.cpp:<line number>: passed: result.errorMessage(), ContainsSubstring("Unrecognized reporter") for: "Unrecognized reporter, 'unsupported'. Check available with --list-reporters" contains: "Unrecognized reporter"
CmdLine.tests.cpp:<line number>: passed: cli.parse({"test", "-b"}) for: {?}
CmdLine.tests.cpp:<line number>: passed: config.shouldDebugBreak == true for: true == true
CmdLine.tests.cpp:<line number>: passed: cli.parse({"test", "--break"}) for: {?}
@ -1226,7 +1226,7 @@ CmdLine.tests.cpp:<line number>: passed: config.abortAfter == 1 for: 1 == 1
CmdLine.tests.cpp:<line number>: passed: cli.parse({"test", "-x", "2"}) for: {?}
CmdLine.tests.cpp:<line number>: passed: config.abortAfter == 2 for: 2 == 2
CmdLine.tests.cpp:<line number>: passed: !result for: true
CmdLine.tests.cpp:<line number>: passed: result.errorMessage(), Contains("convert") && Contains("oops") for: "Unable to convert 'oops' to destination type" ( contains: "convert" and contains: "oops" )
CmdLine.tests.cpp:<line number>: passed: result.errorMessage(), ContainsSubstring("convert") && ContainsSubstring("oops") for: "Unable to convert 'oops' to destination type" ( contains: "convert" and contains: "oops" )
CmdLine.tests.cpp:<line number>: passed: cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) for: {?}
CmdLine.tests.cpp:<line number>: passed: config.waitForKeypress == std::get<1>(input) for: 0 == 0
CmdLine.tests.cpp:<line number>: passed: cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) for: {?}
@ -1236,7 +1236,7 @@ CmdLine.tests.cpp:<line number>: passed: config.waitForKeypress == std::get<1>(i
CmdLine.tests.cpp:<line number>: passed: cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) for: {?}
CmdLine.tests.cpp:<line number>: passed: config.waitForKeypress == std::get<1>(input) for: 3 == 3
CmdLine.tests.cpp:<line number>: passed: !result for: true
CmdLine.tests.cpp:<line number>: passed: result.errorMessage(), Contains("never") && Contains("both") for: "keypress argument must be one of: never, start, exit or both. 'sometimes' not recognised" ( contains: "never" and contains: "both" )
CmdLine.tests.cpp:<line number>: passed: result.errorMessage(), ContainsSubstring("never") && ContainsSubstring("both") for: "keypress argument must be one of: never, start, exit or both. 'sometimes' not recognised" ( contains: "never" and contains: "both" )
CmdLine.tests.cpp:<line number>: passed: cli.parse({"test", "-e"}) for: {?}
CmdLine.tests.cpp:<line number>: passed: config.noThrow for: true
CmdLine.tests.cpp:<line number>: passed: cli.parse({"test", "--nothrow"}) for: {?}
@ -1258,7 +1258,7 @@ CmdLine.tests.cpp:<line number>: passed: config.useColour == UseColour::Yes for:
CmdLine.tests.cpp:<line number>: passed: cli.parse({"test", "--use-colour", "no"}) for: {?}
CmdLine.tests.cpp:<line number>: passed: config.useColour == UseColour::No for: 2 == 2
CmdLine.tests.cpp:<line number>: passed: !result for: true
CmdLine.tests.cpp:<line number>: passed: result.errorMessage(), Contains( "colour mode must be one of" ) for: "colour mode must be one of: auto, yes or no. 'wrong' not recognised" contains: "colour mode must be one of"
CmdLine.tests.cpp:<line number>: passed: result.errorMessage(), ContainsSubstring( "colour mode must be one of" ) for: "colour mode must be one of: auto, yes or no. 'wrong' not recognised" contains: "colour mode must be one of"
CmdLine.tests.cpp:<line number>: passed: cli.parse({ "test", "--benchmark-samples=200" }) for: {?}
CmdLine.tests.cpp:<line number>: passed: config.benchmarkSamples == 200 for: 200 == 200
CmdLine.tests.cpp:<line number>: passed: cli.parse({ "test", "--benchmark-resamples=20000" }) for: {?}
@ -1279,74 +1279,74 @@ Matchers.tests.cpp:<line number>: failed: testStringForMatching(), Matches( "con
Matchers.tests.cpp:<line number>: failed: testStringForMatching(), Matches( "this string contains 'abc' as a" ) for: "this string contains 'abc' as a substring" matches "this string contains 'abc' as a" case sensitively
Matchers.tests.cpp:<line number>: passed: actual, !UnorderedEquals( expected ) for: { 'a', 'b' } not UnorderedEquals: { 'c', 'b' }
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
Reporters.tests.cpp:<line number>: passed: listingString, Contains("fakeTag"s) for: "All available tags:
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fakeTag"s) for: "All available tags:
1 [fakeTag]
1 tag
" contains: "fakeTag" with 1 message: 'Tested reporter: automake'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
Reporters.tests.cpp:<line number>: passed: listingString, Contains("fake reporter"s) for: "Available reporters:
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fake reporter"s) for: "Available reporters:
fake reporter: fake description
" contains: "fake reporter" with 1 message: 'Tested reporter: automake'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
Reporters.tests.cpp:<line number>: passed: listingString, Contains( "fake test name"s ) && Contains( "fakeTestTag"s ) for: "All available test cases:
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases:
fake test name
[fakeTestTag]
1 test case
" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: automake'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
Reporters.tests.cpp:<line number>: passed: listingString, Contains("fakeTag"s) for: "All available tags:
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fakeTag"s) for: "All available tags:
1 [fakeTag]
1 tag
" contains: "fakeTag" with 1 message: 'Tested reporter: compact'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
Reporters.tests.cpp:<line number>: passed: listingString, Contains("fake reporter"s) for: "Available reporters:
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fake reporter"s) for: "Available reporters:
fake reporter: fake description
" contains: "fake reporter" with 1 message: 'Tested reporter: compact'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
Reporters.tests.cpp:<line number>: passed: listingString, Contains( "fake test name"s ) && Contains( "fakeTestTag"s ) for: "All available test cases:
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases:
fake test name
[fakeTestTag]
1 test case
" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: compact'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
Reporters.tests.cpp:<line number>: passed: listingString, Contains("fakeTag"s) for: "All available tags:
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fakeTag"s) for: "All available tags:
1 [fakeTag]
1 tag
" contains: "fakeTag" with 1 message: 'Tested reporter: console'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
Reporters.tests.cpp:<line number>: passed: listingString, Contains("fake reporter"s) for: "Available reporters:
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fake reporter"s) for: "Available reporters:
fake reporter: fake description
" contains: "fake reporter" with 1 message: 'Tested reporter: console'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
Reporters.tests.cpp:<line number>: passed: listingString, Contains( "fake test name"s ) && Contains( "fakeTestTag"s ) for: "All available test cases:
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases:
fake test name
[fakeTestTag]
1 test case
" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: console'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
Reporters.tests.cpp:<line number>: passed: listingString, Contains("fakeTag"s) for: "<?xml version="1.0" encoding="UTF-8"?>
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fakeTag"s) for: "<?xml version="1.0" encoding="UTF-8"?>
All available tags:
1 [fakeTag]
1 tag
" contains: "fakeTag" with 1 message: 'Tested reporter: junit'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
Reporters.tests.cpp:<line number>: passed: listingString, Contains("fake reporter"s) for: "<?xml version="1.0" encoding="UTF-8"?>
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fake reporter"s) for: "<?xml version="1.0" encoding="UTF-8"?>
Available reporters:
fake reporter: fake description
" contains: "fake reporter" with 1 message: 'Tested reporter: junit'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
Reporters.tests.cpp:<line number>: passed: listingString, Contains( "fake test name"s ) && Contains( "fakeTestTag"s ) for: "<?xml version="1.0" encoding="UTF-8"?>
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "<?xml version="1.0" encoding="UTF-8"?>
All available test cases:
fake test name
[fakeTestTag]
@ -1354,20 +1354,20 @@ All available test cases:
" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: junit'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
Reporters.tests.cpp:<line number>: passed: listingString, Contains("fakeTag"s) for: "<?xml version="1.0" encoding="UTF-8"?>
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fakeTag"s) for: "<?xml version="1.0" encoding="UTF-8"?>
All available tags:
1 [fakeTag]
1 tag
" contains: "fakeTag" with 1 message: 'Tested reporter: sonarqube'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
Reporters.tests.cpp:<line number>: passed: listingString, Contains("fake reporter"s) for: "<?xml version="1.0" encoding="UTF-8"?>
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fake reporter"s) for: "<?xml version="1.0" encoding="UTF-8"?>
Available reporters:
fake reporter: fake description
" contains: "fake reporter" with 1 message: 'Tested reporter: sonarqube'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
Reporters.tests.cpp:<line number>: passed: listingString, Contains( "fake test name"s ) && Contains( "fakeTestTag"s ) for: "<?xml version="1.0" encoding="UTF-8"?>
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "<?xml version="1.0" encoding="UTF-8"?>
All available test cases:
fake test name
[fakeTestTag]
@ -1375,43 +1375,43 @@ All available test cases:
" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: sonarqube'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
Reporters.tests.cpp:<line number>: passed: listingString, Contains("fakeTag"s) for: "All available tags:
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fakeTag"s) for: "All available tags:
1 [fakeTag]
1 tag
" contains: "fakeTag" with 1 message: 'Tested reporter: tap'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
Reporters.tests.cpp:<line number>: passed: listingString, Contains("fake reporter"s) for: "Available reporters:
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fake reporter"s) for: "Available reporters:
fake reporter: fake description
" contains: "fake reporter" with 1 message: 'Tested reporter: tap'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
Reporters.tests.cpp:<line number>: passed: listingString, Contains( "fake test name"s ) && Contains( "fakeTestTag"s ) for: "All available test cases:
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases:
fake test name
[fakeTestTag]
1 test case
" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: tap'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
Reporters.tests.cpp:<line number>: passed: listingString, Contains("fakeTag"s) for: "All available tags:
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fakeTag"s) for: "All available tags:
1 [fakeTag]
1 tag
" contains: "fakeTag" with 1 message: 'Tested reporter: teamcity'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
Reporters.tests.cpp:<line number>: passed: listingString, Contains("fake reporter"s) for: "Available reporters:
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fake reporter"s) for: "Available reporters:
fake reporter: fake description
" contains: "fake reporter" with 1 message: 'Tested reporter: teamcity'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
Reporters.tests.cpp:<line number>: passed: listingString, Contains( "fake test name"s ) && Contains( "fakeTestTag"s ) for: "All available test cases:
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases:
fake test name
[fakeTestTag]
1 test case
" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: teamcity'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
Reporters.tests.cpp:<line number>: passed: listingString, Contains("fakeTag"s) for: "<?xml version="1.0" encoding="UTF-8"?>
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fakeTag"s) for: "<?xml version="1.0" encoding="UTF-8"?>
<TagsFromMatchingTests>
<Tag>
<Count>1</Count>
@ -1421,7 +1421,7 @@ Reporters.tests.cpp:<line number>: passed: listingString, Contains("fakeTag"s) f
</Tag>
</TagsFromMatchingTests>" contains: "fakeTag" with 1 message: 'Tested reporter: xml'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
Reporters.tests.cpp:<line number>: passed: listingString, Contains("fake reporter"s) for: "<?xml version="1.0" encoding="UTF-8"?>
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fake reporter"s) for: "<?xml version="1.0" encoding="UTF-8"?>
<AvailableReporters>
<Reporter>
<Name>fake reporter</Name>
@ -1429,7 +1429,7 @@ Reporters.tests.cpp:<line number>: passed: listingString, Contains("fake reporte
</Reporter>
</AvailableReporters>" contains: "fake reporter" with 1 message: 'Tested reporter: xml'
Reporters.tests.cpp:<line number>: passed: !(factories.empty()) for: !false
Reporters.tests.cpp:<line number>: passed: listingString, Contains( "fake test name"s ) && Contains( "fakeTestTag"s ) for: "<?xml version="1.0" encoding="UTF-8"?>
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "<?xml version="1.0" encoding="UTF-8"?>
<MatchingTests>
<TestCase>
<Name>fake test name</Name>
@ -1476,10 +1476,10 @@ ToStringGeneral.tests.cpp:<line number>: passed: Catch::Detail::stringify(arr) =
ToStringGeneral.tests.cpp:<line number>: passed: Catch::Detail::stringify(arr) == R"({ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } })" for: "{ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } }"
==
"{ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } }"
Matchers.tests.cpp:<line number>: passed: testStringForMatching(), Contains( "string" ) for: "this string contains 'abc' as a substring" contains: "string"
Matchers.tests.cpp:<line number>: passed: testStringForMatching(), Contains( "string", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" contains: "string" (case insensitive)
Matchers.tests.cpp:<line number>: passed: testStringForMatching(), Contains( "abc" ) for: "this string contains 'abc' as a substring" contains: "abc"
Matchers.tests.cpp:<line number>: passed: testStringForMatching(), Contains( "aBC", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" contains: "abc" (case insensitive)
Matchers.tests.cpp:<line number>: passed: testStringForMatching(), ContainsSubstring( "string" ) for: "this string contains 'abc' as a substring" contains: "string"
Matchers.tests.cpp:<line number>: passed: testStringForMatching(), ContainsSubstring( "string", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" contains: "string" (case insensitive)
Matchers.tests.cpp:<line number>: passed: testStringForMatching(), ContainsSubstring( "abc" ) for: "this string contains 'abc' as a substring" contains: "abc"
Matchers.tests.cpp:<line number>: passed: testStringForMatching(), ContainsSubstring( "aBC", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" contains: "abc" (case insensitive)
Matchers.tests.cpp:<line number>: passed: testStringForMatching(), StartsWith( "this" ) for: "this string contains 'abc' as a substring" starts with: "this"
Matchers.tests.cpp:<line number>: passed: testStringForMatching(), StartsWith( "THIS", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" starts with: "this" (case insensitive)
Matchers.tests.cpp:<line number>: passed: testStringForMatching(), EndsWith( "substring" ) for: "this string contains 'abc' as a substring" ends with: "substring"
@ -1560,16 +1560,16 @@ Misc.tests.cpp:<line number>: failed: s1 == s2 for: "if ($b == 10) {
$a = 20;
}
"
Tag.tests.cpp:<line number>: passed: what, Contains( "[@zzz]" ) for: "error: tag alias, '[@zzz]' already registered.
Tag.tests.cpp:<line number>: passed: what, ContainsSubstring( "[@zzz]" ) for: "error: tag alias, '[@zzz]' already registered.
First seen at: file:2
Redefined at: file:10" contains: "[@zzz]"
Tag.tests.cpp:<line number>: passed: what, Contains( "file" ) for: "error: tag alias, '[@zzz]' already registered.
Tag.tests.cpp:<line number>: passed: what, ContainsSubstring( "file" ) for: "error: tag alias, '[@zzz]' already registered.
First seen at: file:2
Redefined at: file:10" contains: "file"
Tag.tests.cpp:<line number>: passed: what, Contains( "2" ) for: "error: tag alias, '[@zzz]' already registered.
Tag.tests.cpp:<line number>: passed: what, ContainsSubstring( "2" ) for: "error: tag alias, '[@zzz]' already registered.
First seen at: file:2
Redefined at: file:10" contains: "2"
Tag.tests.cpp:<line number>: passed: what, Contains( "10" ) for: "error: tag alias, '[@zzz]' already registered.
Tag.tests.cpp:<line number>: passed: what, ContainsSubstring( "10" ) for: "error: tag alias, '[@zzz]' already registered.
First seen at: file:2
Redefined at: file:10" contains: "10"
Tag.tests.cpp:<line number>: passed: registry.add( "[no ampersat]", "", Catch::SourceLineInfo( "file", 3 ) )
@ -1736,16 +1736,16 @@ Misc.tests.cpp:<line number>: failed: explicitly
Misc.tests.cpp:<line number>: failed - but was ok: false
Misc.tests.cpp:<line number>: failed: explicitly
Message.tests.cpp:<line number>: failed - but was ok: 1 == 2
Reporters.tests.cpp:<line number>: passed: listingString, Contains("[fakeTag]"s) for: "All available tags:
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("[fakeTag]"s) for: "All available tags:
1 [fakeTag]
1 tag
" contains: "[fakeTag]"
Reporters.tests.cpp:<line number>: passed: listingString, Contains("fake reporter"s) for: "Available reporters:
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring("fake reporter"s) for: "Available reporters:
fake reporter: fake description
" contains: "fake reporter"
Reporters.tests.cpp:<line number>: passed: listingString, Contains( "fake test name"s ) && Contains( "fakeTestTag"s ) for: "All available test cases:
Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases:
fake test name
[fakeTestTag]
1 test case
@ -1987,7 +1987,7 @@ Xml.tests.cpp:<line number>: passed: encode( stringWithQuotes, Catch::XmlEncode:
"don't &quot;quote&quot; me on that"
Xml.tests.cpp:<line number>: passed: encode( "[\x01]" ) == "[\\x01]" for: "[\x01]" == "[\x01]"
Xml.tests.cpp:<line number>: passed: encode( "[\x7F]" ) == "[\\x7F]" for: "[\x7F]" == "[\x7F]"
Xml.tests.cpp:<line number>: passed: stream.str(), Contains(R"(attr1="true")") && Contains(R"(attr2="false")") for: "<?xml version="1.0" encoding="UTF-8"?>
Xml.tests.cpp:<line number>: passed: stream.str(), ContainsSubstring(R"(attr1="true")") && ContainsSubstring(R"(attr2="false")") for: "<?xml version="1.0" encoding="UTF-8"?>
<Element1 attr1="true" attr2="false"/>
" ( contains: "attr1="true"" and contains: "attr2="false"" )
InternalBenchmark.tests.cpp:<line number>: passed: analysis.mean.point.count() == 23 for: 23.0 == 23

View File

@ -332,13 +332,13 @@ Matchers.tests.cpp:<line number>
...............................................................................
Matchers.tests.cpp:<line number>: 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>: FAILED:
CHECK_THAT( testStringForMatching(), Contains( "STRING" ) )
CHECK_THAT( testStringForMatching(), ContainsSubstring( "STRING" ) )
with expansion:
"this string contains 'abc' as a substring" contains: "STRING"
@ -678,7 +678,7 @@ Matchers.tests.cpp:<line number>
...............................................................................
Matchers.tests.cpp:<line number>: 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" )
@ -690,7 +690,7 @@ Matchers.tests.cpp:<line number>
...............................................................................
Matchers.tests.cpp:<line number>: FAILED:
CHECK_THAT( testStringForMatching(), !Contains( "substring" ) )
CHECK_THAT( testStringForMatching(), !ContainsSubstring( "substring" ) )
with expansion:
"this string contains 'abc' as a substring" not contains: "substring"

View File

@ -3519,13 +3519,13 @@ Matchers.tests.cpp:<line number>
...............................................................................
Matchers.tests.cpp:<line number>: 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>: FAILED:
CHECK_THAT( testStringForMatching(), Contains( "STRING" ) )
CHECK_THAT( testStringForMatching(), ContainsSubstring( "STRING" ) )
with expansion:
"this string contains 'abc' as a substring" contains: "STRING"
@ -4119,12 +4119,12 @@ with expansion:
"expected exception" ends with: "exception"
Exception.tests.cpp:<line number>: PASSED:
REQUIRE_THROWS_WITH( thisThrows(), Contains( "except" ) )
REQUIRE_THROWS_WITH( thisThrows(), ContainsSubstring( "except" ) )
with expansion:
"expected exception" contains: "except"
Exception.tests.cpp:<line number>: PASSED:
REQUIRE_THROWS_WITH( thisThrows(), Contains( "exCept", Catch::CaseSensitive::No ) )
REQUIRE_THROWS_WITH( thisThrows(), ContainsSubstring( "exCept", Catch::CaseSensitive::No ) )
with expansion:
"expected exception" contains: "except" (case insensitive)
@ -6893,7 +6893,7 @@ Matchers.tests.cpp:<line number>
...............................................................................
Matchers.tests.cpp:<line number>: PASSED:
CHECK_THAT( testStringForMatching(), Contains( "string" ) && Contains( "abc" ) && Contains( "substring" ) && Contains( "contains" ) )
CHECK_THAT( testStringForMatching(), ContainsSubstring( "string" ) && ContainsSubstring( "abc" ) && ContainsSubstring( "substring" ) && ContainsSubstring( "contains" ) )
with expansion:
"this string contains 'abc' as a substring" ( contains: "string" and
contains: "abc" and contains: "substring" and contains: "contains" )
@ -6905,13 +6905,13 @@ Matchers.tests.cpp:<line number>
...............................................................................
Matchers.tests.cpp:<line number>: PASSED:
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" or contains: "random" )
Matchers.tests.cpp:<line number>: PASSED:
CHECK_THAT( testStringForMatching2(), Contains( "string" ) || Contains( "different" ) || Contains( "random" ) )
CHECK_THAT( testStringForMatching2(), ContainsSubstring( "string" ) || ContainsSubstring( "different" ) || ContainsSubstring( "random" ) )
with expansion:
"some completely different text that contains one common word" ( contains:
"string" or contains: "different" or contains: "random" )
@ -6923,7 +6923,7 @@ Matchers.tests.cpp:<line number>
...............................................................................
Matchers.tests.cpp:<line number>: PASSED:
CHECK_THAT( testStringForMatching(), ( Contains( "string" ) || Contains( "different" ) ) && Contains( "substring" ) )
CHECK_THAT( testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "substring" ) )
with expansion:
"this string contains 'abc' as a substring" ( ( contains: "string" or
contains: "different" ) and contains: "substring" )
@ -6935,7 +6935,7 @@ Matchers.tests.cpp:<line number>
...............................................................................
Matchers.tests.cpp:<line number>: 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" )
@ -6947,7 +6947,7 @@ Matchers.tests.cpp:<line number>
...............................................................................
Matchers.tests.cpp:<line number>: PASSED:
CHECK_THAT( testStringForMatching(), !Contains( "different" ) )
CHECK_THAT( testStringForMatching(), !ContainsSubstring( "different" ) )
with expansion:
"this string contains 'abc' as a substring" not contains: "different"
@ -6958,7 +6958,7 @@ Matchers.tests.cpp:<line number>
...............................................................................
Matchers.tests.cpp:<line number>: FAILED:
CHECK_THAT( testStringForMatching(), !Contains( "substring" ) )
CHECK_THAT( testStringForMatching(), !ContainsSubstring( "substring" ) )
with expansion:
"this string contains 'abc' as a substring" not contains: "substring"
@ -8877,7 +8877,7 @@ with expansion:
true
CmdLine.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( result.errorMessage(), Contains("Unrecognized reporter") )
REQUIRE_THAT( result.errorMessage(), ContainsSubstring("Unrecognized reporter") )
with expansion:
"Unrecognized reporter, 'unsupported'. Check available with --list-reporters"
contains: "Unrecognized reporter"
@ -8968,7 +8968,7 @@ with expansion:
true
CmdLine.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( result.errorMessage(), Contains("convert") && Contains("oops") )
REQUIRE_THAT( result.errorMessage(), ContainsSubstring("convert") && ContainsSubstring("oops") )
with expansion:
"Unable to convert 'oops' to destination type" ( contains: "convert" and
contains: "oops" )
@ -9064,7 +9064,7 @@ with expansion:
true
CmdLine.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( result.errorMessage(), Contains("never") && Contains("both") )
REQUIRE_THAT( result.errorMessage(), ContainsSubstring("never") && ContainsSubstring("both") )
with expansion:
"keypress argument must be one of: never, start, exit or both. 'sometimes'
not recognised" ( contains: "never" and contains: "both" )
@ -9255,7 +9255,7 @@ with expansion:
true
CmdLine.tests.cpp:<line number>: PASSED:
CHECK_THAT( result.errorMessage(), Contains( "colour mode must be one of" ) )
CHECK_THAT( result.errorMessage(), ContainsSubstring( "colour mode must be one of" ) )
with expansion:
"colour mode must be one of: auto, yes or no. 'wrong' not recognised"
contains: "colour mode must be one of"
@ -9459,7 +9459,7 @@ Reporters.tests.cpp:<line number>
...............................................................................
Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, Contains("fakeTag"s) )
REQUIRE_THAT( listingString, ContainsSubstring("fakeTag"s) )
with expansion:
"All available tags:
1 [fakeTag]
@ -9488,7 +9488,7 @@ Reporters.tests.cpp:<line number>
...............................................................................
Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, Contains("fake reporter"s) )
REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) )
with expansion:
"Available reporters:
fake reporter: fake description
@ -9516,7 +9516,7 @@ Reporters.tests.cpp:<line number>
...............................................................................
Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, Contains( "fake test name"s ) && Contains( "fakeTestTag"s ) )
REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) )
with expansion:
"All available test cases:
fake test name
@ -9546,7 +9546,7 @@ Reporters.tests.cpp:<line number>
...............................................................................
Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, Contains("fakeTag"s) )
REQUIRE_THAT( listingString, ContainsSubstring("fakeTag"s) )
with expansion:
"All available tags:
1 [fakeTag]
@ -9575,7 +9575,7 @@ Reporters.tests.cpp:<line number>
...............................................................................
Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, Contains("fake reporter"s) )
REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) )
with expansion:
"Available reporters:
fake reporter: fake description
@ -9603,7 +9603,7 @@ Reporters.tests.cpp:<line number>
...............................................................................
Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, Contains( "fake test name"s ) && Contains( "fakeTestTag"s ) )
REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) )
with expansion:
"All available test cases:
fake test name
@ -9633,7 +9633,7 @@ Reporters.tests.cpp:<line number>
...............................................................................
Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, Contains("fakeTag"s) )
REQUIRE_THAT( listingString, ContainsSubstring("fakeTag"s) )
with expansion:
"All available tags:
1 [fakeTag]
@ -9662,7 +9662,7 @@ Reporters.tests.cpp:<line number>
...............................................................................
Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, Contains("fake reporter"s) )
REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) )
with expansion:
"Available reporters:
fake reporter: fake description
@ -9690,7 +9690,7 @@ Reporters.tests.cpp:<line number>
...............................................................................
Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, Contains( "fake test name"s ) && Contains( "fakeTestTag"s ) )
REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) )
with expansion:
"All available test cases:
fake test name
@ -9720,7 +9720,7 @@ Reporters.tests.cpp:<line number>
...............................................................................
Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, Contains("fakeTag"s) )
REQUIRE_THAT( listingString, ContainsSubstring("fakeTag"s) )
with expansion:
"<?xml version="1.0" encoding="UTF-8"?>
All available tags:
@ -9750,7 +9750,7 @@ Reporters.tests.cpp:<line number>
...............................................................................
Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, Contains("fake reporter"s) )
REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) )
with expansion:
"<?xml version="1.0" encoding="UTF-8"?>
Available reporters:
@ -9779,7 +9779,7 @@ Reporters.tests.cpp:<line number>
...............................................................................
Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, Contains( "fake test name"s ) && Contains( "fakeTestTag"s ) )
REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) )
with expansion:
"<?xml version="1.0" encoding="UTF-8"?>
All available test cases:
@ -9810,7 +9810,7 @@ Reporters.tests.cpp:<line number>
...............................................................................
Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, Contains("fakeTag"s) )
REQUIRE_THAT( listingString, ContainsSubstring("fakeTag"s) )
with expansion:
"<?xml version="1.0" encoding="UTF-8"?>
All available tags:
@ -9840,7 +9840,7 @@ Reporters.tests.cpp:<line number>
...............................................................................
Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, Contains("fake reporter"s) )
REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) )
with expansion:
"<?xml version="1.0" encoding="UTF-8"?>
Available reporters:
@ -9869,7 +9869,7 @@ Reporters.tests.cpp:<line number>
...............................................................................
Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, Contains( "fake test name"s ) && Contains( "fakeTestTag"s ) )
REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) )
with expansion:
"<?xml version="1.0" encoding="UTF-8"?>
All available test cases:
@ -9900,7 +9900,7 @@ Reporters.tests.cpp:<line number>
...............................................................................
Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, Contains("fakeTag"s) )
REQUIRE_THAT( listingString, ContainsSubstring("fakeTag"s) )
with expansion:
"All available tags:
1 [fakeTag]
@ -9929,7 +9929,7 @@ Reporters.tests.cpp:<line number>
...............................................................................
Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, Contains("fake reporter"s) )
REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) )
with expansion:
"Available reporters:
fake reporter: fake description
@ -9957,7 +9957,7 @@ Reporters.tests.cpp:<line number>
...............................................................................
Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, Contains( "fake test name"s ) && Contains( "fakeTestTag"s ) )
REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) )
with expansion:
"All available test cases:
fake test name
@ -9987,7 +9987,7 @@ Reporters.tests.cpp:<line number>
...............................................................................
Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, Contains("fakeTag"s) )
REQUIRE_THAT( listingString, ContainsSubstring("fakeTag"s) )
with expansion:
"All available tags:
1 [fakeTag]
@ -10016,7 +10016,7 @@ Reporters.tests.cpp:<line number>
...............................................................................
Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, Contains("fake reporter"s) )
REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) )
with expansion:
"Available reporters:
fake reporter: fake description
@ -10044,7 +10044,7 @@ Reporters.tests.cpp:<line number>
...............................................................................
Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, Contains( "fake test name"s ) && Contains( "fakeTestTag"s ) )
REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) )
with expansion:
"All available test cases:
fake test name
@ -10074,7 +10074,7 @@ Reporters.tests.cpp:<line number>
...............................................................................
Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, Contains("fakeTag"s) )
REQUIRE_THAT( listingString, ContainsSubstring("fakeTag"s) )
with expansion:
"<?xml version="1.0" encoding="UTF-8"?>
<TagsFromMatchingTests>
@ -10107,7 +10107,7 @@ Reporters.tests.cpp:<line number>
...............................................................................
Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, Contains("fake reporter"s) )
REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) )
with expansion:
"<?xml version="1.0" encoding="UTF-8"?>
<AvailableReporters>
@ -10138,7 +10138,7 @@ Reporters.tests.cpp:<line number>
...............................................................................
Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, Contains( "fake test name"s ) && Contains( "fakeTestTag"s ) )
REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) )
with expansion:
"<?xml version="1.0" encoding="UTF-8"?>
<MatchingTests>
@ -10474,23 +10474,23 @@ Matchers.tests.cpp:<line number>
...............................................................................
Matchers.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( testStringForMatching(), Contains( "string" ) )
REQUIRE_THAT( testStringForMatching(), ContainsSubstring( "string" ) )
with expansion:
"this string contains 'abc' as a substring" contains: "string"
Matchers.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( testStringForMatching(), Contains( "string", Catch::CaseSensitive::No ) )
REQUIRE_THAT( testStringForMatching(), ContainsSubstring( "string", Catch::CaseSensitive::No ) )
with expansion:
"this string contains 'abc' as a substring" contains: "string" (case
insensitive)
Matchers.tests.cpp:<line number>: PASSED:
CHECK_THAT( testStringForMatching(), Contains( "abc" ) )
CHECK_THAT( testStringForMatching(), ContainsSubstring( "abc" ) )
with expansion:
"this string contains 'abc' as a substring" contains: "abc"
Matchers.tests.cpp:<line number>: PASSED:
CHECK_THAT( testStringForMatching(), Contains( "aBC", Catch::CaseSensitive::No ) )
CHECK_THAT( testStringForMatching(), ContainsSubstring( "aBC", Catch::CaseSensitive::No ) )
with expansion:
"this string contains 'abc' as a substring" contains: "abc" (case
insensitive)
@ -11035,28 +11035,28 @@ Tag.tests.cpp:<line number>
...............................................................................
Tag.tests.cpp:<line number>: PASSED:
CHECK_THAT( what, Contains( "[@zzz]" ) )
CHECK_THAT( what, ContainsSubstring( "[@zzz]" ) )
with expansion:
"error: tag alias, '[@zzz]' already registered.
First seen at: file:2
Redefined at: file:10" contains: "[@zzz]"
Tag.tests.cpp:<line number>: PASSED:
CHECK_THAT( what, Contains( "file" ) )
CHECK_THAT( what, ContainsSubstring( "file" ) )
with expansion:
"error: tag alias, '[@zzz]' already registered.
First seen at: file:2
Redefined at: file:10" contains: "file"
Tag.tests.cpp:<line number>: PASSED:
CHECK_THAT( what, Contains( "2" ) )
CHECK_THAT( what, ContainsSubstring( "2" ) )
with expansion:
"error: tag alias, '[@zzz]' already registered.
First seen at: file:2
Redefined at: file:10" contains: "2"
Tag.tests.cpp:<line number>: PASSED:
CHECK_THAT( what, Contains( "10" ) )
CHECK_THAT( what, ContainsSubstring( "10" ) )
with expansion:
"error: tag alias, '[@zzz]' already registered.
First seen at: file:2
@ -12451,7 +12451,7 @@ Reporters.tests.cpp:<line number>
...............................................................................
Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, Contains("[fakeTag]"s) )
REQUIRE_THAT( listingString, ContainsSubstring("[fakeTag]"s) )
with expansion:
"All available tags:
1 [fakeTag]
@ -12467,7 +12467,7 @@ Reporters.tests.cpp:<line number>
...............................................................................
Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, Contains("fake reporter"s) )
REQUIRE_THAT( listingString, ContainsSubstring("fake reporter"s) )
with expansion:
"Available reporters:
fake reporter: fake description
@ -12482,7 +12482,7 @@ Reporters.tests.cpp:<line number>
...............................................................................
Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( listingString, Contains( "fake test name"s ) && Contains( "fakeTestTag"s ) )
REQUIRE_THAT( listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) )
with expansion:
"All available test cases:
fake test name
@ -14116,7 +14116,7 @@ Xml.tests.cpp:<line number>
...............................................................................
Xml.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( stream.str(), Contains(R"(attr1="true")") && Contains(R"(attr2="false")") )
REQUIRE_THAT( stream.str(), ContainsSubstring(R"(attr1="true")") && ContainsSubstring(R"(attr2="false")") )
with expansion:
"<?xml version="1.0" encoding="UTF-8"?>
<Element1 attr1="true" attr2="false"/>

View File

@ -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( &quot;not there&quot;, Catch::CaseSensitive::No )" type="CHECK_THAT">
<failure message="testStringForMatching(), ContainsSubstring( &quot;not there&quot;, 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( &quot;STRING&quot; )" type="CHECK_THAT">
<failure message="testStringForMatching(), ContainsSubstring( &quot;STRING&quot; )" 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 &amp;&amp; and ||" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="Matchers can be composed with both &amp;&amp; and || - failing" time="{duration}" status="run">
<failure message="testStringForMatching(), ( Contains( &quot;string&quot; ) || Contains( &quot;different&quot; ) ) &amp;&amp; Contains( &quot;random&quot; )" type="CHECK_THAT">
<failure message="testStringForMatching(), ( ContainsSubstring( &quot;string&quot; ) || ContainsSubstring( &quot;different&quot; ) ) &amp;&amp; ContainsSubstring( &quot;random&quot; )" type="CHECK_THAT">
FAILED:
CHECK_THAT( testStringForMatching(), ( Contains( "string" ) || Contains( "different" ) ) &amp;&amp; Contains( "random" ) )
CHECK_THAT( testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) &amp;&amp; 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( &quot;substring&quot; )" type="CHECK_THAT">
<failure message="testStringForMatching(), !ContainsSubstring( &quot;substring&quot; )" 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>

View File

@ -1008,16 +1008,16 @@ Exception.tests.cpp:<line number>
<testCase name="Composed matchers shortcircuit/MatchAllOf" duration="{duration}"/>
<testCase name="Composed matchers shortcircuit/MatchAnyOf" duration="{duration}"/>
<testCase name="Contains string matcher" duration="{duration}">
<failure message="CHECK_THAT(testStringForMatching(), Contains( &quot;not there&quot;, Catch::CaseSensitive::No ))">
<failure message="CHECK_THAT(testStringForMatching(), ContainsSubstring( &quot;not there&quot;, Catch::CaseSensitive::No ))">
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="CHECK_THAT(testStringForMatching(), Contains( &quot;STRING&quot; ))">
<failure message="CHECK_THAT(testStringForMatching(), ContainsSubstring( &quot;STRING&quot; ))">
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>
@ -1116,9 +1116,9 @@ Matchers.tests.cpp:<line number>
<testCase name="Matchers can be (AnyOf) composed with the || operator" duration="{duration}"/>
<testCase name="Matchers can be composed with both &amp;&amp; and ||" duration="{duration}"/>
<testCase name="Matchers can be composed with both &amp;&amp; and || - failing" duration="{duration}">
<failure message="CHECK_THAT(testStringForMatching(), ( Contains( &quot;string&quot; ) || Contains( &quot;different&quot; ) ) &amp;&amp; Contains( &quot;random&quot; ))">
<failure message="CHECK_THAT(testStringForMatching(), ( ContainsSubstring( &quot;string&quot; ) || ContainsSubstring( &quot;different&quot; ) ) &amp;&amp; ContainsSubstring( &quot;random&quot; ))">
FAILED:
CHECK_THAT( testStringForMatching(), ( Contains( "string" ) || Contains( "different" ) ) &amp;&amp; Contains( "random" ) )
CHECK_THAT( testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) &amp;&amp; ContainsSubstring( "random" ) )
with expansion:
"this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" )
Matchers.tests.cpp:<line number>
@ -1126,9 +1126,9 @@ Matchers.tests.cpp:<line number>
</testCase>
<testCase name="Matchers can be negated (Not) with the ! operator" duration="{duration}"/>
<testCase name="Matchers can be negated (Not) with the ! operator - failing" duration="{duration}">
<failure message="CHECK_THAT(testStringForMatching(), !Contains( &quot;substring&quot; ))">
<failure message="CHECK_THAT(testStringForMatching(), !ContainsSubstring( &quot;substring&quot; ))">
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>

View File

@ -893,9 +893,9 @@ ok {test-number} - first.matchCalled for: true
# Composed matchers shortcircuit
ok {test-number} - !second.matchCalled for: true
# Contains string matcher
not ok {test-number} - testStringForMatching(), Contains( "not there", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" contains: "not there" (case insensitive)
not ok {test-number} - testStringForMatching(), ContainsSubstring( "not there", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" contains: "not there" (case insensitive)
# Contains string matcher
not ok {test-number} - testStringForMatching(), Contains( "STRING" ) for: "this string contains 'abc' as a substring" contains: "STRING"
not ok {test-number} - testStringForMatching(), ContainsSubstring( "STRING" ) for: "this string contains 'abc' as a substring" contains: "STRING"
# Copy and then generate a range
ok {test-number} - elem % 2 == 1 for: 1 == 1
# Copy and then generate a range
@ -1039,9 +1039,9 @@ ok {test-number} - thisThrows(), StartsWith( "expected" ) for: "expected excepti
# Exception messages can be tested for
ok {test-number} - thisThrows(), EndsWith( "exception" ) for: "expected exception" ends with: "exception"
# Exception messages can be tested for
ok {test-number} - thisThrows(), Contains( "except" ) for: "expected exception" contains: "except"
ok {test-number} - thisThrows(), ContainsSubstring( "except" ) for: "expected exception" contains: "except"
# Exception messages can be tested for
ok {test-number} - thisThrows(), Contains( "exCept", Catch::CaseSensitive::No ) for: "expected exception" contains: "except" (case insensitive)
ok {test-number} - thisThrows(), ContainsSubstring( "exCept", Catch::CaseSensitive::No ) for: "expected exception" contains: "except" (case insensitive)
# Exceptions matchers
ok {test-number} - throwsDerivedException(), DerivedException, Message( "DerivedException::what" ) for: DerivedException::what exception message matches "DerivedException::what"
# Exceptions matchers
@ -1791,19 +1791,19 @@ ok {test-number} - d <= Approx( 1.22 ).epsilon(0.1) for: 1.23 <= Approx( 1.22 )
# ManuallyRegistered
ok {test-number} - with 1 message: 'was called'
# Matchers can be (AllOf) composed with the && operator
ok {test-number} - testStringForMatching(), Contains( "string" ) && Contains( "abc" ) && Contains( "substring" ) && Contains( "contains" ) for: "this string contains 'abc' as a substring" ( contains: "string" and contains: "abc" and contains: "substring" and contains: "contains" )
ok {test-number} - testStringForMatching(), ContainsSubstring( "string" ) && ContainsSubstring( "abc" ) && ContainsSubstring( "substring" ) && ContainsSubstring( "contains" ) for: "this string contains 'abc' as a substring" ( contains: "string" and contains: "abc" and contains: "substring" and contains: "contains" )
# Matchers can be (AnyOf) composed with the || operator
ok {test-number} - testStringForMatching(), Contains( "string" ) || Contains( "different" ) || Contains( "random" ) for: "this string contains 'abc' as a substring" ( contains: "string" or contains: "different" or contains: "random" )
ok {test-number} - testStringForMatching(), ContainsSubstring( "string" ) || ContainsSubstring( "different" ) || ContainsSubstring( "random" ) for: "this string contains 'abc' as a substring" ( contains: "string" or contains: "different" or contains: "random" )
# Matchers can be (AnyOf) composed with the || operator
ok {test-number} - testStringForMatching2(), Contains( "string" ) || Contains( "different" ) || Contains( "random" ) for: "some completely different text that contains one common word" ( contains: "string" or contains: "different" or contains: "random" )
ok {test-number} - testStringForMatching2(), ContainsSubstring( "string" ) || ContainsSubstring( "different" ) || ContainsSubstring( "random" ) for: "some completely different text that contains one common word" ( contains: "string" or contains: "different" or contains: "random" )
# Matchers can be composed with both && and ||
ok {test-number} - testStringForMatching(), ( Contains( "string" ) || Contains( "different" ) ) && Contains( "substring" ) for: "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "substring" )
ok {test-number} - testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "substring" ) for: "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "substring" )
# Matchers can be composed with both && and || - failing
not ok {test-number} - testStringForMatching(), ( Contains( "string" ) || Contains( "different" ) ) && Contains( "random" ) for: "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" )
not ok {test-number} - testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "random" ) for: "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" )
# Matchers can be negated (Not) with the ! operator
ok {test-number} - testStringForMatching(), !Contains( "different" ) for: "this string contains 'abc' as a substring" not contains: "different"
ok {test-number} - testStringForMatching(), !ContainsSubstring( "different" ) for: "this string contains 'abc' as a substring" not contains: "different"
# Matchers can be negated (Not) with the ! operator - failing
not ok {test-number} - testStringForMatching(), !Contains( "substring" ) for: "this string contains 'abc' as a substring" not contains: "substring"
not ok {test-number} - testStringForMatching(), !ContainsSubstring( "substring" ) for: "this string contains 'abc' as a substring" not contains: "substring"
# Mismatching exception messages failing the test
ok {test-number} - thisThrows(), "expected exception" for: "expected exception" equals: "expected exception"
# Mismatching exception messages failing the test
@ -2355,7 +2355,7 @@ ok {test-number} - !(cli.parse({ "test", "-r", "xml", "-r", "junit" })) for: !{?
# Process can be configured on command line
ok {test-number} - !result for: true
# Process can be configured on command line
ok {test-number} - result.errorMessage(), Contains("Unrecognized reporter") for: "Unrecognized reporter, 'unsupported'. Check available with --list-reporters" contains: "Unrecognized reporter"
ok {test-number} - result.errorMessage(), ContainsSubstring("Unrecognized reporter") for: "Unrecognized reporter, 'unsupported'. Check available with --list-reporters" contains: "Unrecognized reporter"
# Process can be configured on command line
ok {test-number} - cli.parse({"test", "-b"}) for: {?}
# Process can be configured on command line
@ -2375,7 +2375,7 @@ ok {test-number} - config.abortAfter == 2 for: 2 == 2
# Process can be configured on command line
ok {test-number} - !result for: true
# Process can be configured on command line
ok {test-number} - result.errorMessage(), Contains("convert") && Contains("oops") for: "Unable to convert 'oops' to destination type" ( contains: "convert" and contains: "oops" )
ok {test-number} - result.errorMessage(), ContainsSubstring("convert") && ContainsSubstring("oops") for: "Unable to convert 'oops' to destination type" ( contains: "convert" and contains: "oops" )
# Process can be configured on command line
ok {test-number} - cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) for: {?}
# Process can be configured on command line
@ -2395,7 +2395,7 @@ ok {test-number} - config.waitForKeypress == std::get<1>(input) for: 3 == 3
# Process can be configured on command line
ok {test-number} - !result for: true
# Process can be configured on command line
ok {test-number} - result.errorMessage(), Contains("never") && Contains("both") for: "keypress argument must be one of: never, start, exit or both. 'sometimes' not recognised" ( contains: "never" and contains: "both" )
ok {test-number} - result.errorMessage(), ContainsSubstring("never") && ContainsSubstring("both") for: "keypress argument must be one of: never, start, exit or both. 'sometimes' not recognised" ( contains: "never" and contains: "both" )
# Process can be configured on command line
ok {test-number} - cli.parse({"test", "-e"}) for: {?}
# Process can be configured on command line
@ -2439,7 +2439,7 @@ ok {test-number} - config.useColour == UseColour::No for: 2 == 2
# Process can be configured on command line
ok {test-number} - !result for: true
# Process can be configured on command line
ok {test-number} - result.errorMessage(), Contains( "colour mode must be one of" ) for: "colour mode must be one of: auto, yes or no. 'wrong' not recognised" contains: "colour mode must be one of"
ok {test-number} - result.errorMessage(), ContainsSubstring( "colour mode must be one of" ) for: "colour mode must be one of: auto, yes or no. 'wrong' not recognised" contains: "colour mode must be one of"
# Process can be configured on command line
ok {test-number} - cli.parse({ "test", "--benchmark-samples=200" }) for: {?}
# Process can be configured on command line
@ -2481,99 +2481,99 @@ ok {test-number} - actual, !UnorderedEquals( expected ) for: { 'a', 'b' } not Un
# Reporter's write listings to provided stream
ok {test-number} - !(factories.empty()) for: !false
# Reporter's write listings to provided stream
ok {test-number} - listingString, Contains("fakeTag"s) for: "All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: automake'
ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: automake'
# Reporter's write listings to provided stream
ok {test-number} - !(factories.empty()) for: !false
# Reporter's write listings to provided stream
ok {test-number} - listingString, Contains("fake reporter"s) for: "Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: automake'
ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: automake'
# Reporter's write listings to provided stream
ok {test-number} - !(factories.empty()) for: !false
# Reporter's write listings to provided stream
ok {test-number} - listingString, Contains( "fake test name"s ) && Contains( "fakeTestTag"s ) for: "All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: automake'
ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: automake'
# Reporter's write listings to provided stream
ok {test-number} - !(factories.empty()) for: !false
# Reporter's write listings to provided stream
ok {test-number} - listingString, Contains("fakeTag"s) for: "All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: compact'
ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: compact'
# Reporter's write listings to provided stream
ok {test-number} - !(factories.empty()) for: !false
# Reporter's write listings to provided stream
ok {test-number} - listingString, Contains("fake reporter"s) for: "Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: compact'
ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: compact'
# Reporter's write listings to provided stream
ok {test-number} - !(factories.empty()) for: !false
# Reporter's write listings to provided stream
ok {test-number} - listingString, Contains( "fake test name"s ) && Contains( "fakeTestTag"s ) for: "All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: compact'
ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: compact'
# Reporter's write listings to provided stream
ok {test-number} - !(factories.empty()) for: !false
# Reporter's write listings to provided stream
ok {test-number} - listingString, Contains("fakeTag"s) for: "All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: console'
ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: console'
# Reporter's write listings to provided stream
ok {test-number} - !(factories.empty()) for: !false
# Reporter's write listings to provided stream
ok {test-number} - listingString, Contains("fake reporter"s) for: "Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: console'
ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: console'
# Reporter's write listings to provided stream
ok {test-number} - !(factories.empty()) for: !false
# Reporter's write listings to provided stream
ok {test-number} - listingString, Contains( "fake test name"s ) && Contains( "fakeTestTag"s ) for: "All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: console'
ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: console'
# Reporter's write listings to provided stream
ok {test-number} - !(factories.empty()) for: !false
# Reporter's write listings to provided stream
ok {test-number} - listingString, Contains("fakeTag"s) for: "<?xml version="1.0" encoding="UTF-8"?> All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: junit'
ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "<?xml version="1.0" encoding="UTF-8"?> All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: junit'
# Reporter's write listings to provided stream
ok {test-number} - !(factories.empty()) for: !false
# Reporter's write listings to provided stream
ok {test-number} - listingString, Contains("fake reporter"s) for: "<?xml version="1.0" encoding="UTF-8"?> Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: junit'
ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "<?xml version="1.0" encoding="UTF-8"?> Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: junit'
# Reporter's write listings to provided stream
ok {test-number} - !(factories.empty()) for: !false
# Reporter's write listings to provided stream
ok {test-number} - listingString, Contains( "fake test name"s ) && Contains( "fakeTestTag"s ) for: "<?xml version="1.0" encoding="UTF-8"?> All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: junit'
ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "<?xml version="1.0" encoding="UTF-8"?> All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: junit'
# Reporter's write listings to provided stream
ok {test-number} - !(factories.empty()) for: !false
# Reporter's write listings to provided stream
ok {test-number} - listingString, Contains("fakeTag"s) for: "<?xml version="1.0" encoding="UTF-8"?> All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: sonarqube'
ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "<?xml version="1.0" encoding="UTF-8"?> All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: sonarqube'
# Reporter's write listings to provided stream
ok {test-number} - !(factories.empty()) for: !false
# Reporter's write listings to provided stream
ok {test-number} - listingString, Contains("fake reporter"s) for: "<?xml version="1.0" encoding="UTF-8"?> Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: sonarqube'
ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "<?xml version="1.0" encoding="UTF-8"?> Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: sonarqube'
# Reporter's write listings to provided stream
ok {test-number} - !(factories.empty()) for: !false
# Reporter's write listings to provided stream
ok {test-number} - listingString, Contains( "fake test name"s ) && Contains( "fakeTestTag"s ) for: "<?xml version="1.0" encoding="UTF-8"?> All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: sonarqube'
ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "<?xml version="1.0" encoding="UTF-8"?> All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: sonarqube'
# Reporter's write listings to provided stream
ok {test-number} - !(factories.empty()) for: !false
# Reporter's write listings to provided stream
ok {test-number} - listingString, Contains("fakeTag"s) for: "All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: tap'
ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: tap'
# Reporter's write listings to provided stream
ok {test-number} - !(factories.empty()) for: !false
# Reporter's write listings to provided stream
ok {test-number} - listingString, Contains("fake reporter"s) for: "Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: tap'
ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: tap'
# Reporter's write listings to provided stream
ok {test-number} - !(factories.empty()) for: !false
# Reporter's write listings to provided stream
ok {test-number} - listingString, Contains( "fake test name"s ) && Contains( "fakeTestTag"s ) for: "All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: tap'
ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: tap'
# Reporter's write listings to provided stream
ok {test-number} - !(factories.empty()) for: !false
# Reporter's write listings to provided stream
ok {test-number} - listingString, Contains("fakeTag"s) for: "All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: teamcity'
ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "All available tags: 1 [fakeTag] 1 tag " contains: "fakeTag" with 1 message: 'Tested reporter: teamcity'
# Reporter's write listings to provided stream
ok {test-number} - !(factories.empty()) for: !false
# Reporter's write listings to provided stream
ok {test-number} - listingString, Contains("fake reporter"s) for: "Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: teamcity'
ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: fake reporter: fake description " contains: "fake reporter" with 1 message: 'Tested reporter: teamcity'
# Reporter's write listings to provided stream
ok {test-number} - !(factories.empty()) for: !false
# Reporter's write listings to provided stream
ok {test-number} - listingString, Contains( "fake test name"s ) && Contains( "fakeTestTag"s ) for: "All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: teamcity'
ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: teamcity'
# Reporter's write listings to provided stream
ok {test-number} - !(factories.empty()) for: !false
# Reporter's write listings to provided stream
ok {test-number} - listingString, Contains("fakeTag"s) for: "<?xml version="1.0" encoding="UTF-8"?> <TagsFromMatchingTests> <Tag> <Count>1</Count> <Aliases> <Alias>fakeTag</Alias> </Aliases> </Tag> </TagsFromMatchingTests>" contains: "fakeTag" with 1 message: 'Tested reporter: xml'
ok {test-number} - listingString, ContainsSubstring("fakeTag"s) for: "<?xml version="1.0" encoding="UTF-8"?> <TagsFromMatchingTests> <Tag> <Count>1</Count> <Aliases> <Alias>fakeTag</Alias> </Aliases> </Tag> </TagsFromMatchingTests>" contains: "fakeTag" with 1 message: 'Tested reporter: xml'
# Reporter's write listings to provided stream
ok {test-number} - !(factories.empty()) for: !false
# Reporter's write listings to provided stream
ok {test-number} - listingString, Contains("fake reporter"s) for: "<?xml version="1.0" encoding="UTF-8"?> <AvailableReporters> <Reporter> <Name>fake reporter</Name> <Description>fake description</Description> </Reporter> </AvailableReporters>" contains: "fake reporter" with 1 message: 'Tested reporter: xml'
ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "<?xml version="1.0" encoding="UTF-8"?> <AvailableReporters> <Reporter> <Name>fake reporter</Name> <Description>fake description</Description> </Reporter> </AvailableReporters>" contains: "fake reporter" with 1 message: 'Tested reporter: xml'
# Reporter's write listings to provided stream
ok {test-number} - !(factories.empty()) for: !false
# Reporter's write listings to provided stream
ok {test-number} - listingString, Contains( "fake test name"s ) && Contains( "fakeTestTag"s ) for: "<?xml version="1.0" encoding="UTF-8"?> <MatchingTests> <TestCase> <Name>fake test name</Name> <ClassName/> <Tags>[fakeTestTag]</Tags> <SourceInfo> <File>fake-file.cpp</File> <Line>123456789</Line> </SourceInfo> </TestCase> </MatchingTests>" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: xml'
ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "<?xml version="1.0" encoding="UTF-8"?> <MatchingTests> <TestCase> <Name>fake test name</Name> <ClassName/> <Tags>[fakeTestTag]</Tags> <SourceInfo> <File>fake-file.cpp</File> <Line>123456789</Line> </SourceInfo> </TestCase> </MatchingTests>" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: xml'
# SUCCEED counts as a test pass
ok {test-number} - with 1 message: 'this is a success'
# SUCCEED does not require an argument
@ -2636,13 +2636,13 @@ ok {test-number} - Catch::Detail::stringify(arr) == "{ 3, 2, 1 }" for: "{ 3, 2,
# Static arrays are convertible to string
ok {test-number} - Catch::Detail::stringify(arr) == R"({ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } })" for: "{ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } }" == "{ { "1:1", "1:2", "1:3" }, { "2:1", "2:2" } }"
# String matchers
ok {test-number} - testStringForMatching(), Contains( "string" ) for: "this string contains 'abc' as a substring" contains: "string"
ok {test-number} - testStringForMatching(), ContainsSubstring( "string" ) for: "this string contains 'abc' as a substring" contains: "string"
# String matchers
ok {test-number} - testStringForMatching(), Contains( "string", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" contains: "string" (case insensitive)
ok {test-number} - testStringForMatching(), ContainsSubstring( "string", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" contains: "string" (case insensitive)
# String matchers
ok {test-number} - testStringForMatching(), Contains( "abc" ) for: "this string contains 'abc' as a substring" contains: "abc"
ok {test-number} - testStringForMatching(), ContainsSubstring( "abc" ) for: "this string contains 'abc' as a substring" contains: "abc"
# String matchers
ok {test-number} - testStringForMatching(), Contains( "aBC", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" contains: "abc" (case insensitive)
ok {test-number} - testStringForMatching(), ContainsSubstring( "aBC", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" contains: "abc" (case insensitive)
# String matchers
ok {test-number} - testStringForMatching(), StartsWith( "this" ) for: "this string contains 'abc' as a substring" starts with: "this"
# String matchers
@ -2782,13 +2782,13 @@ ok {test-number} - now != later for: {iso8601-timestamp} != {iso8601-timestamp}
# Tabs and newlines show in output
not ok {test-number} - s1 == s2 for: "if ($b == 10) { $a = 20; }" == "if ($b == 10) { $a = 20; } "
# Tag alias can be registered against tag patterns
ok {test-number} - what, Contains( "[@zzz]" ) for: "error: tag alias, '[@zzz]' already registered. First seen at: file:2 Redefined at: file:10" contains: "[@zzz]"
ok {test-number} - what, ContainsSubstring( "[@zzz]" ) for: "error: tag alias, '[@zzz]' already registered. First seen at: file:2 Redefined at: file:10" contains: "[@zzz]"
# Tag alias can be registered against tag patterns
ok {test-number} - what, Contains( "file" ) for: "error: tag alias, '[@zzz]' already registered. First seen at: file:2 Redefined at: file:10" contains: "file"
ok {test-number} - what, ContainsSubstring( "file" ) for: "error: tag alias, '[@zzz]' already registered. First seen at: file:2 Redefined at: file:10" contains: "file"
# Tag alias can be registered against tag patterns
ok {test-number} - what, Contains( "2" ) for: "error: tag alias, '[@zzz]' already registered. First seen at: file:2 Redefined at: file:10" contains: "2"
ok {test-number} - what, ContainsSubstring( "2" ) for: "error: tag alias, '[@zzz]' already registered. First seen at: file:2 Redefined at: file:10" contains: "2"
# Tag alias can be registered against tag patterns
ok {test-number} - what, Contains( "10" ) for: "error: tag alias, '[@zzz]' already registered. First seen at: file:2 Redefined at: file:10" contains: "10"
ok {test-number} - what, ContainsSubstring( "10" ) for: "error: tag alias, '[@zzz]' already registered. First seen at: file:2 Redefined at: file:10" contains: "10"
# Tag alias can be registered against tag patterns
ok {test-number} - registry.add( "[no ampersat]", "", Catch::SourceLineInfo( "file", 3 ) )
# Tag alias can be registered against tag patterns
@ -3118,11 +3118,11 @@ not ok {test-number} - explicitly
# The NO_FAIL macro reports a failure but does not fail the test
ok {test-number} - 1 == 2 # TODO
# The default listing implementation write to provided stream
ok {test-number} - listingString, Contains("[fakeTag]"s) for: "All available tags: 1 [fakeTag] 1 tag " contains: "[fakeTag]"
ok {test-number} - listingString, ContainsSubstring("[fakeTag]"s) for: "All available tags: 1 [fakeTag] 1 tag " contains: "[fakeTag]"
# The default listing implementation write to provided stream
ok {test-number} - listingString, Contains("fake reporter"s) for: "Available reporters: fake reporter: fake description " contains: "fake reporter"
ok {test-number} - listingString, ContainsSubstring("fake reporter"s) for: "Available reporters: fake reporter: fake description " contains: "fake reporter"
# The default listing implementation write to provided stream
ok {test-number} - listingString, Contains( "fake test name"s ) && Contains( "fakeTestTag"s ) for: "All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" )
ok {test-number} - listingString, ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) for: "All available test cases: fake test name [fakeTestTag] 1 test case " ( contains: "fake test name" and contains: "fakeTestTag" )
# This test 'should' fail but doesn't
ok {test-number} - with 1 message: 'oops!'
# Thrown string literals are translated
@ -3552,7 +3552,7 @@ ok {test-number} - encode( "[\x01]" ) == "[\\x01]" for: "[\x01]" == "[\x01]"
# XmlEncode
ok {test-number} - encode( "[\x7F]" ) == "[\\x7F]" for: "[\x7F]" == "[\x7F]"
# XmlWriter writes boolean attributes as true/false
ok {test-number} - stream.str(), Contains(R"(attr1="true")") && Contains(R"(attr2="false")") for: "<?xml version="1.0" encoding="UTF-8"?> <Element1 attr1="true" attr2="false"/> " ( contains: "attr1="true"" and contains: "attr2="false"" )
ok {test-number} - stream.str(), ContainsSubstring(R"(attr1="true")") && ContainsSubstring(R"(attr2="false")") for: "<?xml version="1.0" encoding="UTF-8"?> <Element1 attr1="true" attr2="false"/> " ( contains: "attr1="true"" and contains: "attr2="false"" )
# analyse no analysis
ok {test-number} - analysis.mean.point.count() == 23 for: 23.0 == 23
# analyse no analysis

View File

@ -270,8 +270,8 @@ Exception.tests.cpp:<line number>|nunexpected exception with message:|n "unexpe
##teamcity[testStarted name='Composed matchers shortcircuit']
##teamcity[testFinished name='Composed matchers shortcircuit' duration="{duration}"]
##teamcity[testStarted name='Contains string matcher']
Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), Contains( "not there", Catch::CaseSensitive::No ) )|nwith expansion:|n "this string contains |'abc|' as a substring" contains: "not there" (case insensitive)|n']
Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), Contains( "STRING" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" contains: "STRING"|n']
Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), ContainsSubstring( "not there", Catch::CaseSensitive::No ) )|nwith expansion:|n "this string contains |'abc|' as a substring" contains: "not there" (case insensitive)|n']
Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), ContainsSubstring( "STRING" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" contains: "STRING"|n']
##teamcity[testFinished name='Contains string matcher' duration="{duration}"]
##teamcity[testStarted name='Copy and then generate a range']
##teamcity[testFinished name='Copy and then generate a range' duration="{duration}"]
@ -399,12 +399,12 @@ Condition.tests.cpp:<line number>|nexpression failed|n CHECK( data.str_hello.si
##teamcity[testStarted name='Matchers can be composed with both && and ||||']
##teamcity[testFinished name='Matchers can be composed with both && and ||||' duration="{duration}"]
##teamcity[testStarted name='Matchers can be composed with both && and |||| - failing']
Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), ( Contains( "string" ) |||| Contains( "different" ) ) && Contains( "random" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" )|n']
Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), ( ContainsSubstring( "string" ) |||| ContainsSubstring( "different" ) ) && ContainsSubstring( "random" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" )|n']
##teamcity[testFinished name='Matchers can be composed with both && and |||| - failing' duration="{duration}"]
##teamcity[testStarted name='Matchers can be negated (Not) with the ! operator']
##teamcity[testFinished name='Matchers can be negated (Not) with the ! operator' duration="{duration}"]
##teamcity[testStarted name='Matchers can be negated (Not) with the ! operator - failing']
Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), !Contains( "substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" not contains: "substring"|n']
Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), !ContainsSubstring( "substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" not contains: "substring"|n']
##teamcity[testFinished name='Matchers can be negated (Not) with the ! operator - failing' duration="{duration}"]
##teamcity[testStarted name='Mismatching exception messages failing the test']
Exception.tests.cpp:<line number>|nexpression failed|n REQUIRE_THROWS_WITH( thisThrows(), "should fail" )|nwith expansion:|n "expected exception" equals: "should fail"|n']

View File

@ -3884,7 +3884,7 @@ Nor would this
<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>
testStringForMatching(), Contains( "not there", Catch::CaseSensitive::No )
testStringForMatching(), ContainsSubstring( "not there", Catch::CaseSensitive::No )
</Original>
<Expanded>
"this string contains 'abc' as a substring" contains: "not there" (case insensitive)
@ -3892,7 +3892,7 @@ Nor would this
</Expression>
<Expression success="false" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
<Original>
testStringForMatching(), Contains( "STRING" )
testStringForMatching(), ContainsSubstring( "STRING" )
</Original>
<Expanded>
"this string contains 'abc' as a substring" contains: "STRING"
@ -4592,7 +4592,7 @@ Nor would this
</Expression>
<Expression success="true" type="REQUIRE_THROWS_WITH" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" >
<Original>
thisThrows(), Contains( "except" )
thisThrows(), ContainsSubstring( "except" )
</Original>
<Expanded>
"expected exception" contains: "except"
@ -4600,7 +4600,7 @@ Nor would this
</Expression>
<Expression success="true" type="REQUIRE_THROWS_WITH" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" >
<Original>
thisThrows(), Contains( "exCept", Catch::CaseSensitive::No )
thisThrows(), ContainsSubstring( "exCept", Catch::CaseSensitive::No )
</Original>
<Expanded>
"expected exception" contains: "except" (case insensitive)
@ -8356,7 +8356,7 @@ Nor would this
<TestCase name="Matchers can be (AllOf) composed with the &amp;&amp; operator" tags="[matchers][operator&amp;&amp;][operators]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
<Original>
testStringForMatching(), Contains( "string" ) &amp;&amp; Contains( "abc" ) &amp;&amp; Contains( "substring" ) &amp;&amp; Contains( "contains" )
testStringForMatching(), ContainsSubstring( "string" ) &amp;&amp; ContainsSubstring( "abc" ) &amp;&amp; ContainsSubstring( "substring" ) &amp;&amp; ContainsSubstring( "contains" )
</Original>
<Expanded>
"this string contains 'abc' as a substring" ( contains: "string" and contains: "abc" and contains: "substring" and contains: "contains" )
@ -8367,7 +8367,7 @@ Nor would this
<TestCase name="Matchers can be (AnyOf) composed with the || operator" tags="[matchers][operators][operator||]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
<Original>
testStringForMatching(), Contains( "string" ) || Contains( "different" ) || Contains( "random" )
testStringForMatching(), ContainsSubstring( "string" ) || ContainsSubstring( "different" ) || ContainsSubstring( "random" )
</Original>
<Expanded>
"this string contains 'abc' as a substring" ( contains: "string" or contains: "different" or contains: "random" )
@ -8375,7 +8375,7 @@ Nor would this
</Expression>
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
<Original>
testStringForMatching2(), Contains( "string" ) || Contains( "different" ) || Contains( "random" )
testStringForMatching2(), ContainsSubstring( "string" ) || ContainsSubstring( "different" ) || ContainsSubstring( "random" )
</Original>
<Expanded>
"some completely different text that contains one common word" ( contains: "string" or contains: "different" or contains: "random" )
@ -8386,7 +8386,7 @@ Nor would this
<TestCase name="Matchers can be composed with both &amp;&amp; and ||" tags="[matchers][operator&amp;&amp;][operators][operator||]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
<Original>
testStringForMatching(), ( Contains( "string" ) || Contains( "different" ) ) &amp;&amp; Contains( "substring" )
testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) &amp;&amp; ContainsSubstring( "substring" )
</Original>
<Expanded>
"this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "substring" )
@ -8397,7 +8397,7 @@ Nor would this
<TestCase name="Matchers can be composed with both &amp;&amp; and || - failing" tags="[.][failing][matchers][operator&amp;&amp;][operators][operator||]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
<Expression success="false" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
<Original>
testStringForMatching(), ( Contains( "string" ) || Contains( "different" ) ) &amp;&amp; Contains( "random" )
testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) &amp;&amp; ContainsSubstring( "random" )
</Original>
<Expanded>
"this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" )
@ -8408,7 +8408,7 @@ Nor would this
<TestCase name="Matchers can be negated (Not) with the ! operator" tags="[matchers][not][operators]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
<Original>
testStringForMatching(), !Contains( "different" )
testStringForMatching(), !ContainsSubstring( "different" )
</Original>
<Expanded>
"this string contains 'abc' as a substring" not contains: "different"
@ -8419,7 +8419,7 @@ Nor would this
<TestCase name="Matchers can be negated (Not) with the ! operator - failing" tags="[.][failing][matchers][not][operators]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
<Expression success="false" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
<Original>
testStringForMatching(), !Contains( "substring" )
testStringForMatching(), !ContainsSubstring( "substring" )
</Original>
<Expanded>
"this string contains 'abc' as a substring" not contains: "substring"
@ -10842,7 +10842,7 @@ Nor would this
</Expression>
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
<Original>
result.errorMessage(), Contains("Unrecognized reporter")
result.errorMessage(), ContainsSubstring("Unrecognized reporter")
</Original>
<Expanded>
"Unrecognized reporter, 'unsupported'. Check available with --list-reporters" contains: "Unrecognized reporter"
@ -10952,7 +10952,7 @@ Nor would this
</Expression>
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
<Original>
result.errorMessage(), Contains("convert") &amp;&amp; Contains("oops")
result.errorMessage(), ContainsSubstring("convert") &amp;&amp; ContainsSubstring("oops")
</Original>
<Expanded>
"Unable to convert 'oops' to destination type" ( contains: "convert" and contains: "oops" )
@ -11075,7 +11075,7 @@ Nor would this
</Expression>
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
<Original>
result.errorMessage(), Contains("never") &amp;&amp; Contains("both")
result.errorMessage(), ContainsSubstring("never") &amp;&amp; ContainsSubstring("both")
</Original>
<Expanded>
"keypress argument must be one of: never, start, exit or both. 'sometimes' not recognised" ( contains: "never" and contains: "both" )
@ -11313,7 +11313,7 @@ Nor would this
</Expression>
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
<Original>
result.errorMessage(), Contains( "colour mode must be one of" )
result.errorMessage(), ContainsSubstring( "colour mode must be one of" )
</Original>
<Expanded>
"colour mode must be one of: auto, yes or no. 'wrong' not recognised" contains: "colour mode must be one of"
@ -11543,7 +11543,7 @@ Nor would this
</Info>
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
<Original>
listingString, Contains("fakeTag"s)
listingString, ContainsSubstring("fakeTag"s)
</Original>
<Expanded>
"All available tags:
@ -11569,7 +11569,7 @@ Nor would this
</Info>
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
<Original>
listingString, Contains("fake reporter"s)
listingString, ContainsSubstring("fake reporter"s)
</Original>
<Expanded>
"Available reporters:
@ -11594,7 +11594,7 @@ Nor would this
</Info>
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
<Original>
listingString, Contains( "fake test name"s ) &amp;&amp; Contains( "fakeTestTag"s )
listingString, ContainsSubstring( "fake test name"s ) &amp;&amp; ContainsSubstring( "fakeTestTag"s )
</Original>
<Expanded>
"All available test cases:
@ -11621,7 +11621,7 @@ Nor would this
</Info>
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
<Original>
listingString, Contains("fakeTag"s)
listingString, ContainsSubstring("fakeTag"s)
</Original>
<Expanded>
"All available tags:
@ -11647,7 +11647,7 @@ Nor would this
</Info>
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
<Original>
listingString, Contains("fake reporter"s)
listingString, ContainsSubstring("fake reporter"s)
</Original>
<Expanded>
"Available reporters:
@ -11672,7 +11672,7 @@ Nor would this
</Info>
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
<Original>
listingString, Contains( "fake test name"s ) &amp;&amp; Contains( "fakeTestTag"s )
listingString, ContainsSubstring( "fake test name"s ) &amp;&amp; ContainsSubstring( "fakeTestTag"s )
</Original>
<Expanded>
"All available test cases:
@ -11699,7 +11699,7 @@ Nor would this
</Info>
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
<Original>
listingString, Contains("fakeTag"s)
listingString, ContainsSubstring("fakeTag"s)
</Original>
<Expanded>
"All available tags:
@ -11725,7 +11725,7 @@ Nor would this
</Info>
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
<Original>
listingString, Contains("fake reporter"s)
listingString, ContainsSubstring("fake reporter"s)
</Original>
<Expanded>
"Available reporters:
@ -11750,7 +11750,7 @@ Nor would this
</Info>
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
<Original>
listingString, Contains( "fake test name"s ) &amp;&amp; Contains( "fakeTestTag"s )
listingString, ContainsSubstring( "fake test name"s ) &amp;&amp; ContainsSubstring( "fakeTestTag"s )
</Original>
<Expanded>
"All available test cases:
@ -11777,7 +11777,7 @@ Nor would this
</Info>
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
<Original>
listingString, Contains("fakeTag"s)
listingString, ContainsSubstring("fakeTag"s)
</Original>
<Expanded>
"&lt;?xml version="1.0" encoding="UTF-8"?>
@ -11804,7 +11804,7 @@ All available tags:
</Info>
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
<Original>
listingString, Contains("fake reporter"s)
listingString, ContainsSubstring("fake reporter"s)
</Original>
<Expanded>
"&lt;?xml version="1.0" encoding="UTF-8"?>
@ -11830,7 +11830,7 @@ Available reporters:
</Info>
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
<Original>
listingString, Contains( "fake test name"s ) &amp;&amp; Contains( "fakeTestTag"s )
listingString, ContainsSubstring( "fake test name"s ) &amp;&amp; ContainsSubstring( "fakeTestTag"s )
</Original>
<Expanded>
"&lt;?xml version="1.0" encoding="UTF-8"?>
@ -11858,7 +11858,7 @@ All available test cases:
</Info>
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
<Original>
listingString, Contains("fakeTag"s)
listingString, ContainsSubstring("fakeTag"s)
</Original>
<Expanded>
"&lt;?xml version="1.0" encoding="UTF-8"?>
@ -11885,7 +11885,7 @@ All available tags:
</Info>
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
<Original>
listingString, Contains("fake reporter"s)
listingString, ContainsSubstring("fake reporter"s)
</Original>
<Expanded>
"&lt;?xml version="1.0" encoding="UTF-8"?>
@ -11911,7 +11911,7 @@ Available reporters:
</Info>
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
<Original>
listingString, Contains( "fake test name"s ) &amp;&amp; Contains( "fakeTestTag"s )
listingString, ContainsSubstring( "fake test name"s ) &amp;&amp; ContainsSubstring( "fakeTestTag"s )
</Original>
<Expanded>
"&lt;?xml version="1.0" encoding="UTF-8"?>
@ -11939,7 +11939,7 @@ All available test cases:
</Info>
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
<Original>
listingString, Contains("fakeTag"s)
listingString, ContainsSubstring("fakeTag"s)
</Original>
<Expanded>
"All available tags:
@ -11965,7 +11965,7 @@ All available test cases:
</Info>
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
<Original>
listingString, Contains("fake reporter"s)
listingString, ContainsSubstring("fake reporter"s)
</Original>
<Expanded>
"Available reporters:
@ -11990,7 +11990,7 @@ All available test cases:
</Info>
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
<Original>
listingString, Contains( "fake test name"s ) &amp;&amp; Contains( "fakeTestTag"s )
listingString, ContainsSubstring( "fake test name"s ) &amp;&amp; ContainsSubstring( "fakeTestTag"s )
</Original>
<Expanded>
"All available test cases:
@ -12017,7 +12017,7 @@ All available test cases:
</Info>
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
<Original>
listingString, Contains("fakeTag"s)
listingString, ContainsSubstring("fakeTag"s)
</Original>
<Expanded>
"All available tags:
@ -12043,7 +12043,7 @@ All available test cases:
</Info>
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
<Original>
listingString, Contains("fake reporter"s)
listingString, ContainsSubstring("fake reporter"s)
</Original>
<Expanded>
"Available reporters:
@ -12068,7 +12068,7 @@ All available test cases:
</Info>
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
<Original>
listingString, Contains( "fake test name"s ) &amp;&amp; Contains( "fakeTestTag"s )
listingString, ContainsSubstring( "fake test name"s ) &amp;&amp; ContainsSubstring( "fakeTestTag"s )
</Original>
<Expanded>
"All available test cases:
@ -12095,7 +12095,7 @@ All available test cases:
</Info>
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
<Original>
listingString, Contains("fakeTag"s)
listingString, ContainsSubstring("fakeTag"s)
</Original>
<Expanded>
"&lt;?xml version="1.0" encoding="UTF-8"?>
@ -12125,7 +12125,7 @@ All available test cases:
</Info>
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
<Original>
listingString, Contains("fake reporter"s)
listingString, ContainsSubstring("fake reporter"s)
</Original>
<Expanded>
"&lt;?xml version="1.0" encoding="UTF-8"?>
@ -12153,7 +12153,7 @@ All available test cases:
</Info>
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
<Original>
listingString, Contains( "fake test name"s ) &amp;&amp; Contains( "fakeTestTag"s )
listingString, ContainsSubstring( "fake test name"s ) &amp;&amp; ContainsSubstring( "fakeTestTag"s )
</Original>
<Expanded>
"&lt;?xml version="1.0" encoding="UTF-8"?>
@ -12497,7 +12497,7 @@ Message from section two
<TestCase name="String matchers" tags="[matchers]" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
<Original>
testStringForMatching(), Contains( "string" )
testStringForMatching(), ContainsSubstring( "string" )
</Original>
<Expanded>
"this string contains 'abc' as a substring" contains: "string"
@ -12505,7 +12505,7 @@ Message from section two
</Expression>
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
<Original>
testStringForMatching(), Contains( "string", Catch::CaseSensitive::No )
testStringForMatching(), ContainsSubstring( "string", Catch::CaseSensitive::No )
</Original>
<Expanded>
"this string contains 'abc' as a substring" contains: "string" (case insensitive)
@ -12513,7 +12513,7 @@ Message from section two
</Expression>
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
<Original>
testStringForMatching(), Contains( "abc" )
testStringForMatching(), ContainsSubstring( "abc" )
</Original>
<Expanded>
"this string contains 'abc' as a substring" contains: "abc"
@ -12521,7 +12521,7 @@ Message from section two
</Expression>
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/UsageTests/Matchers.tests.cpp" >
<Original>
testStringForMatching(), Contains( "aBC", Catch::CaseSensitive::No )
testStringForMatching(), ContainsSubstring( "aBC", Catch::CaseSensitive::No )
</Original>
<Expanded>
"this string contains 'abc' as a substring" contains: "abc" (case insensitive)
@ -13091,7 +13091,7 @@ Message from section two
<Section name="The same tag alias can only be registered once" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" >
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" >
<Original>
what, Contains( "[@zzz]" )
what, ContainsSubstring( "[@zzz]" )
</Original>
<Expanded>
"error: tag alias, '[@zzz]' already registered.
@ -13101,7 +13101,7 @@ Message from section two
</Expression>
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" >
<Original>
what, Contains( "file" )
what, ContainsSubstring( "file" )
</Original>
<Expanded>
"error: tag alias, '[@zzz]' already registered.
@ -13111,7 +13111,7 @@ Message from section two
</Expression>
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" >
<Original>
what, Contains( "2" )
what, ContainsSubstring( "2" )
</Original>
<Expanded>
"error: tag alias, '[@zzz]' already registered.
@ -13121,7 +13121,7 @@ Message from section two
</Expression>
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" >
<Original>
what, Contains( "10" )
what, ContainsSubstring( "10" )
</Original>
<Expanded>
"error: tag alias, '[@zzz]' already registered.
@ -14601,7 +14601,7 @@ Message from section two
<Section name="Listing tags" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
<Original>
listingString, Contains("[fakeTag]"s)
listingString, ContainsSubstring("[fakeTag]"s)
</Original>
<Expanded>
"All available tags:
@ -14616,7 +14616,7 @@ Message from section two
<Section name="Listing reporters" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
<Original>
listingString, Contains("fake reporter"s)
listingString, ContainsSubstring("fake reporter"s)
</Original>
<Expanded>
"Available reporters:
@ -14630,7 +14630,7 @@ Message from section two
<Section name="Listing tests" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Reporters.tests.cpp" >
<Original>
listingString, Contains( "fake test name"s ) &amp;&amp; Contains( "fakeTestTag"s )
listingString, ContainsSubstring( "fake test name"s ) &amp;&amp; ContainsSubstring( "fakeTestTag"s )
</Original>
<Expanded>
"All available test cases:
@ -16592,7 +16592,7 @@ There is no extra whitespace here
<TestCase name="XmlWriter writes boolean attributes as true/false" tags="[XML][XmlWriter]" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" >
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Xml.tests.cpp" >
<Original>
stream.str(), Contains(R"(attr1="true")") &amp;&amp; Contains(R"(attr2="false")")
stream.str(), ContainsSubstring(R"(attr1="true")") &amp;&amp; ContainsSubstring(R"(attr2="false")")
</Original>
<Expanded>
"&lt;?xml version="1.0" encoding="UTF-8"?>

View File

@ -406,7 +406,7 @@ TEST_CASE( "Process can be configured on command line", "[config][command-line]"
auto result = cli.parse({"test", "--reporter", "unsupported"});
CHECK(!result);
REQUIRE_THAT(result.errorMessage(), Contains("Unrecognized reporter"));
REQUIRE_THAT(result.errorMessage(), ContainsSubstring("Unrecognized reporter"));
}
}
@ -438,7 +438,7 @@ TEST_CASE( "Process can be configured on command line", "[config][command-line]"
SECTION("-x must be numeric") {
auto result = cli.parse({"test", "-x", "oops"});
CHECK(!result);
REQUIRE_THAT(result.errorMessage(), Contains("convert") && Contains("oops"));
REQUIRE_THAT(result.errorMessage(), ContainsSubstring("convert") && ContainsSubstring("oops"));
}
SECTION("wait-for-keypress") {
@ -460,7 +460,7 @@ TEST_CASE( "Process can be configured on command line", "[config][command-line]"
CHECK(!result);
#ifndef CATCH_CONFIG_DISABLE_MATCHERS
REQUIRE_THAT(result.errorMessage(), Contains("never") && Contains("both"));
REQUIRE_THAT(result.errorMessage(), ContainsSubstring("never") && ContainsSubstring("both"));
#endif
}
}
@ -534,7 +534,7 @@ TEST_CASE( "Process can be configured on command line", "[config][command-line]"
SECTION( "error" ) {
auto result = cli.parse({"test", "--use-colour", "wrong"});
CHECK( !result );
CHECK_THAT( result.errorMessage(), Contains( "colour mode must be one of" ) );
CHECK_THAT( result.errorMessage(), ContainsSubstring( "colour mode must be one of" ) );
}
}

View File

@ -21,7 +21,7 @@
TEST_CASE( "The default listing implementation write to provided stream",
"[reporters][reporter-helpers]" ) {
using Catch::Matchers::Contains;
using Catch::Matchers::ContainsSubstring;
using namespace std::string_literals;
std::stringstream sstream;
@ -31,7 +31,7 @@ TEST_CASE( "The default listing implementation write to provided stream",
Catch::defaultListTags(sstream, tags, false);
auto listingString = sstream.str();
REQUIRE_THAT(listingString, Contains("[fakeTag]"s));
REQUIRE_THAT(listingString, ContainsSubstring("[fakeTag]"s));
}
SECTION( "Listing reporters" ) {
std::vector<Catch::ReporterDescription> reporters(
@ -39,7 +39,7 @@ TEST_CASE( "The default listing implementation write to provided stream",
Catch::defaultListReporters(sstream, reporters, Catch::Verbosity::Normal);
auto listingString = sstream.str();
REQUIRE_THAT(listingString, Contains("fake reporter"s));
REQUIRE_THAT(listingString, ContainsSubstring("fake reporter"s));
}
SECTION( "Listing tests" ) {
Catch::TestCaseInfo fakeInfo{
@ -51,13 +51,13 @@ TEST_CASE( "The default listing implementation write to provided stream",
auto listingString = sstream.str();
REQUIRE_THAT( listingString,
Contains( "fake test name"s ) &&
Contains( "fakeTestTag"s ) );
ContainsSubstring( "fake test name"s ) &&
ContainsSubstring( "fakeTestTag"s ) );
}
}
TEST_CASE( "Reporter's write listings to provided stream", "[reporters]" ) {
using Catch::Matchers::Contains;
using Catch::Matchers::ContainsSubstring;
using namespace std::string_literals;
auto const& factories = Catch::getRegistryHub().getReporterRegistry().getFactories();
@ -80,7 +80,7 @@ TEST_CASE( "Reporter's write listings to provided stream", "[reporters]" ) {
reporter->listTags(tags);
auto listingString = sstream.str();
REQUIRE_THAT(listingString, Contains("fakeTag"s));
REQUIRE_THAT(listingString, ContainsSubstring("fakeTag"s));
}
DYNAMIC_SECTION( factory.first << " reporter lists reporters" ) {
@ -89,7 +89,7 @@ TEST_CASE( "Reporter's write listings to provided stream", "[reporters]" ) {
reporter->listReporters(reporters);
auto listingString = sstream.str();
REQUIRE_THAT(listingString, Contains("fake reporter"s));
REQUIRE_THAT(listingString, ContainsSubstring("fake reporter"s));
}
DYNAMIC_SECTION( factory.first << " reporter lists tests" ) {
@ -102,8 +102,8 @@ TEST_CASE( "Reporter's write listings to provided stream", "[reporters]" ) {
auto listingString = sstream.str();
REQUIRE_THAT( listingString,
Contains( "fake test name"s ) &&
Contains( "fakeTestTag"s ) );
ContainsSubstring( "fake test name"s ) &&
ContainsSubstring( "fakeTestTag"s ) );
}
}
}

View File

@ -24,10 +24,10 @@ TEST_CASE( "Tag alias can be registered against tag patterns" ) {
catch( std::exception& ex ) {
std::string what = ex.what();
using namespace Catch::Matchers;
CHECK_THAT( what, Contains( "[@zzz]" ) );
CHECK_THAT( what, Contains( "file" ) );
CHECK_THAT( what, Contains( "2" ) );
CHECK_THAT( what, Contains( "10" ) );
CHECK_THAT( what, ContainsSubstring( "[@zzz]" ) );
CHECK_THAT( what, ContainsSubstring( "file" ) );
CHECK_THAT( what, ContainsSubstring( "2" ) );
CHECK_THAT( what, ContainsSubstring( "10" ) );
}
}

View File

@ -117,7 +117,7 @@ TEST_CASE("XmlEncode: UTF-8", "[XML][UTF-8][approvals]") {
}
TEST_CASE("XmlWriter writes boolean attributes as true/false", "[XML][XmlWriter]") {
using Catch::Matchers::Contains;
using Catch::Matchers::ContainsSubstring;
std::stringstream stream;
{
Catch::XmlWriter xml(stream);
@ -128,6 +128,6 @@ TEST_CASE("XmlWriter writes boolean attributes as true/false", "[XML][XmlWriter]
}
REQUIRE_THAT( stream.str(),
Contains(R"(attr1="true")") &&
Contains(R"(attr2="false")") );
ContainsSubstring(R"(attr1="true")") &&
ContainsSubstring(R"(attr2="false")") );
}

View File

@ -167,8 +167,8 @@ TEST_CASE( "Exception messages can be tested for", "[!throws]" ) {
SECTION( "wildcarded" ) {
REQUIRE_THROWS_WITH( thisThrows(), StartsWith( "expected" ) );
REQUIRE_THROWS_WITH( thisThrows(), EndsWith( "exception" ) );
REQUIRE_THROWS_WITH( thisThrows(), Contains( "except" ) );
REQUIRE_THROWS_WITH( thisThrows(), Contains( "exCept", Catch::CaseSensitive::No ) );
REQUIRE_THROWS_WITH( thisThrows(), ContainsSubstring( "except" ) );
REQUIRE_THROWS_WITH( thisThrows(), ContainsSubstring( "exCept", Catch::CaseSensitive::No ) );
}
}

View File

@ -105,12 +105,12 @@ namespace {
} // end unnamed namespace
TEST_CASE( "String matchers", "[matchers]" ) {
REQUIRE_THAT( testStringForMatching(), Contains( "string" ) );
REQUIRE_THAT( testStringForMatching(), ContainsSubstring( "string" ) );
REQUIRE_THAT( testStringForMatching(),
Contains( "string", Catch::CaseSensitive::No ) );
CHECK_THAT( testStringForMatching(), Contains( "abc" ) );
ContainsSubstring( "string", Catch::CaseSensitive::No ) );
CHECK_THAT( testStringForMatching(), ContainsSubstring( "abc" ) );
CHECK_THAT( testStringForMatching(),
Contains( "aBC", Catch::CaseSensitive::No ) );
ContainsSubstring( "aBC", Catch::CaseSensitive::No ) );
CHECK_THAT( testStringForMatching(), StartsWith( "this" ) );
CHECK_THAT( testStringForMatching(),
@ -122,8 +122,8 @@ TEST_CASE( "String matchers", "[matchers]" ) {
TEST_CASE( "Contains string matcher", "[.][failing][matchers]" ) {
CHECK_THAT( testStringForMatching(),
Contains( "not there", Catch::CaseSensitive::No ) );
CHECK_THAT( testStringForMatching(), Contains( "STRING" ) );
ContainsSubstring( "not there", Catch::CaseSensitive::No ) );
CHECK_THAT( testStringForMatching(), ContainsSubstring( "STRING" ) );
}
TEST_CASE( "StartsWith string matcher", "[.][failing][matchers]" ) {
@ -185,42 +185,42 @@ TEST_CASE( "Regex string matcher", "[matchers][.failing]" ) {
TEST_CASE( "Matchers can be (AllOf) composed with the && operator",
"[matchers][operators][operator&&]" ) {
CHECK_THAT( testStringForMatching(),
Contains( "string" ) && Contains( "abc" ) &&
Contains( "substring" ) && Contains( "contains" ) );
ContainsSubstring( "string" ) && ContainsSubstring( "abc" ) &&
ContainsSubstring( "substring" ) && ContainsSubstring( "contains" ) );
}
TEST_CASE( "Matchers can be (AnyOf) composed with the || operator",
"[matchers][operators][operator||]" ) {
CHECK_THAT( testStringForMatching(),
Contains( "string" ) || Contains( "different" ) ||
Contains( "random" ) );
ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ||
ContainsSubstring( "random" ) );
CHECK_THAT( testStringForMatching2(),
Contains( "string" ) || Contains( "different" ) ||
Contains( "random" ) );
ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ||
ContainsSubstring( "random" ) );
}
TEST_CASE( "Matchers can be composed with both && and ||",
"[matchers][operators][operator||][operator&&]" ) {
CHECK_THAT( testStringForMatching(),
( Contains( "string" ) || Contains( "different" ) ) &&
Contains( "substring" ) );
( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) &&
ContainsSubstring( "substring" ) );
}
TEST_CASE( "Matchers can be composed with both && and || - failing",
"[matchers][operators][operator||][operator&&][.failing]" ) {
CHECK_THAT( testStringForMatching(),
( Contains( "string" ) || Contains( "different" ) ) &&
Contains( "random" ) );
( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) &&
ContainsSubstring( "random" ) );
}
TEST_CASE( "Matchers can be negated (Not) with the ! operator",
"[matchers][operators][not]" ) {
CHECK_THAT( testStringForMatching(), !Contains( "different" ) );
CHECK_THAT( testStringForMatching(), !ContainsSubstring( "different" ) );
}
TEST_CASE( "Matchers can be negated (Not) with the ! operator - failing",
"[matchers][operators][not][.failing]" ) {
CHECK_THAT( testStringForMatching(), !Contains( "substring" ) );
CHECK_THAT( testStringForMatching(), !ContainsSubstring( "substring" ) );
}
template <typename T> struct CustomAllocator : private std::allocator<T> {