Use std::string_view

This commit is contained in:
Chris Thrasher
2025-09-21 18:05:21 -06:00
parent a5735af2f7
commit 8efee9b763
119 changed files with 913 additions and 3430 deletions

View File

@@ -248,8 +248,6 @@ Message from section two
:test-result: FAIL StartsWith string matcher
:test-result: PASS Static arrays are convertible to string
:test-result: PASS String matchers
:test-result: PASS StringRef
:test-result: PASS StringRef at compilation time
:test-result: PASS Stringifying char arrays with statically known sizes - char
:test-result: PASS Stringifying char arrays with statically known sizes - signed char
:test-result: PASS Stringifying char arrays with statically known sizes - unsigned char

View File

@@ -241,8 +241,6 @@
:test-result: FAIL StartsWith string matcher
:test-result: PASS Static arrays are convertible to string
:test-result: PASS String matchers
:test-result: PASS StringRef
:test-result: PASS StringRef at compilation time
:test-result: PASS Stringifying char arrays with statically known sizes - char
:test-result: PASS Stringifying char arrays with statically known sizes - signed char
:test-result: PASS Stringifying char arrays with statically known sizes - unsigned char

View File

@@ -562,9 +562,9 @@ Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'c
Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'custom std exception'
Approx.tests.cpp:<line number>: passed: 101.000001 != Approx(100).epsilon(0.01) for: 101.00000099999999748 != Approx( 100.0 )
Approx.tests.cpp:<line number>: passed: std::pow(10, -5) != Approx(std::pow(10, -7)) for: 0.00001 != Approx( 0.0000001 )
ToString.tests.cpp:<line number>: passed: enumInfo->lookup(0) == "Value1" for: Value1 == "Value1"
ToString.tests.cpp:<line number>: passed: enumInfo->lookup(1) == "Value2" for: Value2 == "Value2"
ToString.tests.cpp:<line number>: passed: enumInfo->lookup(3) == "{** unexpected enum value **}" for: {** unexpected enum value **}
ToString.tests.cpp:<line number>: passed: enumInfo->lookup(0) == "Value1" for: "Value1" == "Value1"
ToString.tests.cpp:<line number>: passed: enumInfo->lookup(1) == "Value2" for: "Value2" == "Value2"
ToString.tests.cpp:<line number>: passed: enumInfo->lookup(3) == "{** unexpected enum value **}" for: "{** unexpected enum value **}"
==
"{** unexpected enum value **}"
Skip.tests.cpp:<line number>: skipped: 'This generator is empty'
@@ -1807,61 +1807,6 @@ Matchers.tests.cpp:<line number>: passed: testStringForMatching(), StartsWith( "
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"
Matchers.tests.cpp:<line number>: passed: testStringForMatching(), EndsWith( " SuBsTrInG", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" ends with: " substring" (case insensitive)
String.tests.cpp:<line number>: passed: empty.empty() for: true
String.tests.cpp:<line number>: passed: empty.size() == 0 for: 0 == 0
String.tests.cpp:<line number>: passed: std::strcmp( empty.data(), "" ) == 0 for: 0 == 0
String.tests.cpp:<line number>: passed: s.empty() == false for: false == false
String.tests.cpp:<line number>: passed: s.size() == 5 for: 5 == 5
String.tests.cpp:<line number>: passed: std::strcmp( rawChars, "hello" ) == 0 for: 0 == 0
String.tests.cpp:<line number>: passed: s.data() == rawChars for: "hello" == "hello"
String.tests.cpp:<line number>: passed: original == "original"
String.tests.cpp:<line number>: passed: original.data()
String.tests.cpp:<line number>: passed: original.begin() == copy.begin() for: "original string" == "original string"
String.tests.cpp:<line number>: passed: original.begin() == copy.begin() for: "original string" == "original string"
String.tests.cpp:<line number>: passed: ss.empty() == false for: false == false
String.tests.cpp:<line number>: passed: ss.size() == 5 for: 5 == 5
String.tests.cpp:<line number>: passed: std::strncmp( ss.data(), "hello", 5 ) == 0 for: 0 == 0
String.tests.cpp:<line number>: passed: ss == "hello" for: hello == "hello"
String.tests.cpp:<line number>: passed: ss.size() == 6 for: 6 == 6
String.tests.cpp:<line number>: passed: std::strcmp( ss.data(), "world!" ) == 0 for: 0 == 0
String.tests.cpp:<line number>: passed: s.data() == s2.data() for: "hello world!" == "hello world!"
String.tests.cpp:<line number>: passed: s.data() == ss.data() for: "hello world!" == "hello world!"
String.tests.cpp:<line number>: passed: s.substr(s.size() + 1, 123).empty() for: true
String.tests.cpp:<line number>: passed: std::strcmp(ss.data(), "world!") == 0 for: 0 == 0
String.tests.cpp:<line number>: passed: s.substr(1'000'000, 1).empty() for: true
String.tests.cpp:<line number>: passed: reinterpret_cast<char*>(buffer1) != reinterpret_cast<char*>(buffer2) for: "Hello" != "Hello"
String.tests.cpp:<line number>: passed: left == right for: Hello == Hello
String.tests.cpp:<line number>: passed: left != left.substr(0, 3) for: Hello != Hel
String.tests.cpp:<line number>: passed: sr == "a standard string" for: a standard string == "a standard string"
String.tests.cpp:<line number>: passed: sr.size() == stdStr.size() for: 17 == 17
String.tests.cpp:<line number>: passed: sr == "a standard string" for: a standard string == "a standard string"
String.tests.cpp:<line number>: passed: sr.size() == stdStr.size() for: 17 == 17
String.tests.cpp:<line number>: passed: sr == "a standard string" for: a standard string == "a standard string"
String.tests.cpp:<line number>: passed: sr.size() == stdStr.size() for: 17 == 17
String.tests.cpp:<line number>: passed: stdStr == "a stringref" for: "a stringref" == "a stringref"
String.tests.cpp:<line number>: passed: stdStr.size() == sr.size() for: 11 == 11
String.tests.cpp:<line number>: passed: stdStr == "a stringref" for: "a stringref" == "a stringref"
String.tests.cpp:<line number>: passed: stdStr.size() == sr.size() for: 11 == 11
String.tests.cpp:<line number>: passed: lhs == "some string += the stringref contents" for: "some string += the stringref contents"
==
"some string += the stringref contents"
String.tests.cpp:<line number>: passed: together == "abrakadabra" for: "abrakadabra" == "abrakadabra"
String.tests.cpp:<line number>: passed: with 1 message: 'empty.size() == 0'
String.tests.cpp:<line number>: passed: with 1 message: 'empty.begin() == empty.end()'
String.tests.cpp:<line number>: passed: with 1 message: 'stringref.size() == 3'
String.tests.cpp:<line number>: passed: with 1 message: 'stringref.data() == abc'
String.tests.cpp:<line number>: passed: with 1 message: 'stringref.begin() == abc'
String.tests.cpp:<line number>: passed: with 1 message: 'stringref.begin() != stringref.end()'
String.tests.cpp:<line number>: passed: with 1 message: 'stringref.substr(10, 0).empty()'
String.tests.cpp:<line number>: passed: with 1 message: 'stringref.substr(2, 1).data() == abc + 2'
String.tests.cpp:<line number>: passed: with 1 message: 'stringref[1] == 'b''
String.tests.cpp:<line number>: passed: with 1 message: 'shortened.size() == 2'
String.tests.cpp:<line number>: passed: with 1 message: 'shortened.data() == abc'
String.tests.cpp:<line number>: passed: with 1 message: 'shortened.begin() != shortened.end()'
String.tests.cpp:<line number>: passed: with 1 message: '!(sr1.empty())'
String.tests.cpp:<line number>: passed: with 1 message: 'sr1.size() == 3'
String.tests.cpp:<line number>: passed: with 1 message: 'sr2.empty()'
String.tests.cpp:<line number>: passed: with 1 message: 'sr2.size() == 0'
ToString.tests.cpp:<line number>: passed: ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc""
ToString.tests.cpp:<line number>: passed: ::Catch::Detail::stringify( no_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc""
ToString.tests.cpp:<line number>: passed: ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc""
@@ -1902,7 +1847,7 @@ Tag.tests.cpp:<line number>: passed: registry.add( "[the @ is not at the start]"
Tag.tests.cpp:<line number>: passed: registry.add( "@no square bracket at start]", "", Catch::SourceLineInfo( "file", 3 ) )
Tag.tests.cpp:<line number>: passed: registry.add( "[@no square bracket at end", "", Catch::SourceLineInfo( "file", 3 ) )
Tag.tests.cpp:<line number>: passed: testCase.tags.size() == 2 for: 2 == 2
Tag.tests.cpp:<line number>: passed: testCase.tags, VectorContains( Tag( "tag with spaces" ) ) && VectorContains( Tag( "I said \"good day\" sir!"_catch_sr ) ) for: { {?}, {?} } ( Contains: {?} and Contains: {?} )
Tag.tests.cpp:<line number>: passed: testCase.tags, VectorContains( Tag( "tag with spaces" ) ) && VectorContains( Tag( "I said \"good day\" sir!" ) ) for: { {?}, {?} } ( Contains: {?} and Contains: {?} )
Class.tests.cpp:<line number>: passed: Template_Fixture<TestType>::m_a == 1 for: 1 == 1
Class.tests.cpp:<line number>: passed: Template_Fixture<TestType>::m_a == 1 for: 1 == 1
Class.tests.cpp:<line number>: passed: Template_Fixture<TestType>::m_a == 1 for: 1.0 == 1
@@ -2169,18 +2114,18 @@ StringManip.tests.cpp:<line number>: passed: trim(std::string(trailing_whitespac
StringManip.tests.cpp:<line number>: passed: trim(std::string(whitespace_at_both_ends)) == no_whitespace for: "There is no extra whitespace here"
==
"There is no extra whitespace here"
StringManip.tests.cpp:<line number>: passed: trim(StringRef(no_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here
StringManip.tests.cpp:<line number>: passed: trim(std::string_view(no_whitespace)) == std::string_view(no_whitespace) for: "There is no extra whitespace here"
==
There is no extra whitespace here
StringManip.tests.cpp:<line number>: passed: trim(StringRef(leading_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here
"There is no extra whitespace here"
StringManip.tests.cpp:<line number>: passed: trim(std::string_view(leading_whitespace)) == std::string_view(no_whitespace) for: "There is no extra whitespace here"
==
There is no extra whitespace here
StringManip.tests.cpp:<line number>: passed: trim(StringRef(trailing_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here
"There is no extra whitespace here"
StringManip.tests.cpp:<line number>: passed: trim(std::string_view(trailing_whitespace)) == std::string_view(no_whitespace) for: "There is no extra whitespace here"
==
There is no extra whitespace here
StringManip.tests.cpp:<line number>: passed: trim(StringRef(whitespace_at_both_ends)) == StringRef(no_whitespace) for: There is no extra whitespace here
"There is no extra whitespace here"
StringManip.tests.cpp:<line number>: passed: trim(std::string_view(whitespace_at_both_ends)) == std::string_view(no_whitespace) for: "There is no extra whitespace here"
==
There is no extra whitespace here
"There is no extra whitespace here"
MatchersRanges.tests.cpp:<line number>: passed: array_int_a, RangeEquals( c_array ) for: { 1, 2, 3 } elements are { 1, 2, 3 }
MatchersRanges.tests.cpp:<line number>: passed: array_int_a, UnorderedRangeEquals( c_array ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 }
MatchersRanges.tests.cpp:<line number>: passed: array_int_3, !RangeEquals( array_int_4 ) for: { 1, 2, 3 } not elements are { 1, 2, 3, 4 }
@@ -2646,13 +2591,13 @@ Tricky.tests.cpp:<line number>: passed: ptr.get() == 0 for: 0 == 0
ToStringPair.tests.cpp:<line number>: passed: ::Catch::Detail::stringify( pair ) == "{ { 42, \"Arthur\" }, { \"Ford\", 24 } }" for: "{ { 42, "Arthur" }, { "Ford", 24 } }"
==
"{ { 42, "Arthur" }, { "Ford", 24 } }"
ToString.tests.cpp:<line number>: passed: parseEnums( "" ), Equals( std::vector<Catch::StringRef>{} ) for: { } Equals: { }
ToString.tests.cpp:<line number>: passed: parseEnums( "ClassName::EnumName::Value1" ), Equals(std::vector<Catch::StringRef>{"Value1"} ) for: { Value1 } Equals: { Value1 }
ToString.tests.cpp:<line number>: passed: parseEnums( "Value1" ), Equals( std::vector<Catch::StringRef>{"Value1"} ) for: { Value1 } Equals: { Value1 }
ToString.tests.cpp:<line number>: passed: parseEnums( "EnumName::Value1" ), Equals(std::vector<Catch::StringRef>{"Value1"} ) for: { Value1 } Equals: { Value1 }
ToString.tests.cpp:<line number>: passed: parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2"} ) for: { Value1, Value2 } Equals: { Value1, Value2 }
ToString.tests.cpp:<line number>: passed: parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2", "Value3"} ) for: { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 }
ToString.tests.cpp:<line number>: passed: parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2", "Value3"} ) for: { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 }
ToString.tests.cpp:<line number>: passed: parseEnums( "" ), Equals( std::vector<std::string_view>{} ) for: { } Equals: { }
ToString.tests.cpp:<line number>: passed: parseEnums( "ClassName::EnumName::Value1" ), Equals(std::vector<std::string_view>{"Value1"} ) for: { "Value1" } Equals: { "Value1" }
ToString.tests.cpp:<line number>: passed: parseEnums( "Value1" ), Equals( std::vector<std::string_view>{"Value1"} ) for: { "Value1" } Equals: { "Value1" }
ToString.tests.cpp:<line number>: passed: parseEnums( "EnumName::Value1" ), Equals(std::vector<std::string_view>{"Value1"} ) for: { "Value1" } Equals: { "Value1" }
ToString.tests.cpp:<line number>: passed: parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ), Equals( std::vector<std::string_view>{"Value1", "Value2"} ) for: { "Value1", "Value2" } Equals: { "Value1", "Value2" }
ToString.tests.cpp:<line number>: passed: parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ), Equals( std::vector<std::string_view>{"Value1", "Value2", "Value3"} ) for: { "Value1", "Value2", "Value3" } Equals: { "Value1", "Value2", "Value3" }
ToString.tests.cpp:<line number>: passed: parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ), Equals( std::vector<std::string_view>{"Value1", "Value2", "Value3"} ) for: { "Value1", "Value2", "Value3" } Equals: { "Value1", "Value2", "Value3" }
Tricky.tests.cpp:<line number>: passed: p == 0 for: 0 == 0
Message.tests.cpp:<line number>: passed: true with 1 message: 'this MAY be seen IF info is printed for passing assertions'
Message.tests.cpp:<line number>: failed: false with 2 messages: 'this SHOULD be seen' and 'this SHOULD also be seen'
@@ -2719,16 +2664,16 @@ Skip.tests.cpp:<line number>: skipped:
Skip.tests.cpp:<line number>: passed:
Misc.tests.cpp:<line number>: failed: false with 1 message: '3'
Message.tests.cpp:<line number>: failed: false with 2 messages: 'hi' and 'i := 7'
Tag.tests.cpp:<line number>: passed: testcase.tags, VectorContains( Tag( "magic-tag" ) ) && VectorContains( Tag( "."_catch_sr ) ) for: { {?}, {?} } ( Contains: {?} and Contains: {?} )
Tag.tests.cpp:<line number>: passed: testcase.tags, VectorContains( Tag( "magic-tag" ) ) && VectorContains( Tag( "." ) ) for: { {?}, {?} } ( Contains: {?} and Contains: {?} )
Skip.tests.cpp:<line number>: skipped: 'skipping because answer = 43'
StringManip.tests.cpp:<line number>: passed: splitStringRef("", ','), Equals(std::vector<StringRef>()) for: { } Equals: { }
StringManip.tests.cpp:<line number>: passed: splitStringRef("abc", ','), Equals(std::vector<StringRef>{"abc"}) for: { abc } Equals: { abc }
StringManip.tests.cpp:<line number>: passed: splitStringRef("abc,def", ','), Equals(std::vector<StringRef>{"abc", "def"}) for: { abc, def } Equals: { abc, def }
StringManip.tests.cpp:<line number>: passed: splitStringRef("", ','), Equals(std::vector<std::string_view>()) for: { } Equals: { }
StringManip.tests.cpp:<line number>: passed: splitStringRef("abc", ','), Equals(std::vector<std::string_view>{"abc"}) for: { "abc" } Equals: { "abc" }
StringManip.tests.cpp:<line number>: passed: splitStringRef("abc,def", ','), Equals(std::vector<std::string_view>{"abc", "def"}) for: { "abc", "def" } Equals: { "abc", "def" }
Message.tests.cpp:<line number>: failed: false with 4 messages: 'Count 1 to 3...' and '1' and '2' and '3'
Message.tests.cpp:<line number>: failed: false with 4 messages: 'Count 4 to 6...' and '4' and '5' and '6'
StringManip.tests.cpp:<line number>: passed: !(startsWith("", 'c')) for: !false
StringManip.tests.cpp:<line number>: passed: startsWith(std::string("abc"), 'a') for: true
StringManip.tests.cpp:<line number>: passed: startsWith("def"_catch_sr, 'd') for: true
StringManip.tests.cpp:<line number>: passed: startsWith("def", 'd') for: true
ToStringGeneral.tests.cpp:<line number>: passed: Catch::Detail::stringify( emptyMap ) == "{ }" for: "{ }" == "{ }"
ToStringGeneral.tests.cpp:<line number>: passed: Catch::Detail::stringify( map ) == "{ { \"one\", 1 } }" for: "{ { "one", 1 } }" == "{ { "one", 1 } }"
ToStringGeneral.tests.cpp:<line number>: passed: Catch::Detail::stringify( map ) == "{ { \"abc\", 1 }, { \"def\", 2 }, { \"ghi\", 3 } }" for: "{ { "abc", 1 }, { "def", 2 }, { "ghi", 3 } }"
@@ -2788,7 +2733,7 @@ Generators.tests.cpp:<line number>: passed: strlen(std::get<0>(data)) == static_
Generators.tests.cpp:<line number>: passed: strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)) for: 5 == 5
Generators.tests.cpp:<line number>: passed: strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)) for: 6 == 6
Tag.tests.cpp:<line number>: passed: testcase.tags.size() == 1 for: 1 == 1
Tag.tests.cpp:<line number>: passed: testcase.tags[0].original == "magic.tag"_catch_sr for: magic.tag == magic.tag
Tag.tests.cpp:<line number>: passed: testcase.tags[0].original == "magic.tag" for: "magic.tag" == "magic.tag"
Skip.tests.cpp:<line number>: skipped:
Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'Why would you throw a std::string?'
Misc.tests.cpp:<line number>: passed: result == "\"wide load\"" for: ""wide load"" == ""wide load""
@@ -2888,7 +2833,7 @@ InternalBenchmark.tests.cpp:<line number>: passed: med == 18. for: 18.0 == 18.0
InternalBenchmark.tests.cpp:<line number>: passed: q3 == 23. for: 23.0 == 23.0
Misc.tests.cpp:<line number>: passed:
Misc.tests.cpp:<line number>: passed:
test cases: 435 | 317 passed | 95 failed | 6 skipped | 17 failed as expected
assertions: 2303 | 2105 passed | 157 failed | 41 failed as expected
test cases: 433 | 315 passed | 95 failed | 6 skipped | 17 failed as expected
assertions: 2250 | 2052 passed | 157 failed | 41 failed as expected

View File

@@ -560,9 +560,9 @@ Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'c
Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'custom std exception'
Approx.tests.cpp:<line number>: passed: 101.000001 != Approx(100).epsilon(0.01) for: 101.00000099999999748 != Approx( 100.0 )
Approx.tests.cpp:<line number>: passed: std::pow(10, -5) != Approx(std::pow(10, -7)) for: 0.00001 != Approx( 0.0000001 )
ToString.tests.cpp:<line number>: passed: enumInfo->lookup(0) == "Value1" for: Value1 == "Value1"
ToString.tests.cpp:<line number>: passed: enumInfo->lookup(1) == "Value2" for: Value2 == "Value2"
ToString.tests.cpp:<line number>: passed: enumInfo->lookup(3) == "{** unexpected enum value **}" for: {** unexpected enum value **}
ToString.tests.cpp:<line number>: passed: enumInfo->lookup(0) == "Value1" for: "Value1" == "Value1"
ToString.tests.cpp:<line number>: passed: enumInfo->lookup(1) == "Value2" for: "Value2" == "Value2"
ToString.tests.cpp:<line number>: passed: enumInfo->lookup(3) == "{** unexpected enum value **}" for: "{** unexpected enum value **}"
==
"{** unexpected enum value **}"
Skip.tests.cpp:<line number>: skipped: 'This generator is empty'
@@ -1800,61 +1800,6 @@ Matchers.tests.cpp:<line number>: passed: testStringForMatching(), StartsWith( "
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"
Matchers.tests.cpp:<line number>: passed: testStringForMatching(), EndsWith( " SuBsTrInG", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" ends with: " substring" (case insensitive)
String.tests.cpp:<line number>: passed: empty.empty() for: true
String.tests.cpp:<line number>: passed: empty.size() == 0 for: 0 == 0
String.tests.cpp:<line number>: passed: std::strcmp( empty.data(), "" ) == 0 for: 0 == 0
String.tests.cpp:<line number>: passed: s.empty() == false for: false == false
String.tests.cpp:<line number>: passed: s.size() == 5 for: 5 == 5
String.tests.cpp:<line number>: passed: std::strcmp( rawChars, "hello" ) == 0 for: 0 == 0
String.tests.cpp:<line number>: passed: s.data() == rawChars for: "hello" == "hello"
String.tests.cpp:<line number>: passed: original == "original"
String.tests.cpp:<line number>: passed: original.data()
String.tests.cpp:<line number>: passed: original.begin() == copy.begin() for: "original string" == "original string"
String.tests.cpp:<line number>: passed: original.begin() == copy.begin() for: "original string" == "original string"
String.tests.cpp:<line number>: passed: ss.empty() == false for: false == false
String.tests.cpp:<line number>: passed: ss.size() == 5 for: 5 == 5
String.tests.cpp:<line number>: passed: std::strncmp( ss.data(), "hello", 5 ) == 0 for: 0 == 0
String.tests.cpp:<line number>: passed: ss == "hello" for: hello == "hello"
String.tests.cpp:<line number>: passed: ss.size() == 6 for: 6 == 6
String.tests.cpp:<line number>: passed: std::strcmp( ss.data(), "world!" ) == 0 for: 0 == 0
String.tests.cpp:<line number>: passed: s.data() == s2.data() for: "hello world!" == "hello world!"
String.tests.cpp:<line number>: passed: s.data() == ss.data() for: "hello world!" == "hello world!"
String.tests.cpp:<line number>: passed: s.substr(s.size() + 1, 123).empty() for: true
String.tests.cpp:<line number>: passed: std::strcmp(ss.data(), "world!") == 0 for: 0 == 0
String.tests.cpp:<line number>: passed: s.substr(1'000'000, 1).empty() for: true
String.tests.cpp:<line number>: passed: reinterpret_cast<char*>(buffer1) != reinterpret_cast<char*>(buffer2) for: "Hello" != "Hello"
String.tests.cpp:<line number>: passed: left == right for: Hello == Hello
String.tests.cpp:<line number>: passed: left != left.substr(0, 3) for: Hello != Hel
String.tests.cpp:<line number>: passed: sr == "a standard string" for: a standard string == "a standard string"
String.tests.cpp:<line number>: passed: sr.size() == stdStr.size() for: 17 == 17
String.tests.cpp:<line number>: passed: sr == "a standard string" for: a standard string == "a standard string"
String.tests.cpp:<line number>: passed: sr.size() == stdStr.size() for: 17 == 17
String.tests.cpp:<line number>: passed: sr == "a standard string" for: a standard string == "a standard string"
String.tests.cpp:<line number>: passed: sr.size() == stdStr.size() for: 17 == 17
String.tests.cpp:<line number>: passed: stdStr == "a stringref" for: "a stringref" == "a stringref"
String.tests.cpp:<line number>: passed: stdStr.size() == sr.size() for: 11 == 11
String.tests.cpp:<line number>: passed: stdStr == "a stringref" for: "a stringref" == "a stringref"
String.tests.cpp:<line number>: passed: stdStr.size() == sr.size() for: 11 == 11
String.tests.cpp:<line number>: passed: lhs == "some string += the stringref contents" for: "some string += the stringref contents"
==
"some string += the stringref contents"
String.tests.cpp:<line number>: passed: together == "abrakadabra" for: "abrakadabra" == "abrakadabra"
String.tests.cpp:<line number>: passed: with 1 message: 'empty.size() == 0'
String.tests.cpp:<line number>: passed: with 1 message: 'empty.begin() == empty.end()'
String.tests.cpp:<line number>: passed: with 1 message: 'stringref.size() == 3'
String.tests.cpp:<line number>: passed: with 1 message: 'stringref.data() == abc'
String.tests.cpp:<line number>: passed: with 1 message: 'stringref.begin() == abc'
String.tests.cpp:<line number>: passed: with 1 message: 'stringref.begin() != stringref.end()'
String.tests.cpp:<line number>: passed: with 1 message: 'stringref.substr(10, 0).empty()'
String.tests.cpp:<line number>: passed: with 1 message: 'stringref.substr(2, 1).data() == abc + 2'
String.tests.cpp:<line number>: passed: with 1 message: 'stringref[1] == 'b''
String.tests.cpp:<line number>: passed: with 1 message: 'shortened.size() == 2'
String.tests.cpp:<line number>: passed: with 1 message: 'shortened.data() == abc'
String.tests.cpp:<line number>: passed: with 1 message: 'shortened.begin() != shortened.end()'
String.tests.cpp:<line number>: passed: with 1 message: '!(sr1.empty())'
String.tests.cpp:<line number>: passed: with 1 message: 'sr1.size() == 3'
String.tests.cpp:<line number>: passed: with 1 message: 'sr2.empty()'
String.tests.cpp:<line number>: passed: with 1 message: 'sr2.size() == 0'
ToString.tests.cpp:<line number>: passed: ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc""
ToString.tests.cpp:<line number>: passed: ::Catch::Detail::stringify( no_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc""
ToString.tests.cpp:<line number>: passed: ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc""
@@ -1895,7 +1840,7 @@ Tag.tests.cpp:<line number>: passed: registry.add( "[the @ is not at the start]"
Tag.tests.cpp:<line number>: passed: registry.add( "@no square bracket at start]", "", Catch::SourceLineInfo( "file", 3 ) )
Tag.tests.cpp:<line number>: passed: registry.add( "[@no square bracket at end", "", Catch::SourceLineInfo( "file", 3 ) )
Tag.tests.cpp:<line number>: passed: testCase.tags.size() == 2 for: 2 == 2
Tag.tests.cpp:<line number>: passed: testCase.tags, VectorContains( Tag( "tag with spaces" ) ) && VectorContains( Tag( "I said \"good day\" sir!"_catch_sr ) ) for: { {?}, {?} } ( Contains: {?} and Contains: {?} )
Tag.tests.cpp:<line number>: passed: testCase.tags, VectorContains( Tag( "tag with spaces" ) ) && VectorContains( Tag( "I said \"good day\" sir!" ) ) for: { {?}, {?} } ( Contains: {?} and Contains: {?} )
Class.tests.cpp:<line number>: passed: Template_Fixture<TestType>::m_a == 1 for: 1 == 1
Class.tests.cpp:<line number>: passed: Template_Fixture<TestType>::m_a == 1 for: 1 == 1
Class.tests.cpp:<line number>: passed: Template_Fixture<TestType>::m_a == 1 for: 1.0 == 1
@@ -2162,18 +2107,18 @@ StringManip.tests.cpp:<line number>: passed: trim(std::string(trailing_whitespac
StringManip.tests.cpp:<line number>: passed: trim(std::string(whitespace_at_both_ends)) == no_whitespace for: "There is no extra whitespace here"
==
"There is no extra whitespace here"
StringManip.tests.cpp:<line number>: passed: trim(StringRef(no_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here
StringManip.tests.cpp:<line number>: passed: trim(std::string_view(no_whitespace)) == std::string_view(no_whitespace) for: "There is no extra whitespace here"
==
There is no extra whitespace here
StringManip.tests.cpp:<line number>: passed: trim(StringRef(leading_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here
"There is no extra whitespace here"
StringManip.tests.cpp:<line number>: passed: trim(std::string_view(leading_whitespace)) == std::string_view(no_whitespace) for: "There is no extra whitespace here"
==
There is no extra whitespace here
StringManip.tests.cpp:<line number>: passed: trim(StringRef(trailing_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here
"There is no extra whitespace here"
StringManip.tests.cpp:<line number>: passed: trim(std::string_view(trailing_whitespace)) == std::string_view(no_whitespace) for: "There is no extra whitespace here"
==
There is no extra whitespace here
StringManip.tests.cpp:<line number>: passed: trim(StringRef(whitespace_at_both_ends)) == StringRef(no_whitespace) for: There is no extra whitespace here
"There is no extra whitespace here"
StringManip.tests.cpp:<line number>: passed: trim(std::string_view(whitespace_at_both_ends)) == std::string_view(no_whitespace) for: "There is no extra whitespace here"
==
There is no extra whitespace here
"There is no extra whitespace here"
MatchersRanges.tests.cpp:<line number>: passed: array_int_a, RangeEquals( c_array ) for: { 1, 2, 3 } elements are { 1, 2, 3 }
MatchersRanges.tests.cpp:<line number>: passed: array_int_a, UnorderedRangeEquals( c_array ) for: { 1, 2, 3 } unordered elements are { 1, 2, 3 }
MatchersRanges.tests.cpp:<line number>: passed: array_int_3, !RangeEquals( array_int_4 ) for: { 1, 2, 3 } not elements are { 1, 2, 3, 4 }
@@ -2635,13 +2580,13 @@ Tricky.tests.cpp:<line number>: passed: ptr.get() == 0 for: 0 == 0
ToStringPair.tests.cpp:<line number>: passed: ::Catch::Detail::stringify( pair ) == "{ { 42, \"Arthur\" }, { \"Ford\", 24 } }" for: "{ { 42, "Arthur" }, { "Ford", 24 } }"
==
"{ { 42, "Arthur" }, { "Ford", 24 } }"
ToString.tests.cpp:<line number>: passed: parseEnums( "" ), Equals( std::vector<Catch::StringRef>{} ) for: { } Equals: { }
ToString.tests.cpp:<line number>: passed: parseEnums( "ClassName::EnumName::Value1" ), Equals(std::vector<Catch::StringRef>{"Value1"} ) for: { Value1 } Equals: { Value1 }
ToString.tests.cpp:<line number>: passed: parseEnums( "Value1" ), Equals( std::vector<Catch::StringRef>{"Value1"} ) for: { Value1 } Equals: { Value1 }
ToString.tests.cpp:<line number>: passed: parseEnums( "EnumName::Value1" ), Equals(std::vector<Catch::StringRef>{"Value1"} ) for: { Value1 } Equals: { Value1 }
ToString.tests.cpp:<line number>: passed: parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2"} ) for: { Value1, Value2 } Equals: { Value1, Value2 }
ToString.tests.cpp:<line number>: passed: parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2", "Value3"} ) for: { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 }
ToString.tests.cpp:<line number>: passed: parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2", "Value3"} ) for: { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 }
ToString.tests.cpp:<line number>: passed: parseEnums( "" ), Equals( std::vector<std::string_view>{} ) for: { } Equals: { }
ToString.tests.cpp:<line number>: passed: parseEnums( "ClassName::EnumName::Value1" ), Equals(std::vector<std::string_view>{"Value1"} ) for: { "Value1" } Equals: { "Value1" }
ToString.tests.cpp:<line number>: passed: parseEnums( "Value1" ), Equals( std::vector<std::string_view>{"Value1"} ) for: { "Value1" } Equals: { "Value1" }
ToString.tests.cpp:<line number>: passed: parseEnums( "EnumName::Value1" ), Equals(std::vector<std::string_view>{"Value1"} ) for: { "Value1" } Equals: { "Value1" }
ToString.tests.cpp:<line number>: passed: parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ), Equals( std::vector<std::string_view>{"Value1", "Value2"} ) for: { "Value1", "Value2" } Equals: { "Value1", "Value2" }
ToString.tests.cpp:<line number>: passed: parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ), Equals( std::vector<std::string_view>{"Value1", "Value2", "Value3"} ) for: { "Value1", "Value2", "Value3" } Equals: { "Value1", "Value2", "Value3" }
ToString.tests.cpp:<line number>: passed: parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ), Equals( std::vector<std::string_view>{"Value1", "Value2", "Value3"} ) for: { "Value1", "Value2", "Value3" } Equals: { "Value1", "Value2", "Value3" }
Tricky.tests.cpp:<line number>: passed: p == 0 for: 0 == 0
Message.tests.cpp:<line number>: passed: true with 1 message: 'this MAY be seen IF info is printed for passing assertions'
Message.tests.cpp:<line number>: failed: false with 2 messages: 'this SHOULD be seen' and 'this SHOULD also be seen'
@@ -2708,16 +2653,16 @@ Skip.tests.cpp:<line number>: skipped:
Skip.tests.cpp:<line number>: passed:
Misc.tests.cpp:<line number>: failed: false with 1 message: '3'
Message.tests.cpp:<line number>: failed: false with 2 messages: 'hi' and 'i := 7'
Tag.tests.cpp:<line number>: passed: testcase.tags, VectorContains( Tag( "magic-tag" ) ) && VectorContains( Tag( "."_catch_sr ) ) for: { {?}, {?} } ( Contains: {?} and Contains: {?} )
Tag.tests.cpp:<line number>: passed: testcase.tags, VectorContains( Tag( "magic-tag" ) ) && VectorContains( Tag( "." ) ) for: { {?}, {?} } ( Contains: {?} and Contains: {?} )
Skip.tests.cpp:<line number>: skipped: 'skipping because answer = 43'
StringManip.tests.cpp:<line number>: passed: splitStringRef("", ','), Equals(std::vector<StringRef>()) for: { } Equals: { }
StringManip.tests.cpp:<line number>: passed: splitStringRef("abc", ','), Equals(std::vector<StringRef>{"abc"}) for: { abc } Equals: { abc }
StringManip.tests.cpp:<line number>: passed: splitStringRef("abc,def", ','), Equals(std::vector<StringRef>{"abc", "def"}) for: { abc, def } Equals: { abc, def }
StringManip.tests.cpp:<line number>: passed: splitStringRef("", ','), Equals(std::vector<std::string_view>()) for: { } Equals: { }
StringManip.tests.cpp:<line number>: passed: splitStringRef("abc", ','), Equals(std::vector<std::string_view>{"abc"}) for: { "abc" } Equals: { "abc" }
StringManip.tests.cpp:<line number>: passed: splitStringRef("abc,def", ','), Equals(std::vector<std::string_view>{"abc", "def"}) for: { "abc", "def" } Equals: { "abc", "def" }
Message.tests.cpp:<line number>: failed: false with 4 messages: 'Count 1 to 3...' and '1' and '2' and '3'
Message.tests.cpp:<line number>: failed: false with 4 messages: 'Count 4 to 6...' and '4' and '5' and '6'
StringManip.tests.cpp:<line number>: passed: !(startsWith("", 'c')) for: !false
StringManip.tests.cpp:<line number>: passed: startsWith(std::string("abc"), 'a') for: true
StringManip.tests.cpp:<line number>: passed: startsWith("def"_catch_sr, 'd') for: true
StringManip.tests.cpp:<line number>: passed: startsWith("def", 'd') for: true
ToStringGeneral.tests.cpp:<line number>: passed: Catch::Detail::stringify( emptyMap ) == "{ }" for: "{ }" == "{ }"
ToStringGeneral.tests.cpp:<line number>: passed: Catch::Detail::stringify( map ) == "{ { \"one\", 1 } }" for: "{ { "one", 1 } }" == "{ { "one", 1 } }"
ToStringGeneral.tests.cpp:<line number>: passed: Catch::Detail::stringify( map ) == "{ { \"abc\", 1 }, { \"def\", 2 }, { \"ghi\", 3 } }" for: "{ { "abc", 1 }, { "def", 2 }, { "ghi", 3 } }"
@@ -2777,7 +2722,7 @@ Generators.tests.cpp:<line number>: passed: strlen(std::get<0>(data)) == static_
Generators.tests.cpp:<line number>: passed: strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)) for: 5 == 5
Generators.tests.cpp:<line number>: passed: strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(data)) for: 6 == 6
Tag.tests.cpp:<line number>: passed: testcase.tags.size() == 1 for: 1 == 1
Tag.tests.cpp:<line number>: passed: testcase.tags[0].original == "magic.tag"_catch_sr for: magic.tag == magic.tag
Tag.tests.cpp:<line number>: passed: testcase.tags[0].original == "magic.tag" for: "magic.tag" == "magic.tag"
Skip.tests.cpp:<line number>: skipped:
Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'Why would you throw a std::string?'
Misc.tests.cpp:<line number>: passed: result == "\"wide load\"" for: ""wide load"" == ""wide load""
@@ -2877,7 +2822,7 @@ InternalBenchmark.tests.cpp:<line number>: passed: med == 18. for: 18.0 == 18.0
InternalBenchmark.tests.cpp:<line number>: passed: q3 == 23. for: 23.0 == 23.0
Misc.tests.cpp:<line number>: passed:
Misc.tests.cpp:<line number>: passed:
test cases: 435 | 317 passed | 95 failed | 6 skipped | 17 failed as expected
assertions: 2303 | 2105 passed | 157 failed | 41 failed as expected
test cases: 433 | 315 passed | 95 failed | 6 skipped | 17 failed as expected
assertions: 2250 | 2052 passed | 157 failed | 41 failed as expected

View File

@@ -1719,6 +1719,6 @@ due to unexpected exception with message:
Why would you throw a std::string?
===============================================================================
test cases: 435 | 335 passed | 76 failed | 7 skipped | 17 failed as expected
assertions: 2282 | 2105 passed | 136 failed | 41 failed as expected
test cases: 433 | 333 passed | 76 failed | 7 skipped | 17 failed as expected
assertions: 2229 | 2052 passed | 136 failed | 41 failed as expected

View File

@@ -4157,17 +4157,17 @@ ToString.tests.cpp:<line number>
ToString.tests.cpp:<line number>: PASSED:
CHECK( enumInfo->lookup(0) == "Value1" )
with expansion:
Value1 == "Value1"
"Value1" == "Value1"
ToString.tests.cpp:<line number>: PASSED:
CHECK( enumInfo->lookup(1) == "Value2" )
with expansion:
Value2 == "Value2"
"Value2" == "Value2"
ToString.tests.cpp:<line number>: PASSED:
CHECK( enumInfo->lookup(3) == "{** unexpected enum value **}" )
with expansion:
{** unexpected enum value **}
"{** unexpected enum value **}"
==
"{** unexpected enum value **}"
@@ -11458,419 +11458,6 @@ with expansion:
"this string contains 'abc' as a substring" ends with: " substring" (case
insensitive)
-------------------------------------------------------------------------------
StringRef
Empty string
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( empty.empty() )
with expansion:
true
String.tests.cpp:<line number>: PASSED:
REQUIRE( empty.size() == 0 )
with expansion:
0 == 0
String.tests.cpp:<line number>: PASSED:
REQUIRE( std::strcmp( empty.data(), "" ) == 0 )
with expansion:
0 == 0
-------------------------------------------------------------------------------
StringRef
From string literal
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( s.empty() == false )
with expansion:
false == false
String.tests.cpp:<line number>: PASSED:
REQUIRE( s.size() == 5 )
with expansion:
5 == 5
String.tests.cpp:<line number>: PASSED:
REQUIRE( std::strcmp( rawChars, "hello" ) == 0 )
with expansion:
0 == 0
String.tests.cpp:<line number>: PASSED:
REQUIRE( s.data() == rawChars )
with expansion:
"hello" == "hello"
-------------------------------------------------------------------------------
StringRef
From sub-string
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( original == "original" )
String.tests.cpp:<line number>: PASSED:
REQUIRE_NOTHROW( original.data() )
-------------------------------------------------------------------------------
StringRef
Copy construction is shallow
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( original.begin() == copy.begin() )
with expansion:
"original string" == "original string"
-------------------------------------------------------------------------------
StringRef
Copy assignment is shallow
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( original.begin() == copy.begin() )
with expansion:
"original string" == "original string"
-------------------------------------------------------------------------------
StringRef
Substrings
zero-based substring
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( ss.empty() == false )
with expansion:
false == false
String.tests.cpp:<line number>: PASSED:
REQUIRE( ss.size() == 5 )
with expansion:
5 == 5
String.tests.cpp:<line number>: PASSED:
REQUIRE( std::strncmp( ss.data(), "hello", 5 ) == 0 )
with expansion:
0 == 0
String.tests.cpp:<line number>: PASSED:
REQUIRE( ss == "hello" )
with expansion:
hello == "hello"
-------------------------------------------------------------------------------
StringRef
Substrings
non-zero-based substring
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( ss.size() == 6 )
with expansion:
6 == 6
String.tests.cpp:<line number>: PASSED:
REQUIRE( std::strcmp( ss.data(), "world!" ) == 0 )
with expansion:
0 == 0
-------------------------------------------------------------------------------
StringRef
Substrings
Pointer values of full refs should match
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( s.data() == s2.data() )
with expansion:
"hello world!" == "hello world!"
-------------------------------------------------------------------------------
StringRef
Substrings
Pointer values of substring refs should also match
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( s.data() == ss.data() )
with expansion:
"hello world!" == "hello world!"
-------------------------------------------------------------------------------
StringRef
Substrings
Past the end substring
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( s.substr(s.size() + 1, 123).empty() )
with expansion:
true
-------------------------------------------------------------------------------
StringRef
Substrings
Substring off the end are trimmed
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( std::strcmp(ss.data(), "world!") == 0 )
with expansion:
0 == 0
-------------------------------------------------------------------------------
StringRef
Substrings
substring start after the end is empty
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( s.substr(1'000'000, 1).empty() )
with expansion:
true
-------------------------------------------------------------------------------
StringRef
Comparisons are deep
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
CHECK( reinterpret_cast<char*>(buffer1) != reinterpret_cast<char*>(buffer2) )
with expansion:
"Hello" != "Hello"
String.tests.cpp:<line number>: PASSED:
REQUIRE( left == right )
with expansion:
Hello == Hello
String.tests.cpp:<line number>: PASSED:
REQUIRE( left != left.substr(0, 3) )
with expansion:
Hello != Hel
-------------------------------------------------------------------------------
StringRef
from std::string
implicitly constructed
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( sr == "a standard string" )
with expansion:
a standard string == "a standard string"
String.tests.cpp:<line number>: PASSED:
REQUIRE( sr.size() == stdStr.size() )
with expansion:
17 == 17
-------------------------------------------------------------------------------
StringRef
from std::string
explicitly constructed
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( sr == "a standard string" )
with expansion:
a standard string == "a standard string"
String.tests.cpp:<line number>: PASSED:
REQUIRE( sr.size() == stdStr.size() )
with expansion:
17 == 17
-------------------------------------------------------------------------------
StringRef
from std::string
assigned
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( sr == "a standard string" )
with expansion:
a standard string == "a standard string"
String.tests.cpp:<line number>: PASSED:
REQUIRE( sr.size() == stdStr.size() )
with expansion:
17 == 17
-------------------------------------------------------------------------------
StringRef
to std::string
explicitly constructed
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( stdStr == "a stringref" )
with expansion:
"a stringref" == "a stringref"
String.tests.cpp:<line number>: PASSED:
REQUIRE( stdStr.size() == sr.size() )
with expansion:
11 == 11
-------------------------------------------------------------------------------
StringRef
to std::string
assigned
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( stdStr == "a stringref" )
with expansion:
"a stringref" == "a stringref"
String.tests.cpp:<line number>: PASSED:
REQUIRE( stdStr.size() == sr.size() )
with expansion:
11 == 11
-------------------------------------------------------------------------------
StringRef
std::string += StringRef
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( lhs == "some string += the stringref contents" )
with expansion:
"some string += the stringref contents"
==
"some string += the stringref contents"
-------------------------------------------------------------------------------
StringRef
StringRef + StringRef
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( together == "abrakadabra" )
with expansion:
"abrakadabra" == "abrakadabra"
-------------------------------------------------------------------------------
StringRef at compilation time
Simple constructors
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
with message:
empty.size() == 0
String.tests.cpp:<line number>: PASSED:
with message:
empty.begin() == empty.end()
String.tests.cpp:<line number>: PASSED:
with message:
stringref.size() == 3
String.tests.cpp:<line number>: PASSED:
with message:
stringref.data() == abc
String.tests.cpp:<line number>: PASSED:
with message:
stringref.begin() == abc
String.tests.cpp:<line number>: PASSED:
with message:
stringref.begin() != stringref.end()
String.tests.cpp:<line number>: PASSED:
with message:
stringref.substr(10, 0).empty()
String.tests.cpp:<line number>: PASSED:
with message:
stringref.substr(2, 1).data() == abc + 2
String.tests.cpp:<line number>: PASSED:
with message:
stringref[1] == 'b'
String.tests.cpp:<line number>: PASSED:
with message:
shortened.size() == 2
String.tests.cpp:<line number>: PASSED:
with message:
shortened.data() == abc
String.tests.cpp:<line number>: PASSED:
with message:
shortened.begin() != shortened.end()
-------------------------------------------------------------------------------
StringRef at compilation time
UDL construction
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
with message:
!(sr1.empty())
String.tests.cpp:<line number>: PASSED:
with message:
sr1.size() == 3
String.tests.cpp:<line number>: PASSED:
with message:
sr2.empty()
String.tests.cpp:<line number>: PASSED:
with message:
sr2.size() == 0
-------------------------------------------------------------------------------
Stringifying char arrays with statically known sizes - char
-------------------------------------------------------------------------------
@@ -12058,7 +11645,7 @@ with expansion:
2 == 2
Tag.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( testCase.tags, VectorContains( Tag( "tag with spaces" ) ) && VectorContains( Tag( "I said \"good day\" sir!"_catch_sr ) ) )
REQUIRE_THAT( testCase.tags, VectorContains( Tag( "tag with spaces" ) ) && VectorContains( Tag( "I said \"good day\" sir!" ) ) )
with expansion:
{ {?}, {?} } ( Contains: {?} and Contains: {?} )
@@ -14085,32 +13672,32 @@ with expansion:
"There is no extra whitespace here"
StringManip.tests.cpp:<line number>: PASSED:
REQUIRE( trim(StringRef(no_whitespace)) == StringRef(no_whitespace) )
REQUIRE( trim(std::string_view(no_whitespace)) == std::string_view(no_whitespace) )
with expansion:
There is no extra whitespace here
"There is no extra whitespace here"
==
There is no extra whitespace here
"There is no extra whitespace here"
StringManip.tests.cpp:<line number>: PASSED:
REQUIRE( trim(StringRef(leading_whitespace)) == StringRef(no_whitespace) )
REQUIRE( trim(std::string_view(leading_whitespace)) == std::string_view(no_whitespace) )
with expansion:
There is no extra whitespace here
"There is no extra whitespace here"
==
There is no extra whitespace here
"There is no extra whitespace here"
StringManip.tests.cpp:<line number>: PASSED:
REQUIRE( trim(StringRef(trailing_whitespace)) == StringRef(no_whitespace) )
REQUIRE( trim(std::string_view(trailing_whitespace)) == std::string_view(no_whitespace) )
with expansion:
There is no extra whitespace here
"There is no extra whitespace here"
==
There is no extra whitespace here
"There is no extra whitespace here"
StringManip.tests.cpp:<line number>: PASSED:
REQUIRE( trim(StringRef(whitespace_at_both_ends)) == StringRef(no_whitespace) )
REQUIRE( trim(std::string_view(whitespace_at_both_ends)) == std::string_view(no_whitespace) )
with expansion:
There is no extra whitespace here
"There is no extra whitespace here"
==
There is no extra whitespace here
"There is no extra whitespace here"
-------------------------------------------------------------------------------
Type conversions of RangeEquals and similar
@@ -17569,7 +17156,7 @@ ToString.tests.cpp:<line number>
...............................................................................
ToString.tests.cpp:<line number>: PASSED:
CHECK_THAT( parseEnums( "" ), Equals( std::vector<Catch::StringRef>{} ) )
CHECK_THAT( parseEnums( "" ), Equals( std::vector<std::string_view>{} ) )
with expansion:
{ } Equals: { }
@@ -17581,19 +17168,19 @@ ToString.tests.cpp:<line number>
...............................................................................
ToString.tests.cpp:<line number>: PASSED:
CHECK_THAT( parseEnums( "ClassName::EnumName::Value1" ), Equals(std::vector<Catch::StringRef>{"Value1"} ) )
CHECK_THAT( parseEnums( "ClassName::EnumName::Value1" ), Equals(std::vector<std::string_view>{"Value1"} ) )
with expansion:
{ Value1 } Equals: { Value1 }
{ "Value1" } Equals: { "Value1" }
ToString.tests.cpp:<line number>: PASSED:
CHECK_THAT( parseEnums( "Value1" ), Equals( std::vector<Catch::StringRef>{"Value1"} ) )
CHECK_THAT( parseEnums( "Value1" ), Equals( std::vector<std::string_view>{"Value1"} ) )
with expansion:
{ Value1 } Equals: { Value1 }
{ "Value1" } Equals: { "Value1" }
ToString.tests.cpp:<line number>: PASSED:
CHECK_THAT( parseEnums( "EnumName::Value1" ), Equals(std::vector<Catch::StringRef>{"Value1"} ) )
CHECK_THAT( parseEnums( "EnumName::Value1" ), Equals(std::vector<std::string_view>{"Value1"} ) )
with expansion:
{ Value1 } Equals: { Value1 }
{ "Value1" } Equals: { "Value1" }
-------------------------------------------------------------------------------
parseEnums
@@ -17603,19 +17190,19 @@ ToString.tests.cpp:<line number>
...............................................................................
ToString.tests.cpp:<line number>: PASSED:
CHECK_THAT( parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2"} ) )
CHECK_THAT( parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ), Equals( std::vector<std::string_view>{"Value1", "Value2"} ) )
with expansion:
{ Value1, Value2 } Equals: { Value1, Value2 }
{ "Value1", "Value2" } Equals: { "Value1", "Value2" }
ToString.tests.cpp:<line number>: PASSED:
CHECK_THAT( parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2", "Value3"} ) )
CHECK_THAT( parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ), Equals( std::vector<std::string_view>{"Value1", "Value2", "Value3"} ) )
with expansion:
{ Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 }
{ "Value1", "Value2", "Value3" } Equals: { "Value1", "Value2", "Value3" }
ToString.tests.cpp:<line number>: PASSED:
CHECK_THAT( parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2", "Value3"} ) )
CHECK_THAT( parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ), Equals( std::vector<std::string_view>{"Value1", "Value2", "Value3"} ) )
with expansion:
{ Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 }
{ "Value1", "Value2", "Value3" } Equals: { "Value1", "Value2", "Value3" }
-------------------------------------------------------------------------------
pointer to class
@@ -18110,7 +17697,7 @@ Tag.tests.cpp:<line number>
...............................................................................
Tag.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( testcase.tags, VectorContains( Tag( "magic-tag" ) ) && VectorContains( Tag( "."_catch_sr ) ) )
REQUIRE_THAT( testcase.tags, VectorContains( Tag( "magic-tag" ) ) && VectorContains( Tag( "." ) ) )
with expansion:
{ {?}, {?} } ( Contains: {?} and Contains: {?} )
@@ -18131,19 +17718,19 @@ StringManip.tests.cpp:<line number>
...............................................................................
StringManip.tests.cpp:<line number>: PASSED:
CHECK_THAT( splitStringRef("", ','), Equals(std::vector<StringRef>()) )
CHECK_THAT( splitStringRef("", ','), Equals(std::vector<std::string_view>()) )
with expansion:
{ } Equals: { }
StringManip.tests.cpp:<line number>: PASSED:
CHECK_THAT( splitStringRef("abc", ','), Equals(std::vector<StringRef>{"abc"}) )
CHECK_THAT( splitStringRef("abc", ','), Equals(std::vector<std::string_view>{"abc"}) )
with expansion:
{ abc } Equals: { abc }
{ "abc" } Equals: { "abc" }
StringManip.tests.cpp:<line number>: PASSED:
CHECK_THAT( splitStringRef("abc,def", ','), Equals(std::vector<StringRef>{"abc", "def"}) )
CHECK_THAT( splitStringRef("abc,def", ','), Equals(std::vector<std::string_view>{"abc", "def"}) )
with expansion:
{ abc, def } Equals: { abc, def }
{ "abc", "def" } Equals: { "abc", "def" }
-------------------------------------------------------------------------------
stacks unscoped info in loops
@@ -18184,7 +17771,7 @@ with expansion:
true
StringManip.tests.cpp:<line number>: PASSED:
CHECK( startsWith("def"_catch_sr, 'd') )
CHECK( startsWith("def", 'd') )
with expansion:
true
@@ -18560,9 +18147,9 @@ with expansion:
1 == 1
Tag.tests.cpp:<line number>: PASSED:
REQUIRE( testcase.tags[0].original == "magic.tag"_catch_sr )
REQUIRE( testcase.tags[0].original == "magic.tag" )
with expansion:
magic.tag == magic.tag
"magic.tag" == "magic.tag"
-------------------------------------------------------------------------------
tests can be skipped dynamically at runtime
@@ -19295,6 +18882,6 @@ Misc.tests.cpp:<line number>
Misc.tests.cpp:<line number>: PASSED:
===============================================================================
test cases: 435 | 317 passed | 95 failed | 6 skipped | 17 failed as expected
assertions: 2303 | 2105 passed | 157 failed | 41 failed as expected
test cases: 433 | 315 passed | 95 failed | 6 skipped | 17 failed as expected
assertions: 2250 | 2052 passed | 157 failed | 41 failed as expected

View File

@@ -4155,17 +4155,17 @@ ToString.tests.cpp:<line number>
ToString.tests.cpp:<line number>: PASSED:
CHECK( enumInfo->lookup(0) == "Value1" )
with expansion:
Value1 == "Value1"
"Value1" == "Value1"
ToString.tests.cpp:<line number>: PASSED:
CHECK( enumInfo->lookup(1) == "Value2" )
with expansion:
Value2 == "Value2"
"Value2" == "Value2"
ToString.tests.cpp:<line number>: PASSED:
CHECK( enumInfo->lookup(3) == "{** unexpected enum value **}" )
with expansion:
{** unexpected enum value **}
"{** unexpected enum value **}"
==
"{** unexpected enum value **}"
@@ -11451,419 +11451,6 @@ with expansion:
"this string contains 'abc' as a substring" ends with: " substring" (case
insensitive)
-------------------------------------------------------------------------------
StringRef
Empty string
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( empty.empty() )
with expansion:
true
String.tests.cpp:<line number>: PASSED:
REQUIRE( empty.size() == 0 )
with expansion:
0 == 0
String.tests.cpp:<line number>: PASSED:
REQUIRE( std::strcmp( empty.data(), "" ) == 0 )
with expansion:
0 == 0
-------------------------------------------------------------------------------
StringRef
From string literal
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( s.empty() == false )
with expansion:
false == false
String.tests.cpp:<line number>: PASSED:
REQUIRE( s.size() == 5 )
with expansion:
5 == 5
String.tests.cpp:<line number>: PASSED:
REQUIRE( std::strcmp( rawChars, "hello" ) == 0 )
with expansion:
0 == 0
String.tests.cpp:<line number>: PASSED:
REQUIRE( s.data() == rawChars )
with expansion:
"hello" == "hello"
-------------------------------------------------------------------------------
StringRef
From sub-string
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( original == "original" )
String.tests.cpp:<line number>: PASSED:
REQUIRE_NOTHROW( original.data() )
-------------------------------------------------------------------------------
StringRef
Copy construction is shallow
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( original.begin() == copy.begin() )
with expansion:
"original string" == "original string"
-------------------------------------------------------------------------------
StringRef
Copy assignment is shallow
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( original.begin() == copy.begin() )
with expansion:
"original string" == "original string"
-------------------------------------------------------------------------------
StringRef
Substrings
zero-based substring
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( ss.empty() == false )
with expansion:
false == false
String.tests.cpp:<line number>: PASSED:
REQUIRE( ss.size() == 5 )
with expansion:
5 == 5
String.tests.cpp:<line number>: PASSED:
REQUIRE( std::strncmp( ss.data(), "hello", 5 ) == 0 )
with expansion:
0 == 0
String.tests.cpp:<line number>: PASSED:
REQUIRE( ss == "hello" )
with expansion:
hello == "hello"
-------------------------------------------------------------------------------
StringRef
Substrings
non-zero-based substring
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( ss.size() == 6 )
with expansion:
6 == 6
String.tests.cpp:<line number>: PASSED:
REQUIRE( std::strcmp( ss.data(), "world!" ) == 0 )
with expansion:
0 == 0
-------------------------------------------------------------------------------
StringRef
Substrings
Pointer values of full refs should match
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( s.data() == s2.data() )
with expansion:
"hello world!" == "hello world!"
-------------------------------------------------------------------------------
StringRef
Substrings
Pointer values of substring refs should also match
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( s.data() == ss.data() )
with expansion:
"hello world!" == "hello world!"
-------------------------------------------------------------------------------
StringRef
Substrings
Past the end substring
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( s.substr(s.size() + 1, 123).empty() )
with expansion:
true
-------------------------------------------------------------------------------
StringRef
Substrings
Substring off the end are trimmed
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( std::strcmp(ss.data(), "world!") == 0 )
with expansion:
0 == 0
-------------------------------------------------------------------------------
StringRef
Substrings
substring start after the end is empty
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( s.substr(1'000'000, 1).empty() )
with expansion:
true
-------------------------------------------------------------------------------
StringRef
Comparisons are deep
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
CHECK( reinterpret_cast<char*>(buffer1) != reinterpret_cast<char*>(buffer2) )
with expansion:
"Hello" != "Hello"
String.tests.cpp:<line number>: PASSED:
REQUIRE( left == right )
with expansion:
Hello == Hello
String.tests.cpp:<line number>: PASSED:
REQUIRE( left != left.substr(0, 3) )
with expansion:
Hello != Hel
-------------------------------------------------------------------------------
StringRef
from std::string
implicitly constructed
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( sr == "a standard string" )
with expansion:
a standard string == "a standard string"
String.tests.cpp:<line number>: PASSED:
REQUIRE( sr.size() == stdStr.size() )
with expansion:
17 == 17
-------------------------------------------------------------------------------
StringRef
from std::string
explicitly constructed
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( sr == "a standard string" )
with expansion:
a standard string == "a standard string"
String.tests.cpp:<line number>: PASSED:
REQUIRE( sr.size() == stdStr.size() )
with expansion:
17 == 17
-------------------------------------------------------------------------------
StringRef
from std::string
assigned
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( sr == "a standard string" )
with expansion:
a standard string == "a standard string"
String.tests.cpp:<line number>: PASSED:
REQUIRE( sr.size() == stdStr.size() )
with expansion:
17 == 17
-------------------------------------------------------------------------------
StringRef
to std::string
explicitly constructed
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( stdStr == "a stringref" )
with expansion:
"a stringref" == "a stringref"
String.tests.cpp:<line number>: PASSED:
REQUIRE( stdStr.size() == sr.size() )
with expansion:
11 == 11
-------------------------------------------------------------------------------
StringRef
to std::string
assigned
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( stdStr == "a stringref" )
with expansion:
"a stringref" == "a stringref"
String.tests.cpp:<line number>: PASSED:
REQUIRE( stdStr.size() == sr.size() )
with expansion:
11 == 11
-------------------------------------------------------------------------------
StringRef
std::string += StringRef
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( lhs == "some string += the stringref contents" )
with expansion:
"some string += the stringref contents"
==
"some string += the stringref contents"
-------------------------------------------------------------------------------
StringRef
StringRef + StringRef
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
REQUIRE( together == "abrakadabra" )
with expansion:
"abrakadabra" == "abrakadabra"
-------------------------------------------------------------------------------
StringRef at compilation time
Simple constructors
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
with message:
empty.size() == 0
String.tests.cpp:<line number>: PASSED:
with message:
empty.begin() == empty.end()
String.tests.cpp:<line number>: PASSED:
with message:
stringref.size() == 3
String.tests.cpp:<line number>: PASSED:
with message:
stringref.data() == abc
String.tests.cpp:<line number>: PASSED:
with message:
stringref.begin() == abc
String.tests.cpp:<line number>: PASSED:
with message:
stringref.begin() != stringref.end()
String.tests.cpp:<line number>: PASSED:
with message:
stringref.substr(10, 0).empty()
String.tests.cpp:<line number>: PASSED:
with message:
stringref.substr(2, 1).data() == abc + 2
String.tests.cpp:<line number>: PASSED:
with message:
stringref[1] == 'b'
String.tests.cpp:<line number>: PASSED:
with message:
shortened.size() == 2
String.tests.cpp:<line number>: PASSED:
with message:
shortened.data() == abc
String.tests.cpp:<line number>: PASSED:
with message:
shortened.begin() != shortened.end()
-------------------------------------------------------------------------------
StringRef at compilation time
UDL construction
-------------------------------------------------------------------------------
String.tests.cpp:<line number>
...............................................................................
String.tests.cpp:<line number>: PASSED:
with message:
!(sr1.empty())
String.tests.cpp:<line number>: PASSED:
with message:
sr1.size() == 3
String.tests.cpp:<line number>: PASSED:
with message:
sr2.empty()
String.tests.cpp:<line number>: PASSED:
with message:
sr2.size() == 0
-------------------------------------------------------------------------------
Stringifying char arrays with statically known sizes - char
-------------------------------------------------------------------------------
@@ -12051,7 +11638,7 @@ with expansion:
2 == 2
Tag.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( testCase.tags, VectorContains( Tag( "tag with spaces" ) ) && VectorContains( Tag( "I said \"good day\" sir!"_catch_sr ) ) )
REQUIRE_THAT( testCase.tags, VectorContains( Tag( "tag with spaces" ) ) && VectorContains( Tag( "I said \"good day\" sir!" ) ) )
with expansion:
{ {?}, {?} } ( Contains: {?} and Contains: {?} )
@@ -14078,32 +13665,32 @@ with expansion:
"There is no extra whitespace here"
StringManip.tests.cpp:<line number>: PASSED:
REQUIRE( trim(StringRef(no_whitespace)) == StringRef(no_whitespace) )
REQUIRE( trim(std::string_view(no_whitespace)) == std::string_view(no_whitespace) )
with expansion:
There is no extra whitespace here
"There is no extra whitespace here"
==
There is no extra whitespace here
"There is no extra whitespace here"
StringManip.tests.cpp:<line number>: PASSED:
REQUIRE( trim(StringRef(leading_whitespace)) == StringRef(no_whitespace) )
REQUIRE( trim(std::string_view(leading_whitespace)) == std::string_view(no_whitespace) )
with expansion:
There is no extra whitespace here
"There is no extra whitespace here"
==
There is no extra whitespace here
"There is no extra whitespace here"
StringManip.tests.cpp:<line number>: PASSED:
REQUIRE( trim(StringRef(trailing_whitespace)) == StringRef(no_whitespace) )
REQUIRE( trim(std::string_view(trailing_whitespace)) == std::string_view(no_whitespace) )
with expansion:
There is no extra whitespace here
"There is no extra whitespace here"
==
There is no extra whitespace here
"There is no extra whitespace here"
StringManip.tests.cpp:<line number>: PASSED:
REQUIRE( trim(StringRef(whitespace_at_both_ends)) == StringRef(no_whitespace) )
REQUIRE( trim(std::string_view(whitespace_at_both_ends)) == std::string_view(no_whitespace) )
with expansion:
There is no extra whitespace here
"There is no extra whitespace here"
==
There is no extra whitespace here
"There is no extra whitespace here"
-------------------------------------------------------------------------------
Type conversions of RangeEquals and similar
@@ -17558,7 +17145,7 @@ ToString.tests.cpp:<line number>
...............................................................................
ToString.tests.cpp:<line number>: PASSED:
CHECK_THAT( parseEnums( "" ), Equals( std::vector<Catch::StringRef>{} ) )
CHECK_THAT( parseEnums( "" ), Equals( std::vector<std::string_view>{} ) )
with expansion:
{ } Equals: { }
@@ -17570,19 +17157,19 @@ ToString.tests.cpp:<line number>
...............................................................................
ToString.tests.cpp:<line number>: PASSED:
CHECK_THAT( parseEnums( "ClassName::EnumName::Value1" ), Equals(std::vector<Catch::StringRef>{"Value1"} ) )
CHECK_THAT( parseEnums( "ClassName::EnumName::Value1" ), Equals(std::vector<std::string_view>{"Value1"} ) )
with expansion:
{ Value1 } Equals: { Value1 }
{ "Value1" } Equals: { "Value1" }
ToString.tests.cpp:<line number>: PASSED:
CHECK_THAT( parseEnums( "Value1" ), Equals( std::vector<Catch::StringRef>{"Value1"} ) )
CHECK_THAT( parseEnums( "Value1" ), Equals( std::vector<std::string_view>{"Value1"} ) )
with expansion:
{ Value1 } Equals: { Value1 }
{ "Value1" } Equals: { "Value1" }
ToString.tests.cpp:<line number>: PASSED:
CHECK_THAT( parseEnums( "EnumName::Value1" ), Equals(std::vector<Catch::StringRef>{"Value1"} ) )
CHECK_THAT( parseEnums( "EnumName::Value1" ), Equals(std::vector<std::string_view>{"Value1"} ) )
with expansion:
{ Value1 } Equals: { Value1 }
{ "Value1" } Equals: { "Value1" }
-------------------------------------------------------------------------------
parseEnums
@@ -17592,19 +17179,19 @@ ToString.tests.cpp:<line number>
...............................................................................
ToString.tests.cpp:<line number>: PASSED:
CHECK_THAT( parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2"} ) )
CHECK_THAT( parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ), Equals( std::vector<std::string_view>{"Value1", "Value2"} ) )
with expansion:
{ Value1, Value2 } Equals: { Value1, Value2 }
{ "Value1", "Value2" } Equals: { "Value1", "Value2" }
ToString.tests.cpp:<line number>: PASSED:
CHECK_THAT( parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2", "Value3"} ) )
CHECK_THAT( parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ), Equals( std::vector<std::string_view>{"Value1", "Value2", "Value3"} ) )
with expansion:
{ Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 }
{ "Value1", "Value2", "Value3" } Equals: { "Value1", "Value2", "Value3" }
ToString.tests.cpp:<line number>: PASSED:
CHECK_THAT( parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2", "Value3"} ) )
CHECK_THAT( parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ), Equals( std::vector<std::string_view>{"Value1", "Value2", "Value3"} ) )
with expansion:
{ Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 }
{ "Value1", "Value2", "Value3" } Equals: { "Value1", "Value2", "Value3" }
-------------------------------------------------------------------------------
pointer to class
@@ -18099,7 +17686,7 @@ Tag.tests.cpp:<line number>
...............................................................................
Tag.tests.cpp:<line number>: PASSED:
REQUIRE_THAT( testcase.tags, VectorContains( Tag( "magic-tag" ) ) && VectorContains( Tag( "."_catch_sr ) ) )
REQUIRE_THAT( testcase.tags, VectorContains( Tag( "magic-tag" ) ) && VectorContains( Tag( "." ) ) )
with expansion:
{ {?}, {?} } ( Contains: {?} and Contains: {?} )
@@ -18120,19 +17707,19 @@ StringManip.tests.cpp:<line number>
...............................................................................
StringManip.tests.cpp:<line number>: PASSED:
CHECK_THAT( splitStringRef("", ','), Equals(std::vector<StringRef>()) )
CHECK_THAT( splitStringRef("", ','), Equals(std::vector<std::string_view>()) )
with expansion:
{ } Equals: { }
StringManip.tests.cpp:<line number>: PASSED:
CHECK_THAT( splitStringRef("abc", ','), Equals(std::vector<StringRef>{"abc"}) )
CHECK_THAT( splitStringRef("abc", ','), Equals(std::vector<std::string_view>{"abc"}) )
with expansion:
{ abc } Equals: { abc }
{ "abc" } Equals: { "abc" }
StringManip.tests.cpp:<line number>: PASSED:
CHECK_THAT( splitStringRef("abc,def", ','), Equals(std::vector<StringRef>{"abc", "def"}) )
CHECK_THAT( splitStringRef("abc,def", ','), Equals(std::vector<std::string_view>{"abc", "def"}) )
with expansion:
{ abc, def } Equals: { abc, def }
{ "abc", "def" } Equals: { "abc", "def" }
-------------------------------------------------------------------------------
stacks unscoped info in loops
@@ -18173,7 +17760,7 @@ with expansion:
true
StringManip.tests.cpp:<line number>: PASSED:
CHECK( startsWith("def"_catch_sr, 'd') )
CHECK( startsWith("def", 'd') )
with expansion:
true
@@ -18549,9 +18136,9 @@ with expansion:
1 == 1
Tag.tests.cpp:<line number>: PASSED:
REQUIRE( testcase.tags[0].original == "magic.tag"_catch_sr )
REQUIRE( testcase.tags[0].original == "magic.tag" )
with expansion:
magic.tag == magic.tag
"magic.tag" == "magic.tag"
-------------------------------------------------------------------------------
tests can be skipped dynamically at runtime
@@ -19284,6 +18871,6 @@ Misc.tests.cpp:<line number>
Misc.tests.cpp:<line number>: PASSED:
===============================================================================
test cases: 435 | 317 passed | 95 failed | 6 skipped | 17 failed as expected
assertions: 2303 | 2105 passed | 157 failed | 41 failed as expected
test cases: 433 | 315 passed | 95 failed | 6 skipped | 17 failed as expected
assertions: 2250 | 2052 passed | 157 failed | 41 failed as expected

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuitesloose text artifact
>
<testsuite name="<exe-name>" errors="17" failures="140" skipped="12" tests="2315" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
<testsuite name="<exe-name>" errors="17" failures="140" skipped="12" tests="2262" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
<properties>
<property name="random-seed" value="1"/>
<property name="filters" value="&quot;*&quot; ~[!nonportable] ~[!benchmark] ~[approvals]"/>
@@ -1487,33 +1487,6 @@ at Matchers.tests.cpp:<line number>
<testcase classname="<exe-name>.global" name="Static arrays are convertible to string/Multiple" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="Static arrays are convertible to string/Non-trivial inner items" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="String matchers" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/Empty string" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/From string literal" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/From sub-string" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/Copy construction is shallow" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/Copy assignment is shallow" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/Substrings" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/Substrings/zero-based substring" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/Substrings/non-zero-based substring" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/Substrings/Pointer values of full refs should match" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/Substrings/Pointer values of substring refs should also match" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/Substrings/Past the end substring" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/Substrings/Substring off the end are trimmed" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/Substrings/substring start after the end is empty" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/Comparisons are deep" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/from std::string" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/from std::string/implicitly constructed" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/from std::string/explicitly constructed" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/from std::string/assigned" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/to std::string" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/to std::string/explicitly constructed" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/to std::string/assigned" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/std::string += StringRef" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/StringRef + StringRef" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef at compilation time" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef at compilation time/Simple constructors" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef at compilation time/UDL construction" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="Stringifying char arrays with statically known sizes - char" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="Stringifying char arrays with statically known sizes - signed char" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="Stringifying char arrays with statically known sizes - unsigned char" time="{duration}" status="run"/>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
<testsuite name="<exe-name>" errors="17" failures="140" skipped="12" tests="2315" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
<testsuite name="<exe-name>" errors="17" failures="140" skipped="12" tests="2262" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
<properties>
<property name="random-seed" value="1"/>
<property name="filters" value="&quot;*&quot; ~[!nonportable] ~[!benchmark] ~[approvals]"/>
@@ -1486,33 +1486,6 @@ at Matchers.tests.cpp:<line number>
<testcase classname="<exe-name>.global" name="Static arrays are convertible to string/Multiple" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="Static arrays are convertible to string/Non-trivial inner items" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="String matchers" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/Empty string" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/From string literal" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/From sub-string" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/Copy construction is shallow" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/Copy assignment is shallow" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/Substrings" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/Substrings/zero-based substring" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/Substrings/non-zero-based substring" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/Substrings/Pointer values of full refs should match" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/Substrings/Pointer values of substring refs should also match" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/Substrings/Past the end substring" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/Substrings/Substring off the end are trimmed" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/Substrings/substring start after the end is empty" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/Comparisons are deep" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/from std::string" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/from std::string/implicitly constructed" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/from std::string/explicitly constructed" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/from std::string/assigned" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/to std::string" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/to std::string/explicitly constructed" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/to std::string/assigned" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/std::string += StringRef" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef/StringRef + StringRef" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef at compilation time" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef at compilation time/Simple constructors" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="StringRef at compilation time/UDL construction" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="Stringifying char arrays with statically known sizes - char" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="Stringifying char arrays with statically known sizes - signed char" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="Stringifying char arrays with statically known sizes - unsigned char" time="{duration}" status="run"/>

View File

@@ -312,35 +312,6 @@ at AssertionHandler.tests.cpp:<line number>
<testCase name="request an unknown %-starting stream fails" duration="{duration}"/>
<testCase name="stdout and stderr streams have %-starting name" duration="{duration}"/>
</file>
<file path="tests/<exe-name>/IntrospectiveTests/String.tests.cpp">
<testCase name="StringRef" duration="{duration}"/>
<testCase name="StringRef/Empty string" duration="{duration}"/>
<testCase name="StringRef/From string literal" duration="{duration}"/>
<testCase name="StringRef/From sub-string" duration="{duration}"/>
<testCase name="StringRef/Copy construction is shallow" duration="{duration}"/>
<testCase name="StringRef/Copy assignment is shallow" duration="{duration}"/>
<testCase name="StringRef/Substrings" duration="{duration}"/>
<testCase name="StringRef/Substrings/zero-based substring" duration="{duration}"/>
<testCase name="StringRef/Substrings/non-zero-based substring" duration="{duration}"/>
<testCase name="StringRef/Substrings/Pointer values of full refs should match" duration="{duration}"/>
<testCase name="StringRef/Substrings/Pointer values of substring refs should also match" duration="{duration}"/>
<testCase name="StringRef/Substrings/Past the end substring" duration="{duration}"/>
<testCase name="StringRef/Substrings/Substring off the end are trimmed" duration="{duration}"/>
<testCase name="StringRef/Substrings/substring start after the end is empty" duration="{duration}"/>
<testCase name="StringRef/Comparisons are deep" duration="{duration}"/>
<testCase name="StringRef/from std::string" duration="{duration}"/>
<testCase name="StringRef/from std::string/implicitly constructed" duration="{duration}"/>
<testCase name="StringRef/from std::string/explicitly constructed" duration="{duration}"/>
<testCase name="StringRef/from std::string/assigned" duration="{duration}"/>
<testCase name="StringRef/to std::string" duration="{duration}"/>
<testCase name="StringRef/to std::string/explicitly constructed" duration="{duration}"/>
<testCase name="StringRef/to std::string/assigned" duration="{duration}"/>
<testCase name="StringRef/std::string += StringRef" duration="{duration}"/>
<testCase name="StringRef/StringRef + StringRef" duration="{duration}"/>
<testCase name="StringRef at compilation time" duration="{duration}"/>
<testCase name="StringRef at compilation time/Simple constructors" duration="{duration}"/>
<testCase name="StringRef at compilation time/UDL construction" duration="{duration}"/>
</file>
<file path="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp">
<testCase name="Trim strings" duration="{duration}"/>
<testCase name="replaceInPlace" duration="{duration}"/>

View File

@@ -311,35 +311,6 @@ at AssertionHandler.tests.cpp:<line number>
<testCase name="request an unknown %-starting stream fails" duration="{duration}"/>
<testCase name="stdout and stderr streams have %-starting name" duration="{duration}"/>
</file>
<file path="tests/<exe-name>/IntrospectiveTests/String.tests.cpp">
<testCase name="StringRef" duration="{duration}"/>
<testCase name="StringRef/Empty string" duration="{duration}"/>
<testCase name="StringRef/From string literal" duration="{duration}"/>
<testCase name="StringRef/From sub-string" duration="{duration}"/>
<testCase name="StringRef/Copy construction is shallow" duration="{duration}"/>
<testCase name="StringRef/Copy assignment is shallow" duration="{duration}"/>
<testCase name="StringRef/Substrings" duration="{duration}"/>
<testCase name="StringRef/Substrings/zero-based substring" duration="{duration}"/>
<testCase name="StringRef/Substrings/non-zero-based substring" duration="{duration}"/>
<testCase name="StringRef/Substrings/Pointer values of full refs should match" duration="{duration}"/>
<testCase name="StringRef/Substrings/Pointer values of substring refs should also match" duration="{duration}"/>
<testCase name="StringRef/Substrings/Past the end substring" duration="{duration}"/>
<testCase name="StringRef/Substrings/Substring off the end are trimmed" duration="{duration}"/>
<testCase name="StringRef/Substrings/substring start after the end is empty" duration="{duration}"/>
<testCase name="StringRef/Comparisons are deep" duration="{duration}"/>
<testCase name="StringRef/from std::string" duration="{duration}"/>
<testCase name="StringRef/from std::string/implicitly constructed" duration="{duration}"/>
<testCase name="StringRef/from std::string/explicitly constructed" duration="{duration}"/>
<testCase name="StringRef/from std::string/assigned" duration="{duration}"/>
<testCase name="StringRef/to std::string" duration="{duration}"/>
<testCase name="StringRef/to std::string/explicitly constructed" duration="{duration}"/>
<testCase name="StringRef/to std::string/assigned" duration="{duration}"/>
<testCase name="StringRef/std::string += StringRef" duration="{duration}"/>
<testCase name="StringRef/StringRef + StringRef" duration="{duration}"/>
<testCase name="StringRef at compilation time" duration="{duration}"/>
<testCase name="StringRef at compilation time/Simple constructors" duration="{duration}"/>
<testCase name="StringRef at compilation time/UDL construction" duration="{duration}"/>
</file>
<file path="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp">
<testCase name="Trim strings" duration="{duration}"/>
<testCase name="replaceInPlace" duration="{duration}"/>

View File

@@ -1025,11 +1025,11 @@ ok {test-number} - 101.000001 != Approx(100).epsilon(0.01) for: 101.000000999999
# Default scale is invisible to comparison
ok {test-number} - std::pow(10, -5) != Approx(std::pow(10, -7)) for: 0.00001 != Approx( 0.0000001 )
# Directly creating an EnumInfo
ok {test-number} - enumInfo->lookup(0) == "Value1" for: Value1 == "Value1"
ok {test-number} - enumInfo->lookup(0) == "Value1" for: "Value1" == "Value1"
# Directly creating an EnumInfo
ok {test-number} - enumInfo->lookup(1) == "Value2" for: Value2 == "Value2"
ok {test-number} - enumInfo->lookup(1) == "Value2" for: "Value2" == "Value2"
# Directly creating an EnumInfo
ok {test-number} - enumInfo->lookup(3) == "{** unexpected enum value **}" for: {** unexpected enum value **} == "{** unexpected enum value **}"
ok {test-number} - enumInfo->lookup(3) == "{** unexpected enum value **}" for: "{** unexpected enum value **}" == "{** unexpected enum value **}"
# Empty generators can SKIP in constructor
ok {test-number} - # SKIP 'This generator is empty'
# Empty stream name opens cout stream
@@ -2721,112 +2721,6 @@ ok {test-number} - testStringForMatching(), StartsWith( "THIS", Catch::CaseSensi
ok {test-number} - testStringForMatching(), EndsWith( "substring" ) for: "this string contains 'abc' as a substring" ends with: "substring"
# String matchers
ok {test-number} - testStringForMatching(), EndsWith( " SuBsTrInG", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" ends with: " substring" (case insensitive)
# StringRef
ok {test-number} - empty.empty() for: true
# StringRef
ok {test-number} - empty.size() == 0 for: 0 == 0
# StringRef
ok {test-number} - std::strcmp( empty.data(), "" ) == 0 for: 0 == 0
# StringRef
ok {test-number} - s.empty() == false for: false == false
# StringRef
ok {test-number} - s.size() == 5 for: 5 == 5
# StringRef
ok {test-number} - std::strcmp( rawChars, "hello" ) == 0 for: 0 == 0
# StringRef
ok {test-number} - s.data() == rawChars for: "hello" == "hello"
# StringRef
ok {test-number} - original == "original"
# StringRef
ok {test-number} - original.data()
# StringRef
ok {test-number} - original.begin() == copy.begin() for: "original string" == "original string"
# StringRef
ok {test-number} - original.begin() == copy.begin() for: "original string" == "original string"
# StringRef
ok {test-number} - ss.empty() == false for: false == false
# StringRef
ok {test-number} - ss.size() == 5 for: 5 == 5
# StringRef
ok {test-number} - std::strncmp( ss.data(), "hello", 5 ) == 0 for: 0 == 0
# StringRef
ok {test-number} - ss == "hello" for: hello == "hello"
# StringRef
ok {test-number} - ss.size() == 6 for: 6 == 6
# StringRef
ok {test-number} - std::strcmp( ss.data(), "world!" ) == 0 for: 0 == 0
# StringRef
ok {test-number} - s.data() == s2.data() for: "hello world!" == "hello world!"
# StringRef
ok {test-number} - s.data() == ss.data() for: "hello world!" == "hello world!"
# StringRef
ok {test-number} - s.substr(s.size() + 1, 123).empty() for: true
# StringRef
ok {test-number} - std::strcmp(ss.data(), "world!") == 0 for: 0 == 0
# StringRef
ok {test-number} - s.substr(1'000'000, 1).empty() for: true
# StringRef
ok {test-number} - reinterpret_cast<char*>(buffer1) != reinterpret_cast<char*>(buffer2) for: "Hello" != "Hello"
# StringRef
ok {test-number} - left == right for: Hello == Hello
# StringRef
ok {test-number} - left != left.substr(0, 3) for: Hello != Hel
# StringRef
ok {test-number} - sr == "a standard string" for: a standard string == "a standard string"
# StringRef
ok {test-number} - sr.size() == stdStr.size() for: 17 == 17
# StringRef
ok {test-number} - sr == "a standard string" for: a standard string == "a standard string"
# StringRef
ok {test-number} - sr.size() == stdStr.size() for: 17 == 17
# StringRef
ok {test-number} - sr == "a standard string" for: a standard string == "a standard string"
# StringRef
ok {test-number} - sr.size() == stdStr.size() for: 17 == 17
# StringRef
ok {test-number} - stdStr == "a stringref" for: "a stringref" == "a stringref"
# StringRef
ok {test-number} - stdStr.size() == sr.size() for: 11 == 11
# StringRef
ok {test-number} - stdStr == "a stringref" for: "a stringref" == "a stringref"
# StringRef
ok {test-number} - stdStr.size() == sr.size() for: 11 == 11
# StringRef
ok {test-number} - lhs == "some string += the stringref contents" for: "some string += the stringref contents" == "some string += the stringref contents"
# StringRef
ok {test-number} - together == "abrakadabra" for: "abrakadabra" == "abrakadabra"
# StringRef at compilation time
ok {test-number} - with 1 message: 'empty.size() == 0'
# StringRef at compilation time
ok {test-number} - with 1 message: 'empty.begin() == empty.end()'
# StringRef at compilation time
ok {test-number} - with 1 message: 'stringref.size() == 3'
# StringRef at compilation time
ok {test-number} - with 1 message: 'stringref.data() == abc'
# StringRef at compilation time
ok {test-number} - with 1 message: 'stringref.begin() == abc'
# StringRef at compilation time
ok {test-number} - with 1 message: 'stringref.begin() != stringref.end()'
# StringRef at compilation time
ok {test-number} - with 1 message: 'stringref.substr(10, 0).empty()'
# StringRef at compilation time
ok {test-number} - with 1 message: 'stringref.substr(2, 1).data() == abc + 2'
# StringRef at compilation time
ok {test-number} - with 1 message: 'stringref[1] == 'b''
# StringRef at compilation time
ok {test-number} - with 1 message: 'shortened.size() == 2'
# StringRef at compilation time
ok {test-number} - with 1 message: 'shortened.data() == abc'
# StringRef at compilation time
ok {test-number} - with 1 message: 'shortened.begin() != shortened.end()'
# StringRef at compilation time
ok {test-number} - with 1 message: '!(sr1.empty())'
# StringRef at compilation time
ok {test-number} - with 1 message: 'sr1.size() == 3'
# StringRef at compilation time
ok {test-number} - with 1 message: 'sr2.empty()'
# StringRef at compilation time
ok {test-number} - with 1 message: 'sr2.size() == 0'
# Stringifying char arrays with statically known sizes - char
ok {test-number} - ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc""
# Stringifying char arrays with statically known sizes - char
@@ -2874,7 +2768,7 @@ ok {test-number} - registry.add( "[@no square bracket at end", "", Catch::Source
# Tags with spaces and non-alphanumerical characters are accepted
ok {test-number} - testCase.tags.size() == 2 for: 2 == 2
# Tags with spaces and non-alphanumerical characters are accepted
ok {test-number} - testCase.tags, VectorContains( Tag( "tag with spaces" ) ) && VectorContains( Tag( "I said \"good day\" sir!"_catch_sr ) ) for: { {?}, {?} } ( Contains: {?} and Contains: {?} )
ok {test-number} - testCase.tags, VectorContains( Tag( "tag with spaces" ) ) && VectorContains( Tag( "I said \"good day\" sir!" ) ) for: { {?}, {?} } ( Contains: {?} and Contains: {?} )
# Template test case method with test types specified inside std::tuple - MyTypes - 0
ok {test-number} - Template_Fixture<TestType>::m_a == 1 for: 1 == 1
# Template test case method with test types specified inside std::tuple - MyTypes - 1
@@ -3362,13 +3256,13 @@ ok {test-number} - trim(std::string(trailing_whitespace)) == no_whitespace for:
# Trim strings
ok {test-number} - trim(std::string(whitespace_at_both_ends)) == no_whitespace for: "There is no extra whitespace here" == "There is no extra whitespace here"
# Trim strings
ok {test-number} - trim(StringRef(no_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here == There is no extra whitespace here
ok {test-number} - trim(std::string_view(no_whitespace)) == std::string_view(no_whitespace) for: "There is no extra whitespace here" == "There is no extra whitespace here"
# Trim strings
ok {test-number} - trim(StringRef(leading_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here == There is no extra whitespace here
ok {test-number} - trim(std::string_view(leading_whitespace)) == std::string_view(no_whitespace) for: "There is no extra whitespace here" == "There is no extra whitespace here"
# Trim strings
ok {test-number} - trim(StringRef(trailing_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here == There is no extra whitespace here
ok {test-number} - trim(std::string_view(trailing_whitespace)) == std::string_view(no_whitespace) for: "There is no extra whitespace here" == "There is no extra whitespace here"
# Trim strings
ok {test-number} - trim(StringRef(whitespace_at_both_ends)) == StringRef(no_whitespace) for: There is no extra whitespace here == There is no extra whitespace here
ok {test-number} - trim(std::string_view(whitespace_at_both_ends)) == std::string_view(no_whitespace) for: "There is no extra whitespace here" == "There is no extra whitespace here"
# Type conversions of RangeEquals and similar
ok {test-number} - array_int_a, RangeEquals( c_array ) for: { 1, 2, 3 } elements are { 1, 2, 3 }
# Type conversions of RangeEquals and similar
@@ -4216,19 +4110,19 @@ ok {test-number} - ptr.get() == 0 for: 0 == 0
# pair<pair<int,const char *,pair<std::string,int> > -> toString
ok {test-number} - ::Catch::Detail::stringify( pair ) == "{ { 42, \"Arthur\" }, { \"Ford\", 24 } }" for: "{ { 42, "Arthur" }, { "Ford", 24 } }" == "{ { 42, "Arthur" }, { "Ford", 24 } }"
# parseEnums
ok {test-number} - parseEnums( "" ), Equals( std::vector<Catch::StringRef>{} ) for: { } Equals: { }
ok {test-number} - parseEnums( "" ), Equals( std::vector<std::string_view>{} ) for: { } Equals: { }
# parseEnums
ok {test-number} - parseEnums( "ClassName::EnumName::Value1" ), Equals(std::vector<Catch::StringRef>{"Value1"} ) for: { Value1 } Equals: { Value1 }
ok {test-number} - parseEnums( "ClassName::EnumName::Value1" ), Equals(std::vector<std::string_view>{"Value1"} ) for: { "Value1" } Equals: { "Value1" }
# parseEnums
ok {test-number} - parseEnums( "Value1" ), Equals( std::vector<Catch::StringRef>{"Value1"} ) for: { Value1 } Equals: { Value1 }
ok {test-number} - parseEnums( "Value1" ), Equals( std::vector<std::string_view>{"Value1"} ) for: { "Value1" } Equals: { "Value1" }
# parseEnums
ok {test-number} - parseEnums( "EnumName::Value1" ), Equals(std::vector<Catch::StringRef>{"Value1"} ) for: { Value1 } Equals: { Value1 }
ok {test-number} - parseEnums( "EnumName::Value1" ), Equals(std::vector<std::string_view>{"Value1"} ) for: { "Value1" } Equals: { "Value1" }
# parseEnums
ok {test-number} - parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2"} ) for: { Value1, Value2 } Equals: { Value1, Value2 }
ok {test-number} - parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ), Equals( std::vector<std::string_view>{"Value1", "Value2"} ) for: { "Value1", "Value2" } Equals: { "Value1", "Value2" }
# parseEnums
ok {test-number} - parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2", "Value3"} ) for: { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 }
ok {test-number} - parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ), Equals( std::vector<std::string_view>{"Value1", "Value2", "Value3"} ) for: { "Value1", "Value2", "Value3" } Equals: { "Value1", "Value2", "Value3" }
# parseEnums
ok {test-number} - parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2", "Value3"} ) for: { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 }
ok {test-number} - parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ), Equals( std::vector<std::string_view>{"Value1", "Value2", "Value3"} ) for: { "Value1", "Value2", "Value3" } Equals: { "Value1", "Value2", "Value3" }
# pointer to class
ok {test-number} - p == 0 for: 0 == 0
# print unscoped info if passing unscoped info is printed
@@ -4362,15 +4256,15 @@ not ok {test-number} - false with 1 message: '3'
# sends information to INFO
not ok {test-number} - false with 2 messages: 'hi' and 'i := 7'
# shortened hide tags are split apart
ok {test-number} - testcase.tags, VectorContains( Tag( "magic-tag" ) ) && VectorContains( Tag( "."_catch_sr ) ) for: { {?}, {?} } ( Contains: {?} and Contains: {?} )
ok {test-number} - testcase.tags, VectorContains( Tag( "magic-tag" ) ) && VectorContains( Tag( "." ) ) for: { {?}, {?} } ( Contains: {?} and Contains: {?} )
# skipped tests can optionally provide a reason
ok {test-number} - # SKIP 'skipping because answer = 43'
# splitString
ok {test-number} - splitStringRef("", ','), Equals(std::vector<StringRef>()) for: { } Equals: { }
ok {test-number} - splitStringRef("", ','), Equals(std::vector<std::string_view>()) for: { } Equals: { }
# splitString
ok {test-number} - splitStringRef("abc", ','), Equals(std::vector<StringRef>{"abc"}) for: { abc } Equals: { abc }
ok {test-number} - splitStringRef("abc", ','), Equals(std::vector<std::string_view>{"abc"}) for: { "abc" } Equals: { "abc" }
# splitString
ok {test-number} - splitStringRef("abc,def", ','), Equals(std::vector<StringRef>{"abc", "def"}) for: { abc, def } Equals: { abc, def }
ok {test-number} - splitStringRef("abc,def", ','), Equals(std::vector<std::string_view>{"abc", "def"}) for: { "abc", "def" } Equals: { "abc", "def" }
# stacks unscoped info in loops
not ok {test-number} - false with 4 messages: 'Count 1 to 3...' and '1' and '2' and '3'
# stacks unscoped info in loops
@@ -4380,7 +4274,7 @@ ok {test-number} - !(startsWith("", 'c')) for: !false
# startsWith
ok {test-number} - startsWith(std::string("abc"), 'a') for: true
# startsWith
ok {test-number} - startsWith("def"_catch_sr, 'd') for: true
ok {test-number} - startsWith("def", 'd') for: true
# std::map is convertible string
ok {test-number} - Catch::Detail::stringify( emptyMap ) == "{ }" for: "{ }" == "{ }"
# std::map is convertible string
@@ -4448,7 +4342,7 @@ ok {test-number} - strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(
# tags with dots in later positions are not parsed as hidden
ok {test-number} - testcase.tags.size() == 1 for: 1 == 1
# tags with dots in later positions are not parsed as hidden
ok {test-number} - testcase.tags[0].original == "magic.tag"_catch_sr for: magic.tag == magic.tag
ok {test-number} - testcase.tags[0].original == "magic.tag" for: "magic.tag" == "magic.tag"
# tests can be skipped dynamically at runtime
ok {test-number} - # SKIP
# thrown std::strings are translated
@@ -4627,5 +4521,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0
ok {test-number} -
# xmlentitycheck
ok {test-number} -
1..2315
1..2262

View File

@@ -1023,11 +1023,11 @@ ok {test-number} - 101.000001 != Approx(100).epsilon(0.01) for: 101.000000999999
# Default scale is invisible to comparison
ok {test-number} - std::pow(10, -5) != Approx(std::pow(10, -7)) for: 0.00001 != Approx( 0.0000001 )
# Directly creating an EnumInfo
ok {test-number} - enumInfo->lookup(0) == "Value1" for: Value1 == "Value1"
ok {test-number} - enumInfo->lookup(0) == "Value1" for: "Value1" == "Value1"
# Directly creating an EnumInfo
ok {test-number} - enumInfo->lookup(1) == "Value2" for: Value2 == "Value2"
ok {test-number} - enumInfo->lookup(1) == "Value2" for: "Value2" == "Value2"
# Directly creating an EnumInfo
ok {test-number} - enumInfo->lookup(3) == "{** unexpected enum value **}" for: {** unexpected enum value **} == "{** unexpected enum value **}"
ok {test-number} - enumInfo->lookup(3) == "{** unexpected enum value **}" for: "{** unexpected enum value **}" == "{** unexpected enum value **}"
# Empty generators can SKIP in constructor
ok {test-number} - # SKIP 'This generator is empty'
# Empty stream name opens cout stream
@@ -2714,112 +2714,6 @@ ok {test-number} - testStringForMatching(), StartsWith( "THIS", Catch::CaseSensi
ok {test-number} - testStringForMatching(), EndsWith( "substring" ) for: "this string contains 'abc' as a substring" ends with: "substring"
# String matchers
ok {test-number} - testStringForMatching(), EndsWith( " SuBsTrInG", Catch::CaseSensitive::No ) for: "this string contains 'abc' as a substring" ends with: " substring" (case insensitive)
# StringRef
ok {test-number} - empty.empty() for: true
# StringRef
ok {test-number} - empty.size() == 0 for: 0 == 0
# StringRef
ok {test-number} - std::strcmp( empty.data(), "" ) == 0 for: 0 == 0
# StringRef
ok {test-number} - s.empty() == false for: false == false
# StringRef
ok {test-number} - s.size() == 5 for: 5 == 5
# StringRef
ok {test-number} - std::strcmp( rawChars, "hello" ) == 0 for: 0 == 0
# StringRef
ok {test-number} - s.data() == rawChars for: "hello" == "hello"
# StringRef
ok {test-number} - original == "original"
# StringRef
ok {test-number} - original.data()
# StringRef
ok {test-number} - original.begin() == copy.begin() for: "original string" == "original string"
# StringRef
ok {test-number} - original.begin() == copy.begin() for: "original string" == "original string"
# StringRef
ok {test-number} - ss.empty() == false for: false == false
# StringRef
ok {test-number} - ss.size() == 5 for: 5 == 5
# StringRef
ok {test-number} - std::strncmp( ss.data(), "hello", 5 ) == 0 for: 0 == 0
# StringRef
ok {test-number} - ss == "hello" for: hello == "hello"
# StringRef
ok {test-number} - ss.size() == 6 for: 6 == 6
# StringRef
ok {test-number} - std::strcmp( ss.data(), "world!" ) == 0 for: 0 == 0
# StringRef
ok {test-number} - s.data() == s2.data() for: "hello world!" == "hello world!"
# StringRef
ok {test-number} - s.data() == ss.data() for: "hello world!" == "hello world!"
# StringRef
ok {test-number} - s.substr(s.size() + 1, 123).empty() for: true
# StringRef
ok {test-number} - std::strcmp(ss.data(), "world!") == 0 for: 0 == 0
# StringRef
ok {test-number} - s.substr(1'000'000, 1).empty() for: true
# StringRef
ok {test-number} - reinterpret_cast<char*>(buffer1) != reinterpret_cast<char*>(buffer2) for: "Hello" != "Hello"
# StringRef
ok {test-number} - left == right for: Hello == Hello
# StringRef
ok {test-number} - left != left.substr(0, 3) for: Hello != Hel
# StringRef
ok {test-number} - sr == "a standard string" for: a standard string == "a standard string"
# StringRef
ok {test-number} - sr.size() == stdStr.size() for: 17 == 17
# StringRef
ok {test-number} - sr == "a standard string" for: a standard string == "a standard string"
# StringRef
ok {test-number} - sr.size() == stdStr.size() for: 17 == 17
# StringRef
ok {test-number} - sr == "a standard string" for: a standard string == "a standard string"
# StringRef
ok {test-number} - sr.size() == stdStr.size() for: 17 == 17
# StringRef
ok {test-number} - stdStr == "a stringref" for: "a stringref" == "a stringref"
# StringRef
ok {test-number} - stdStr.size() == sr.size() for: 11 == 11
# StringRef
ok {test-number} - stdStr == "a stringref" for: "a stringref" == "a stringref"
# StringRef
ok {test-number} - stdStr.size() == sr.size() for: 11 == 11
# StringRef
ok {test-number} - lhs == "some string += the stringref contents" for: "some string += the stringref contents" == "some string += the stringref contents"
# StringRef
ok {test-number} - together == "abrakadabra" for: "abrakadabra" == "abrakadabra"
# StringRef at compilation time
ok {test-number} - with 1 message: 'empty.size() == 0'
# StringRef at compilation time
ok {test-number} - with 1 message: 'empty.begin() == empty.end()'
# StringRef at compilation time
ok {test-number} - with 1 message: 'stringref.size() == 3'
# StringRef at compilation time
ok {test-number} - with 1 message: 'stringref.data() == abc'
# StringRef at compilation time
ok {test-number} - with 1 message: 'stringref.begin() == abc'
# StringRef at compilation time
ok {test-number} - with 1 message: 'stringref.begin() != stringref.end()'
# StringRef at compilation time
ok {test-number} - with 1 message: 'stringref.substr(10, 0).empty()'
# StringRef at compilation time
ok {test-number} - with 1 message: 'stringref.substr(2, 1).data() == abc + 2'
# StringRef at compilation time
ok {test-number} - with 1 message: 'stringref[1] == 'b''
# StringRef at compilation time
ok {test-number} - with 1 message: 'shortened.size() == 2'
# StringRef at compilation time
ok {test-number} - with 1 message: 'shortened.data() == abc'
# StringRef at compilation time
ok {test-number} - with 1 message: 'shortened.begin() != shortened.end()'
# StringRef at compilation time
ok {test-number} - with 1 message: '!(sr1.empty())'
# StringRef at compilation time
ok {test-number} - with 1 message: 'sr1.size() == 3'
# StringRef at compilation time
ok {test-number} - with 1 message: 'sr2.empty()'
# StringRef at compilation time
ok {test-number} - with 1 message: 'sr2.size() == 0'
# Stringifying char arrays with statically known sizes - char
ok {test-number} - ::Catch::Detail::stringify( with_null_terminator ) == R"("abc")"s for: ""abc"" == ""abc""
# Stringifying char arrays with statically known sizes - char
@@ -2867,7 +2761,7 @@ ok {test-number} - registry.add( "[@no square bracket at end", "", Catch::Source
# Tags with spaces and non-alphanumerical characters are accepted
ok {test-number} - testCase.tags.size() == 2 for: 2 == 2
# Tags with spaces and non-alphanumerical characters are accepted
ok {test-number} - testCase.tags, VectorContains( Tag( "tag with spaces" ) ) && VectorContains( Tag( "I said \"good day\" sir!"_catch_sr ) ) for: { {?}, {?} } ( Contains: {?} and Contains: {?} )
ok {test-number} - testCase.tags, VectorContains( Tag( "tag with spaces" ) ) && VectorContains( Tag( "I said \"good day\" sir!" ) ) for: { {?}, {?} } ( Contains: {?} and Contains: {?} )
# Template test case method with test types specified inside std::tuple - MyTypes - 0
ok {test-number} - Template_Fixture<TestType>::m_a == 1 for: 1 == 1
# Template test case method with test types specified inside std::tuple - MyTypes - 1
@@ -3355,13 +3249,13 @@ ok {test-number} - trim(std::string(trailing_whitespace)) == no_whitespace for:
# Trim strings
ok {test-number} - trim(std::string(whitespace_at_both_ends)) == no_whitespace for: "There is no extra whitespace here" == "There is no extra whitespace here"
# Trim strings
ok {test-number} - trim(StringRef(no_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here == There is no extra whitespace here
ok {test-number} - trim(std::string_view(no_whitespace)) == std::string_view(no_whitespace) for: "There is no extra whitespace here" == "There is no extra whitespace here"
# Trim strings
ok {test-number} - trim(StringRef(leading_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here == There is no extra whitespace here
ok {test-number} - trim(std::string_view(leading_whitespace)) == std::string_view(no_whitespace) for: "There is no extra whitespace here" == "There is no extra whitespace here"
# Trim strings
ok {test-number} - trim(StringRef(trailing_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here == There is no extra whitespace here
ok {test-number} - trim(std::string_view(trailing_whitespace)) == std::string_view(no_whitespace) for: "There is no extra whitespace here" == "There is no extra whitespace here"
# Trim strings
ok {test-number} - trim(StringRef(whitespace_at_both_ends)) == StringRef(no_whitespace) for: There is no extra whitespace here == There is no extra whitespace here
ok {test-number} - trim(std::string_view(whitespace_at_both_ends)) == std::string_view(no_whitespace) for: "There is no extra whitespace here" == "There is no extra whitespace here"
# Type conversions of RangeEquals and similar
ok {test-number} - array_int_a, RangeEquals( c_array ) for: { 1, 2, 3 } elements are { 1, 2, 3 }
# Type conversions of RangeEquals and similar
@@ -4205,19 +4099,19 @@ ok {test-number} - ptr.get() == 0 for: 0 == 0
# pair<pair<int,const char *,pair<std::string,int> > -> toString
ok {test-number} - ::Catch::Detail::stringify( pair ) == "{ { 42, \"Arthur\" }, { \"Ford\", 24 } }" for: "{ { 42, "Arthur" }, { "Ford", 24 } }" == "{ { 42, "Arthur" }, { "Ford", 24 } }"
# parseEnums
ok {test-number} - parseEnums( "" ), Equals( std::vector<Catch::StringRef>{} ) for: { } Equals: { }
ok {test-number} - parseEnums( "" ), Equals( std::vector<std::string_view>{} ) for: { } Equals: { }
# parseEnums
ok {test-number} - parseEnums( "ClassName::EnumName::Value1" ), Equals(std::vector<Catch::StringRef>{"Value1"} ) for: { Value1 } Equals: { Value1 }
ok {test-number} - parseEnums( "ClassName::EnumName::Value1" ), Equals(std::vector<std::string_view>{"Value1"} ) for: { "Value1" } Equals: { "Value1" }
# parseEnums
ok {test-number} - parseEnums( "Value1" ), Equals( std::vector<Catch::StringRef>{"Value1"} ) for: { Value1 } Equals: { Value1 }
ok {test-number} - parseEnums( "Value1" ), Equals( std::vector<std::string_view>{"Value1"} ) for: { "Value1" } Equals: { "Value1" }
# parseEnums
ok {test-number} - parseEnums( "EnumName::Value1" ), Equals(std::vector<Catch::StringRef>{"Value1"} ) for: { Value1 } Equals: { Value1 }
ok {test-number} - parseEnums( "EnumName::Value1" ), Equals(std::vector<std::string_view>{"Value1"} ) for: { "Value1" } Equals: { "Value1" }
# parseEnums
ok {test-number} - parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2"} ) for: { Value1, Value2 } Equals: { Value1, Value2 }
ok {test-number} - parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ), Equals( std::vector<std::string_view>{"Value1", "Value2"} ) for: { "Value1", "Value2" } Equals: { "Value1", "Value2" }
# parseEnums
ok {test-number} - parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2", "Value3"} ) for: { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 }
ok {test-number} - parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ), Equals( std::vector<std::string_view>{"Value1", "Value2", "Value3"} ) for: { "Value1", "Value2", "Value3" } Equals: { "Value1", "Value2", "Value3" }
# parseEnums
ok {test-number} - parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2", "Value3"} ) for: { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 }
ok {test-number} - parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ), Equals( std::vector<std::string_view>{"Value1", "Value2", "Value3"} ) for: { "Value1", "Value2", "Value3" } Equals: { "Value1", "Value2", "Value3" }
# pointer to class
ok {test-number} - p == 0 for: 0 == 0
# print unscoped info if passing unscoped info is printed
@@ -4351,15 +4245,15 @@ not ok {test-number} - false with 1 message: '3'
# sends information to INFO
not ok {test-number} - false with 2 messages: 'hi' and 'i := 7'
# shortened hide tags are split apart
ok {test-number} - testcase.tags, VectorContains( Tag( "magic-tag" ) ) && VectorContains( Tag( "."_catch_sr ) ) for: { {?}, {?} } ( Contains: {?} and Contains: {?} )
ok {test-number} - testcase.tags, VectorContains( Tag( "magic-tag" ) ) && VectorContains( Tag( "." ) ) for: { {?}, {?} } ( Contains: {?} and Contains: {?} )
# skipped tests can optionally provide a reason
ok {test-number} - # SKIP 'skipping because answer = 43'
# splitString
ok {test-number} - splitStringRef("", ','), Equals(std::vector<StringRef>()) for: { } Equals: { }
ok {test-number} - splitStringRef("", ','), Equals(std::vector<std::string_view>()) for: { } Equals: { }
# splitString
ok {test-number} - splitStringRef("abc", ','), Equals(std::vector<StringRef>{"abc"}) for: { abc } Equals: { abc }
ok {test-number} - splitStringRef("abc", ','), Equals(std::vector<std::string_view>{"abc"}) for: { "abc" } Equals: { "abc" }
# splitString
ok {test-number} - splitStringRef("abc,def", ','), Equals(std::vector<StringRef>{"abc", "def"}) for: { abc, def } Equals: { abc, def }
ok {test-number} - splitStringRef("abc,def", ','), Equals(std::vector<std::string_view>{"abc", "def"}) for: { "abc", "def" } Equals: { "abc", "def" }
# stacks unscoped info in loops
not ok {test-number} - false with 4 messages: 'Count 1 to 3...' and '1' and '2' and '3'
# stacks unscoped info in loops
@@ -4369,7 +4263,7 @@ ok {test-number} - !(startsWith("", 'c')) for: !false
# startsWith
ok {test-number} - startsWith(std::string("abc"), 'a') for: true
# startsWith
ok {test-number} - startsWith("def"_catch_sr, 'd') for: true
ok {test-number} - startsWith("def", 'd') for: true
# std::map is convertible string
ok {test-number} - Catch::Detail::stringify( emptyMap ) == "{ }" for: "{ }" == "{ }"
# std::map is convertible string
@@ -4437,7 +4331,7 @@ ok {test-number} - strlen(std::get<0>(data)) == static_cast<size_t>(std::get<1>(
# tags with dots in later positions are not parsed as hidden
ok {test-number} - testcase.tags.size() == 1 for: 1 == 1
# tags with dots in later positions are not parsed as hidden
ok {test-number} - testcase.tags[0].original == "magic.tag"_catch_sr for: magic.tag == magic.tag
ok {test-number} - testcase.tags[0].original == "magic.tag" for: "magic.tag" == "magic.tag"
# tests can be skipped dynamically at runtime
ok {test-number} - # SKIP
# thrown std::strings are translated
@@ -4616,5 +4510,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0
ok {test-number} -
# xmlentitycheck
ok {test-number} -
1..2315
1..2262

View File

@@ -617,10 +617,6 @@
##teamcity[testFinished name='Static arrays are convertible to string' duration="{duration}"]
##teamcity[testStarted name='String matchers']
##teamcity[testFinished name='String matchers' duration="{duration}"]
##teamcity[testStarted name='StringRef']
##teamcity[testFinished name='StringRef' duration="{duration}"]
##teamcity[testStarted name='StringRef at compilation time']
##teamcity[testFinished name='StringRef at compilation time' duration="{duration}"]
##teamcity[testStarted name='Stringifying char arrays with statically known sizes - char']
##teamcity[testFinished name='Stringifying char arrays with statically known sizes - char' duration="{duration}"]
##teamcity[testStarted name='Stringifying char arrays with statically known sizes - signed char']

View File

@@ -617,10 +617,6 @@
##teamcity[testFinished name='Static arrays are convertible to string' duration="{duration}"]
##teamcity[testStarted name='String matchers']
##teamcity[testFinished name='String matchers' duration="{duration}"]
##teamcity[testStarted name='StringRef']
##teamcity[testFinished name='StringRef' duration="{duration}"]
##teamcity[testStarted name='StringRef at compilation time']
##teamcity[testFinished name='StringRef at compilation time' duration="{duration}"]
##teamcity[testStarted name='Stringifying char arrays with statically known sizes - char']
##teamcity[testFinished name='Stringifying char arrays with statically known sizes - char' duration="{duration}"]
##teamcity[testStarted name='Stringifying char arrays with statically known sizes - signed char']

View File

@@ -4619,7 +4619,7 @@ C
enumInfo->lookup(0) == "Value1"
</Original>
<Expanded>
Value1 == "Value1"
"Value1" == "Value1"
</Expanded>
</Expression>
<Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
@@ -4627,7 +4627,7 @@ C
enumInfo->lookup(1) == "Value2"
</Original>
<Expanded>
Value2 == "Value2"
"Value2" == "Value2"
</Expanded>
</Expression>
<Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
@@ -4635,7 +4635,7 @@ C
enumInfo->lookup(3) == "{** unexpected enum value **}"
</Original>
<Expanded>
{** unexpected enum value **}
"{** unexpected enum value **}"
==
"{** unexpected enum value **}"
</Expanded>
@@ -13429,412 +13429,6 @@ Message from section two
</Expression>
<OverallResult success="true" skips="0"/>
</TestCase>
<TestCase name="StringRef" tags="[StringRef][Strings]" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Section name="Empty string" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
empty.empty()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
empty.size() == 0
</Original>
<Expanded>
0 == 0
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
std::strcmp( empty.data(), "" ) == 0
</Original>
<Expanded>
0 == 0
</Expanded>
</Expression>
<OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="From string literal" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
s.empty() == false
</Original>
<Expanded>
false == false
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
s.size() == 5
</Original>
<Expanded>
5 == 5
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
std::strcmp( rawChars, "hello" ) == 0
</Original>
<Expanded>
0 == 0
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
s.data() == rawChars
</Original>
<Expanded>
"hello" == "hello"
</Expanded>
</Expression>
<OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="From sub-string" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
original == "original"
</Original>
<Expanded>
original == "original"
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE_NOTHROW" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
original.data()
</Original>
<Expanded>
original.data()
</Expanded>
</Expression>
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="Copy construction is shallow" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
original.begin() == copy.begin()
</Original>
<Expanded>
"original string" == "original string"
</Expanded>
</Expression>
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="Copy assignment is shallow" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
original.begin() == copy.begin()
</Original>
<Expanded>
"original string" == "original string"
</Expanded>
</Expression>
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="Substrings" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Section name="zero-based substring" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
ss.empty() == false
</Original>
<Expanded>
false == false
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
ss.size() == 5
</Original>
<Expanded>
5 == 5
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
std::strncmp( ss.data(), "hello", 5 ) == 0
</Original>
<Expanded>
0 == 0
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
ss == "hello"
</Original>
<Expanded>
hello == "hello"
</Expanded>
</Expression>
<OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="Substrings" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Section name="non-zero-based substring" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
ss.size() == 6
</Original>
<Expanded>
6 == 6
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
std::strcmp( ss.data(), "world!" ) == 0
</Original>
<Expanded>
0 == 0
</Expanded>
</Expression>
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="Substrings" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Section name="Pointer values of full refs should match" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
s.data() == s2.data()
</Original>
<Expanded>
"hello world!" == "hello world!"
</Expanded>
</Expression>
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="Substrings" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Section name="Pointer values of substring refs should also match" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
s.data() == ss.data()
</Original>
<Expanded>
"hello world!" == "hello world!"
</Expanded>
</Expression>
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="Substrings" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Section name="Past the end substring" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
s.substr(s.size() + 1, 123).empty()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="Substrings" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Section name="Substring off the end are trimmed" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
std::strcmp(ss.data(), "world!") == 0
</Original>
<Expanded>
0 == 0
</Expanded>
</Expression>
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="Substrings" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Section name="substring start after the end is empty" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
s.substr(1'000'000, 1).empty()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="Comparisons are deep" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
reinterpret_cast&lt;char*>(buffer1) != reinterpret_cast&lt;char*>(buffer2)
</Original>
<Expanded>
"Hello" != "Hello"
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
left == right
</Original>
<Expanded>
Hello == Hello
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
left != left.substr(0, 3)
</Original>
<Expanded>
Hello != Hel
</Expanded>
</Expression>
<OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="from std::string" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Section name="implicitly constructed" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
sr == "a standard string"
</Original>
<Expanded>
a standard string == "a standard string"
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
sr.size() == stdStr.size()
</Original>
<Expanded>
17 == 17
</Expanded>
</Expression>
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="from std::string" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Section name="explicitly constructed" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
sr == "a standard string"
</Original>
<Expanded>
a standard string == "a standard string"
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
sr.size() == stdStr.size()
</Original>
<Expanded>
17 == 17
</Expanded>
</Expression>
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="from std::string" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Section name="assigned" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
sr == "a standard string"
</Original>
<Expanded>
a standard string == "a standard string"
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
sr.size() == stdStr.size()
</Original>
<Expanded>
17 == 17
</Expanded>
</Expression>
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="to std::string" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Section name="explicitly constructed" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
stdStr == "a stringref"
</Original>
<Expanded>
"a stringref" == "a stringref"
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
stdStr.size() == sr.size()
</Original>
<Expanded>
11 == 11
</Expanded>
</Expression>
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="to std::string" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Section name="assigned" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
stdStr == "a stringref"
</Original>
<Expanded>
"a stringref" == "a stringref"
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
stdStr.size() == sr.size()
</Original>
<Expanded>
11 == 11
</Expanded>
</Expression>
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="std::string += StringRef" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
lhs == "some string += the stringref contents"
</Original>
<Expanded>
"some string += the stringref contents"
==
"some string += the stringref contents"
</Expanded>
</Expression>
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="StringRef + StringRef" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
together == "abrakadabra"
</Original>
<Expanded>
"abrakadabra" == "abrakadabra"
</Expanded>
</Expression>
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<OverallResult success="true" skips="0"/>
</TestCase>
<TestCase name="StringRef at compilation time" tags="[constexpr][StringRef][Strings]" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Section name="Simple constructors" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<OverallResults successes="12" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="UDL construction" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<OverallResult success="true" skips="0"/>
</TestCase>
<TestCase name="Stringifying char arrays with statically known sizes - char" tags="[toString]" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
<Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
<Original>
@@ -14069,7 +13663,7 @@ Message from section two
</Expression>
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" >
<Original>
testCase.tags, VectorContains( Tag( "tag with spaces" ) ) &amp;&amp; VectorContains( Tag( "I said \"good day\" sir!"_catch_sr ) )
testCase.tags, VectorContains( Tag( "tag with spaces" ) ) &amp;&amp; VectorContains( Tag( "I said \"good day\" sir!" ) )
</Original>
<Expanded>
{ {?}, {?} } ( Contains: {?} and Contains: {?} )
@@ -16270,42 +15864,42 @@ Message from section two
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
<Original>
trim(StringRef(no_whitespace)) == StringRef(no_whitespace)
trim(std::string_view(no_whitespace)) == std::string_view(no_whitespace)
</Original>
<Expanded>
There is no extra whitespace here
"There is no extra whitespace here"
==
There is no extra whitespace here
"There is no extra whitespace here"
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
<Original>
trim(StringRef(leading_whitespace)) == StringRef(no_whitespace)
trim(std::string_view(leading_whitespace)) == std::string_view(no_whitespace)
</Original>
<Expanded>
There is no extra whitespace here
"There is no extra whitespace here"
==
There is no extra whitespace here
"There is no extra whitespace here"
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
<Original>
trim(StringRef(trailing_whitespace)) == StringRef(no_whitespace)
trim(std::string_view(trailing_whitespace)) == std::string_view(no_whitespace)
</Original>
<Expanded>
There is no extra whitespace here
"There is no extra whitespace here"
==
There is no extra whitespace here
"There is no extra whitespace here"
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
<Original>
trim(StringRef(whitespace_at_both_ends)) == StringRef(no_whitespace)
trim(std::string_view(whitespace_at_both_ends)) == std::string_view(no_whitespace)
</Original>
<Expanded>
There is no extra whitespace here
"There is no extra whitespace here"
==
There is no extra whitespace here
"There is no extra whitespace here"
</Expanded>
</Expression>
<OverallResult success="true" skips="0"/>
@@ -20331,7 +19925,7 @@ Approx( -1.95996398454005449 )
<Section name="No enums" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
<Original>
parseEnums( "" ), Equals( std::vector&lt;Catch::StringRef>{} )
parseEnums( "" ), Equals( std::vector&lt;std::string_view>{} )
</Original>
<Expanded>
{ } Equals: { }
@@ -20342,26 +19936,26 @@ Approx( -1.95996398454005449 )
<Section name="One enum value" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
<Original>
parseEnums( "ClassName::EnumName::Value1" ), Equals(std::vector&lt;Catch::StringRef>{"Value1"} )
parseEnums( "ClassName::EnumName::Value1" ), Equals(std::vector&lt;std::string_view>{"Value1"} )
</Original>
<Expanded>
{ Value1 } Equals: { Value1 }
{ "Value1" } Equals: { "Value1" }
</Expanded>
</Expression>
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
<Original>
parseEnums( "Value1" ), Equals( std::vector&lt;Catch::StringRef>{"Value1"} )
parseEnums( "Value1" ), Equals( std::vector&lt;std::string_view>{"Value1"} )
</Original>
<Expanded>
{ Value1 } Equals: { Value1 }
{ "Value1" } Equals: { "Value1" }
</Expanded>
</Expression>
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
<Original>
parseEnums( "EnumName::Value1" ), Equals(std::vector&lt;Catch::StringRef>{"Value1"} )
parseEnums( "EnumName::Value1" ), Equals(std::vector&lt;std::string_view>{"Value1"} )
</Original>
<Expanded>
{ Value1 } Equals: { Value1 }
{ "Value1" } Equals: { "Value1" }
</Expanded>
</Expression>
<OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/>
@@ -20369,26 +19963,26 @@ Approx( -1.95996398454005449 )
<Section name="Multiple enum values" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
<Original>
parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ), Equals( std::vector&lt;Catch::StringRef>{"Value1", "Value2"} )
parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ), Equals( std::vector&lt;std::string_view>{"Value1", "Value2"} )
</Original>
<Expanded>
{ Value1, Value2 } Equals: { Value1, Value2 }
{ "Value1", "Value2" } Equals: { "Value1", "Value2" }
</Expanded>
</Expression>
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
<Original>
parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ), Equals( std::vector&lt;Catch::StringRef>{"Value1", "Value2", "Value3"} )
parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ), Equals( std::vector&lt;std::string_view>{"Value1", "Value2", "Value3"} )
</Original>
<Expanded>
{ Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 }
{ "Value1", "Value2", "Value3" } Equals: { "Value1", "Value2", "Value3" }
</Expanded>
</Expression>
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
<Original>
parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ), Equals( std::vector&lt;Catch::StringRef>{"Value1", "Value2", "Value3"} )
parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ), Equals( std::vector&lt;std::string_view>{"Value1", "Value2", "Value3"} )
</Original>
<Expanded>
{ Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 }
{ "Value1", "Value2", "Value3" } Equals: { "Value1", "Value2", "Value3" }
</Expanded>
</Expression>
<OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/>
@@ -21017,7 +20611,7 @@ Approx( -1.95996398454005449 )
<TestCase name="shortened hide tags are split apart" tags="[tags]" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" >
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" >
<Original>
testcase.tags, VectorContains( Tag( "magic-tag" ) ) &amp;&amp; VectorContains( Tag( "."_catch_sr ) )
testcase.tags, VectorContains( Tag( "magic-tag" ) ) &amp;&amp; VectorContains( Tag( "." ) )
</Original>
<Expanded>
{ {?}, {?} } ( Contains: {?} and Contains: {?} )
@@ -21034,7 +20628,7 @@ Approx( -1.95996398454005449 )
<TestCase name="splitString" tags="[string-manip]" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
<Original>
splitStringRef("", ','), Equals(std::vector&lt;StringRef>())
splitStringRef("", ','), Equals(std::vector&lt;std::string_view>())
</Original>
<Expanded>
{ } Equals: { }
@@ -21042,18 +20636,18 @@ Approx( -1.95996398454005449 )
</Expression>
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
<Original>
splitStringRef("abc", ','), Equals(std::vector&lt;StringRef>{"abc"})
splitStringRef("abc", ','), Equals(std::vector&lt;std::string_view>{"abc"})
</Original>
<Expanded>
{ abc } Equals: { abc }
{ "abc" } Equals: { "abc" }
</Expanded>
</Expression>
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
<Original>
splitStringRef("abc,def", ','), Equals(std::vector&lt;StringRef>{"abc", "def"})
splitStringRef("abc,def", ','), Equals(std::vector&lt;std::string_view>{"abc", "def"})
</Original>
<Expanded>
{ abc, def } Equals: { abc, def }
{ "abc", "def" } Equals: { "abc", "def" }
</Expanded>
</Expression>
<OverallResult success="true" skips="0"/>
@@ -21120,7 +20714,7 @@ Approx( -1.95996398454005449 )
</Expression>
<Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
<Original>
startsWith("def"_catch_sr, 'd')
startsWith("def", 'd')
</Original>
<Expanded>
true
@@ -21493,10 +21087,10 @@ Approx( -1.95996398454005449 )
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" >
<Original>
testcase.tags[0].original == "magic.tag"_catch_sr
testcase.tags[0].original == "magic.tag"
</Original>
<Expanded>
magic.tag == magic.tag
"magic.tag" == "magic.tag"
</Expanded>
</Expression>
<OverallResult success="true" skips="0"/>
@@ -22324,6 +21918,6 @@ Approx( -1.95996398454005449 )
</Section>
<OverallResult success="true" skips="0"/>
</TestCase>
<OverallResults successes="2105" failures="157" expectedFailures="41" skips="12"/>
<OverallResultsCases successes="317" failures="95" expectedFailures="17" skips="6"/>
<OverallResults successes="2052" failures="157" expectedFailures="41" skips="12"/>
<OverallResultsCases successes="315" failures="95" expectedFailures="17" skips="6"/>
</Catch2TestRun>

View File

@@ -4619,7 +4619,7 @@ C
enumInfo->lookup(0) == "Value1"
</Original>
<Expanded>
Value1 == "Value1"
"Value1" == "Value1"
</Expanded>
</Expression>
<Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
@@ -4627,7 +4627,7 @@ C
enumInfo->lookup(1) == "Value2"
</Original>
<Expanded>
Value2 == "Value2"
"Value2" == "Value2"
</Expanded>
</Expression>
<Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
@@ -4635,7 +4635,7 @@ C
enumInfo->lookup(3) == "{** unexpected enum value **}"
</Original>
<Expanded>
{** unexpected enum value **}
"{** unexpected enum value **}"
==
"{** unexpected enum value **}"
</Expanded>
@@ -13429,412 +13429,6 @@ Message from section two
</Expression>
<OverallResult success="true" skips="0"/>
</TestCase>
<TestCase name="StringRef" tags="[StringRef][Strings]" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Section name="Empty string" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
empty.empty()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
empty.size() == 0
</Original>
<Expanded>
0 == 0
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
std::strcmp( empty.data(), "" ) == 0
</Original>
<Expanded>
0 == 0
</Expanded>
</Expression>
<OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="From string literal" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
s.empty() == false
</Original>
<Expanded>
false == false
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
s.size() == 5
</Original>
<Expanded>
5 == 5
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
std::strcmp( rawChars, "hello" ) == 0
</Original>
<Expanded>
0 == 0
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
s.data() == rawChars
</Original>
<Expanded>
"hello" == "hello"
</Expanded>
</Expression>
<OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="From sub-string" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
original == "original"
</Original>
<Expanded>
original == "original"
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE_NOTHROW" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
original.data()
</Original>
<Expanded>
original.data()
</Expanded>
</Expression>
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="Copy construction is shallow" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
original.begin() == copy.begin()
</Original>
<Expanded>
"original string" == "original string"
</Expanded>
</Expression>
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="Copy assignment is shallow" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
original.begin() == copy.begin()
</Original>
<Expanded>
"original string" == "original string"
</Expanded>
</Expression>
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="Substrings" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Section name="zero-based substring" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
ss.empty() == false
</Original>
<Expanded>
false == false
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
ss.size() == 5
</Original>
<Expanded>
5 == 5
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
std::strncmp( ss.data(), "hello", 5 ) == 0
</Original>
<Expanded>
0 == 0
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
ss == "hello"
</Original>
<Expanded>
hello == "hello"
</Expanded>
</Expression>
<OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="Substrings" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Section name="non-zero-based substring" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
ss.size() == 6
</Original>
<Expanded>
6 == 6
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
std::strcmp( ss.data(), "world!" ) == 0
</Original>
<Expanded>
0 == 0
</Expanded>
</Expression>
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="Substrings" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Section name="Pointer values of full refs should match" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
s.data() == s2.data()
</Original>
<Expanded>
"hello world!" == "hello world!"
</Expanded>
</Expression>
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="Substrings" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Section name="Pointer values of substring refs should also match" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
s.data() == ss.data()
</Original>
<Expanded>
"hello world!" == "hello world!"
</Expanded>
</Expression>
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="Substrings" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Section name="Past the end substring" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
s.substr(s.size() + 1, 123).empty()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="Substrings" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Section name="Substring off the end are trimmed" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
std::strcmp(ss.data(), "world!") == 0
</Original>
<Expanded>
0 == 0
</Expanded>
</Expression>
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="Substrings" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Section name="substring start after the end is empty" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
s.substr(1'000'000, 1).empty()
</Original>
<Expanded>
true
</Expanded>
</Expression>
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="Comparisons are deep" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
reinterpret_cast&lt;char*>(buffer1) != reinterpret_cast&lt;char*>(buffer2)
</Original>
<Expanded>
"Hello" != "Hello"
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
left == right
</Original>
<Expanded>
Hello == Hello
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
left != left.substr(0, 3)
</Original>
<Expanded>
Hello != Hel
</Expanded>
</Expression>
<OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="from std::string" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Section name="implicitly constructed" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
sr == "a standard string"
</Original>
<Expanded>
a standard string == "a standard string"
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
sr.size() == stdStr.size()
</Original>
<Expanded>
17 == 17
</Expanded>
</Expression>
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="from std::string" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Section name="explicitly constructed" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
sr == "a standard string"
</Original>
<Expanded>
a standard string == "a standard string"
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
sr.size() == stdStr.size()
</Original>
<Expanded>
17 == 17
</Expanded>
</Expression>
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="from std::string" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Section name="assigned" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
sr == "a standard string"
</Original>
<Expanded>
a standard string == "a standard string"
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
sr.size() == stdStr.size()
</Original>
<Expanded>
17 == 17
</Expanded>
</Expression>
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="to std::string" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Section name="explicitly constructed" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
stdStr == "a stringref"
</Original>
<Expanded>
"a stringref" == "a stringref"
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
stdStr.size() == sr.size()
</Original>
<Expanded>
11 == 11
</Expanded>
</Expression>
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="to std::string" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Section name="assigned" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
stdStr == "a stringref"
</Original>
<Expanded>
"a stringref" == "a stringref"
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
stdStr.size() == sr.size()
</Original>
<Expanded>
11 == 11
</Expanded>
</Expression>
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="std::string += StringRef" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
lhs == "some string += the stringref contents"
</Original>
<Expanded>
"some string += the stringref contents"
==
"some string += the stringref contents"
</Expanded>
</Expression>
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="StringRef + StringRef" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Original>
together == "abrakadabra"
</Original>
<Expanded>
"abrakadabra" == "abrakadabra"
</Expanded>
</Expression>
<OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<OverallResult success="true" skips="0"/>
</TestCase>
<TestCase name="StringRef at compilation time" tags="[constexpr][StringRef][Strings]" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<Section name="Simple constructors" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<OverallResults successes="12" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<Section name="UDL construction" filename="tests/<exe-name>/IntrospectiveTests/String.tests.cpp" >
<OverallResults successes="4" failures="0" expectedFailures="0" skipped="false"/>
</Section>
<OverallResult success="true" skips="0"/>
</TestCase>
<TestCase name="Stringifying char arrays with statically known sizes - char" tags="[toString]" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
<Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
<Original>
@@ -14069,7 +13663,7 @@ Message from section two
</Expression>
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" >
<Original>
testCase.tags, VectorContains( Tag( "tag with spaces" ) ) &amp;&amp; VectorContains( Tag( "I said \"good day\" sir!"_catch_sr ) )
testCase.tags, VectorContains( Tag( "tag with spaces" ) ) &amp;&amp; VectorContains( Tag( "I said \"good day\" sir!" ) )
</Original>
<Expanded>
{ {?}, {?} } ( Contains: {?} and Contains: {?} )
@@ -16270,42 +15864,42 @@ Message from section two
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
<Original>
trim(StringRef(no_whitespace)) == StringRef(no_whitespace)
trim(std::string_view(no_whitespace)) == std::string_view(no_whitespace)
</Original>
<Expanded>
There is no extra whitespace here
"There is no extra whitespace here"
==
There is no extra whitespace here
"There is no extra whitespace here"
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
<Original>
trim(StringRef(leading_whitespace)) == StringRef(no_whitespace)
trim(std::string_view(leading_whitespace)) == std::string_view(no_whitespace)
</Original>
<Expanded>
There is no extra whitespace here
"There is no extra whitespace here"
==
There is no extra whitespace here
"There is no extra whitespace here"
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
<Original>
trim(StringRef(trailing_whitespace)) == StringRef(no_whitespace)
trim(std::string_view(trailing_whitespace)) == std::string_view(no_whitespace)
</Original>
<Expanded>
There is no extra whitespace here
"There is no extra whitespace here"
==
There is no extra whitespace here
"There is no extra whitespace here"
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
<Original>
trim(StringRef(whitespace_at_both_ends)) == StringRef(no_whitespace)
trim(std::string_view(whitespace_at_both_ends)) == std::string_view(no_whitespace)
</Original>
<Expanded>
There is no extra whitespace here
"There is no extra whitespace here"
==
There is no extra whitespace here
"There is no extra whitespace here"
</Expanded>
</Expression>
<OverallResult success="true" skips="0"/>
@@ -20330,7 +19924,7 @@ Approx( -1.95996398454005449 )
<Section name="No enums" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
<Original>
parseEnums( "" ), Equals( std::vector&lt;Catch::StringRef>{} )
parseEnums( "" ), Equals( std::vector&lt;std::string_view>{} )
</Original>
<Expanded>
{ } Equals: { }
@@ -20341,26 +19935,26 @@ Approx( -1.95996398454005449 )
<Section name="One enum value" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
<Original>
parseEnums( "ClassName::EnumName::Value1" ), Equals(std::vector&lt;Catch::StringRef>{"Value1"} )
parseEnums( "ClassName::EnumName::Value1" ), Equals(std::vector&lt;std::string_view>{"Value1"} )
</Original>
<Expanded>
{ Value1 } Equals: { Value1 }
{ "Value1" } Equals: { "Value1" }
</Expanded>
</Expression>
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
<Original>
parseEnums( "Value1" ), Equals( std::vector&lt;Catch::StringRef>{"Value1"} )
parseEnums( "Value1" ), Equals( std::vector&lt;std::string_view>{"Value1"} )
</Original>
<Expanded>
{ Value1 } Equals: { Value1 }
{ "Value1" } Equals: { "Value1" }
</Expanded>
</Expression>
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
<Original>
parseEnums( "EnumName::Value1" ), Equals(std::vector&lt;Catch::StringRef>{"Value1"} )
parseEnums( "EnumName::Value1" ), Equals(std::vector&lt;std::string_view>{"Value1"} )
</Original>
<Expanded>
{ Value1 } Equals: { Value1 }
{ "Value1" } Equals: { "Value1" }
</Expanded>
</Expression>
<OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/>
@@ -20368,26 +19962,26 @@ Approx( -1.95996398454005449 )
<Section name="Multiple enum values" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
<Original>
parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ), Equals( std::vector&lt;Catch::StringRef>{"Value1", "Value2"} )
parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ), Equals( std::vector&lt;std::string_view>{"Value1", "Value2"} )
</Original>
<Expanded>
{ Value1, Value2 } Equals: { Value1, Value2 }
{ "Value1", "Value2" } Equals: { "Value1", "Value2" }
</Expanded>
</Expression>
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
<Original>
parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ), Equals( std::vector&lt;Catch::StringRef>{"Value1", "Value2", "Value3"} )
parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ), Equals( std::vector&lt;std::string_view>{"Value1", "Value2", "Value3"} )
</Original>
<Expanded>
{ Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 }
{ "Value1", "Value2", "Value3" } Equals: { "Value1", "Value2", "Value3" }
</Expanded>
</Expression>
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
<Original>
parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ), Equals( std::vector&lt;Catch::StringRef>{"Value1", "Value2", "Value3"} )
parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ), Equals( std::vector&lt;std::string_view>{"Value1", "Value2", "Value3"} )
</Original>
<Expanded>
{ Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 }
{ "Value1", "Value2", "Value3" } Equals: { "Value1", "Value2", "Value3" }
</Expanded>
</Expression>
<OverallResults successes="3" failures="0" expectedFailures="0" skipped="false"/>
@@ -21016,7 +20610,7 @@ Approx( -1.95996398454005449 )
<TestCase name="shortened hide tags are split apart" tags="[tags]" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" >
<Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" >
<Original>
testcase.tags, VectorContains( Tag( "magic-tag" ) ) &amp;&amp; VectorContains( Tag( "."_catch_sr ) )
testcase.tags, VectorContains( Tag( "magic-tag" ) ) &amp;&amp; VectorContains( Tag( "." ) )
</Original>
<Expanded>
{ {?}, {?} } ( Contains: {?} and Contains: {?} )
@@ -21033,7 +20627,7 @@ Approx( -1.95996398454005449 )
<TestCase name="splitString" tags="[string-manip]" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
<Original>
splitStringRef("", ','), Equals(std::vector&lt;StringRef>())
splitStringRef("", ','), Equals(std::vector&lt;std::string_view>())
</Original>
<Expanded>
{ } Equals: { }
@@ -21041,18 +20635,18 @@ Approx( -1.95996398454005449 )
</Expression>
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
<Original>
splitStringRef("abc", ','), Equals(std::vector&lt;StringRef>{"abc"})
splitStringRef("abc", ','), Equals(std::vector&lt;std::string_view>{"abc"})
</Original>
<Expanded>
{ abc } Equals: { abc }
{ "abc" } Equals: { "abc" }
</Expanded>
</Expression>
<Expression success="true" type="CHECK_THAT" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
<Original>
splitStringRef("abc,def", ','), Equals(std::vector&lt;StringRef>{"abc", "def"})
splitStringRef("abc,def", ','), Equals(std::vector&lt;std::string_view>{"abc", "def"})
</Original>
<Expanded>
{ abc, def } Equals: { abc, def }
{ "abc", "def" } Equals: { "abc", "def" }
</Expanded>
</Expression>
<OverallResult success="true" skips="0"/>
@@ -21119,7 +20713,7 @@ Approx( -1.95996398454005449 )
</Expression>
<Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
<Original>
startsWith("def"_catch_sr, 'd')
startsWith("def", 'd')
</Original>
<Expanded>
true
@@ -21492,10 +21086,10 @@ Approx( -1.95996398454005449 )
</Expression>
<Expression success="true" type="REQUIRE" filename="tests/<exe-name>/IntrospectiveTests/Tag.tests.cpp" >
<Original>
testcase.tags[0].original == "magic.tag"_catch_sr
testcase.tags[0].original == "magic.tag"
</Original>
<Expanded>
magic.tag == magic.tag
"magic.tag" == "magic.tag"
</Expanded>
</Expression>
<OverallResult success="true" skips="0"/>
@@ -22323,6 +21917,6 @@ Approx( -1.95996398454005449 )
</Section>
<OverallResult success="true" skips="0"/>
</TestCase>
<OverallResults successes="2105" failures="157" expectedFailures="41" skips="12"/>
<OverallResultsCases successes="317" failures="95" expectedFailures="17" skips="6"/>
<OverallResults successes="2052" failures="157" expectedFailures="41" skips="12"/>
<OverallResultsCases successes="315" failures="95" expectedFailures="17" skips="6"/>
</Catch2TestRun>