Removed String and StringBuilder

This commit is contained in:
Phil Nash
2017-08-14 09:04:14 +01:00
parent ece64c3b3a
commit 3772f69f0f
14 changed files with 24 additions and 1092 deletions

View File

@@ -4257,50 +4257,6 @@ MatchersTests.cpp:<line number>: FAILED:
with expansion:
"this string contains 'abc' as a substring" starts with: "string"
-------------------------------------------------------------------------------
String
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.c_str(), "" ) == 0 )
with expansion:
0 == 0
-------------------------------------------------------------------------------
String
from 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 matchers
-------------------------------------------------------------------------------
@@ -4331,172 +4287,6 @@ PASSED:
with expansion:
"this string contains 'abc' as a substring" ends with: "substring"
-------------------------------------------------------------------------------
StringBuilder
basic
-------------------------------------------------------------------------------
StringBuilder.tests.cpp:<line number>
...............................................................................
StringBuilder.tests.cpp:<line number>:
PASSED:
REQUIRE( sb.capacity() == 0 )
with expansion:
0 == 0
StringBuilder.tests.cpp:<line number>:
PASSED:
REQUIRE( sb.size() == 0 )
with expansion:
0 == 0
StringBuilder.tests.cpp:<line number>:
PASSED:
REQUIRE( sb.capacity() == 32 )
with expansion:
32 == 32
StringBuilder.tests.cpp:<line number>:
PASSED:
REQUIRE( sb.size() == 0 )
with expansion:
0 == 0
StringBuilder.tests.cpp:<line number>:
PASSED:
REQUIRE( sb.capacity() == 32 )
with expansion:
32 == 32
StringBuilder.tests.cpp:<line number>:
PASSED:
REQUIRE( sb.size() == 5 )
with expansion:
5 == 5
StringBuilder.tests.cpp:<line number>:
PASSED:
REQUIRE( s == "hello" )
with expansion:
hello == "hello"
StringBuilder.tests.cpp:<line number>:
PASSED:
REQUIRE( s.size() == 5 )
with expansion:
5 == 5
-------------------------------------------------------------------------------
StringBuilder
concatenation
-------------------------------------------------------------------------------
StringBuilder.tests.cpp:<line number>
...............................................................................
StringBuilder.tests.cpp:<line number>:
PASSED:
REQUIRE( s == "hello world" )
with expansion:
hello world == "hello world"
-------------------------------------------------------------------------------
StringBuilder
concat & move
-------------------------------------------------------------------------------
StringBuilder.tests.cpp:<line number>
...............................................................................
StringBuilder.tests.cpp:<line number>:
PASSED:
REQUIRE( s == "hello world" )
with expansion:
hello world == "hello world"
-------------------------------------------------------------------------------
StringBuilder
reserved
-------------------------------------------------------------------------------
StringBuilder.tests.cpp:<line number>
...............................................................................
StringBuilder.tests.cpp:<line number>:
PASSED:
REQUIRE( sb16.capacity() == 16 )
with expansion:
16 == 16
StringBuilder.tests.cpp:<line number>:
PASSED:
REQUIRE( sb16.capacity() == 16 )
with expansion:
16 == 16
StringBuilder.tests.cpp:<line number>:
PASSED:
REQUIRE( s == "hello world" )
with expansion:
hello world == "hello world"
-------------------------------------------------------------------------------
StringBuilder
from String
copy
-------------------------------------------------------------------------------
StringBuilder.tests.cpp:<line number>
...............................................................................
StringBuilder.tests.cpp:<line number>:
PASSED:
REQUIRE( s2 == s )
with expansion:
hello == hello
StringBuilder.tests.cpp:<line number>:
PASSED:
REQUIRE( s2.c_str() != s.c_str() )
with expansion:
"hello" != "hello"
-------------------------------------------------------------------------------
StringBuilder
from String
move from uniquely owned string
-------------------------------------------------------------------------------
StringBuilder.tests.cpp:<line number>
...............................................................................
StringBuilder.tests.cpp:<line number>:
PASSED:
REQUIRE( s2 == "hello" )
with expansion:
hello == "hello"
StringBuilder.tests.cpp:<line number>:
PASSED:
REQUIRE( s2.c_str() == originalPointer )
with expansion:
"hello" == "hello"
-------------------------------------------------------------------------------
StringBuilder
from String
move from shared string (copies)
-------------------------------------------------------------------------------
StringBuilder.tests.cpp:<line number>
...............................................................................
StringBuilder.tests.cpp:<line number>:
PASSED:
REQUIRE( s2 == "hello" )
with expansion:
hello == "hello"
StringBuilder.tests.cpp:<line number>:
PASSED:
REQUIRE( s2.c_str() != originalPointer )
with expansion:
"hello" != "hello"
-------------------------------------------------------------------------------
StringRef
Empty string
@@ -4744,70 +4534,6 @@ PASSED:
with expansion:
hello != cello
-------------------------------------------------------------------------------
StringRef
From string
Copied
-------------------------------------------------------------------------------
StringRef.tests.cpp:<line number>
...............................................................................
StringRef.tests.cpp:<line number>:
PASSED:
REQUIRE( copied == "hot potato" )
with expansion:
hot potato == "hot potato"
StringRef.tests.cpp:<line number>:
PASSED:
REQUIRE( str == "hot potato" )
with expansion:
hot potato == "hot potato"
StringRef.tests.cpp:<line number>:
PASSED:
REQUIRE( isOwned( copied ) == false )
with expansion:
false == false
StringRef.tests.cpp:<line number>:
PASSED:
REQUIRE( data( copied ) == originalPointer )
with expansion:
"hot potato" == "hot potato"
-------------------------------------------------------------------------------
StringRef
From string
Moved
-------------------------------------------------------------------------------
StringRef.tests.cpp:<line number>
...............................................................................
StringRef.tests.cpp:<line number>:
PASSED:
REQUIRE( copied == "hot potato" )
with expansion:
hot potato == "hot potato"
StringRef.tests.cpp:<line number>:
PASSED:
REQUIRE( isOwned( copied ) )
with expansion:
true
StringRef.tests.cpp:<line number>:
PASSED:
REQUIRE( str.empty() )
with expansion:
true
StringRef.tests.cpp:<line number>:
PASSED:
REQUIRE( data( copied ) == originalPointer )
with expansion:
"hot potato" == "hot potato"
-------------------------------------------------------------------------------
StringRef
from std::string
@@ -7737,6 +7463,6 @@ MiscTests.cpp:<line number>:
PASSED:
===============================================================================
test cases: 183 | 129 passed | 50 failed | 4 failed as expected
assertions: 910 | 787 passed | 102 failed | 21 failed as expected
test cases: 181 | 127 passed | 50 failed | 4 failed as expected
assertions: 878 | 755 passed | 102 failed | 21 failed as expected