diff options
| author | Phil Nash | 2017-08-14 09:04:14 +0100 |
|---|---|---|
| committer | Phil Nash | 2017-08-14 09:04:14 +0100 |
| commit | 3772f69f0fbba0620df4c262b1925444a0567b37 (patch) | |
| tree | 684dfe257d34c22ff48826ffc7572f14aecb145e /projects | |
| parent | ece64c3b3aee6256be32f1f860b5d638173e7520 (diff) | |
| download | catch3-3772f69f0fbba0620df4c262b1925444a0567b37.tar.gz | |
Removed String and StringBuilder
Diffstat (limited to 'projects')
| -rw-r--r-- | projects/SelfTest/Baselines/console.std.approved.txt | 4 | ||||
| -rw-r--r-- | projects/SelfTest/Baselines/console.sw.approved.txt | 278 | ||||
| -rw-r--r-- | projects/SelfTest/Baselines/junit.sw.approved.txt | 13 | ||||
| -rw-r--r-- | projects/SelfTest/Baselines/xml.sw.approved.txt | 314 | ||||
| -rw-r--r-- | projects/SelfTest/String.tests.cpp | 22 | ||||
| -rw-r--r-- | projects/SelfTest/StringBuilder.tests.cpp | 76 | ||||
| -rw-r--r-- | projects/SelfTest/StringRef.tests.cpp | 30 |
7 files changed, 8 insertions, 729 deletions
diff --git a/projects/SelfTest/Baselines/console.std.approved.txt b/projects/SelfTest/Baselines/console.std.approved.txt index 2618ba11..4bc5c454 100644 --- a/projects/SelfTest/Baselines/console.std.approved.txt +++ b/projects/SelfTest/Baselines/console.std.approved.txt @@ -1020,6 +1020,6 @@ with expansion: "{?}" == "1" =============================================================================== -test cases: 183 | 132 passed | 47 failed | 4 failed as expected -assertions: 908 | 791 passed | 96 failed | 21 failed as expected +test cases: 181 | 130 passed | 47 failed | 4 failed as expected +assertions: 876 | 759 passed | 96 failed | 21 failed as expected diff --git a/projects/SelfTest/Baselines/console.sw.approved.txt b/projects/SelfTest/Baselines/console.sw.approved.txt index 3cc191a6..17b876ea 100644 --- a/projects/SelfTest/Baselines/console.sw.approved.txt +++ b/projects/SelfTest/Baselines/console.sw.approved.txt @@ -4258,50 +4258,6 @@ 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 ------------------------------------------------------------------------------- MatchersTests.cpp:<line number> @@ -4332,172 +4288,6 @@ 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 ------------------------------------------------------------------------------- @@ -4746,70 +4536,6 @@ with expansion: ------------------------------------------------------------------------------- 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 implicitly constructed ------------------------------------------------------------------------------- @@ -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 diff --git a/projects/SelfTest/Baselines/junit.sw.approved.txt b/projects/SelfTest/Baselines/junit.sw.approved.txt index 8cd10426..88b20529 100644 --- a/projects/SelfTest/Baselines/junit.sw.approved.txt +++ b/projects/SelfTest/Baselines/junit.sw.approved.txt @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <testsuitesloose text artifact > - <testsuite name="<exe-name>" errors="15" failures="88" tests="911" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> + <testsuite name="<exe-name>" errors="15" failures="88" tests="879" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> <testcase classname="<exe-name>.global" name="# A test name that starts with a #" time="{duration}"/> <testcase classname="<exe-name>.global" name="#748 - captures with unexpected exceptions/outside assertions" time="{duration}"> <error type="TEST_CASE"> @@ -505,16 +505,7 @@ Message from section two MatchersTests.cpp:<line number> </failure> </testcase> - <testcase classname="<exe-name>.global" name="String/empty string" time="{duration}"/> - <testcase classname="<exe-name>.global" name="String/from literal" time="{duration}"/> <testcase classname="<exe-name>.global" name="String matchers" time="{duration}"/> - <testcase classname="<exe-name>.global" name="StringBuilder/basic" time="{duration}"/> - <testcase classname="<exe-name>.global" name="StringBuilder/concatenation" time="{duration}"/> - <testcase classname="<exe-name>.global" name="StringBuilder/concat & move" time="{duration}"/> - <testcase classname="<exe-name>.global" name="StringBuilder/reserved" time="{duration}"/> - <testcase classname="<exe-name>.global" name="StringBuilder/from String/copy" time="{duration}"/> - <testcase classname="<exe-name>.global" name="StringBuilder/from String/move from uniquely owned string" time="{duration}"/> - <testcase classname="<exe-name>.global" name="StringBuilder/from String/move from shared string (copies)" time="{duration}"/> <testcase classname="<exe-name>.global" name="StringRef/Empty string" time="{duration}"/> <testcase classname="<exe-name>.global" name="StringRef/From string literal" time="{duration}"/> <testcase classname="<exe-name>.global" name="StringRef/From string literal/c_str() does not cause copy" time="{duration}"/> @@ -529,8 +520,6 @@ StringRef.tests.cpp:<line number> <testcase classname="<exe-name>.global" name="StringRef/Substrings/Pointer values of full refs should match" time="{duration}"/> <testcase classname="<exe-name>.global" name="StringRef/Substrings/Pointer values of substring refs should not match" time="{duration}"/> <testcase classname="<exe-name>.global" name="StringRef/Comparisons" time="{duration}"/> - <testcase classname="<exe-name>.global" name="StringRef/From string/Copied" time="{duration}"/> - <testcase classname="<exe-name>.global" name="StringRef/From string/Moved" time="{duration}"/> <testcase classname="<exe-name>.global" name="StringRef/from std::string/implicitly constructed" time="{duration}"/> <testcase classname="<exe-name>.global" name="StringRef/from std::string/explicitly constructed" time="{duration}"/> <testcase classname="<exe-name>.global" name="StringRef/from std::string/assigned" time="{duration}"/> diff --git a/projects/SelfTest/Baselines/xml.sw.approved.txt b/projects/SelfTest/Baselines/xml.sw.approved.txt index 324fbf6b..21c9c9ca 100644 --- a/projects/SelfTest/Baselines/xml.sw.approved.txt +++ b/projects/SelfTest/Baselines/xml.sw.approved.txt @@ -4860,55 +4860,6 @@ Message from section two </Expression> <OverallResult success="false"/> </TestCase> - <TestCase name="String" tags="[Strings]" filename="projects/<exe-name>/String.tests.cpp" > - <Section name="empty string" filename="projects/<exe-name>/String.tests.cpp" > - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/String.tests.cpp" > - <Original> - empty.empty() - </Original> - <Expanded> - true - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/String.tests.cpp" > - <Original> - empty.size() == 0 - </Original> - <Expanded> - 0 == 0 - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/String.tests.cpp" > - <Original> - std::strcmp( empty.c_str(), "" ) == 0 - </Original> - <Expanded> - 0 == 0 - </Expanded> - </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> - </Section> - <Section name="from literal" filename="projects/<exe-name>/String.tests.cpp" > - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/String.tests.cpp" > - <Original> - s.empty() == false - </Original> - <Expanded> - false == false - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/String.tests.cpp" > - <Original> - s.size() == 5 - </Original> - <Expanded> - 5 == 5 - </Expanded> - </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> - </Section> - <OverallResult success="true"/> - </TestCase> <TestCase name="String matchers" tags="[matchers]" filename="projects/<exe-name>/MatchersTests.cpp" > <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/MatchersTests.cpp" > <Original> @@ -4944,191 +4895,6 @@ Message from section two </Expression> <OverallResult success="true"/> </TestCase> - <TestCase name="StringBuilder" tags="[Strings]" filename="projects/<exe-name>/StringBuilder.tests.cpp" > - <Section name="basic" filename="projects/<exe-name>/StringBuilder.tests.cpp" > - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/StringBuilder.tests.cpp" > - <Original> - sb.capacity() == 0 - </Original> - <Expanded> - 0 == 0 - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/StringBuilder.tests.cpp" > - <Original> - sb.size() == 0 - </Original> - <Expanded> - 0 == 0 - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/StringBuilder.tests.cpp" > - <Original> - sb.capacity() == 32 - </Original> - <Expanded> - 32 == 32 - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/StringBuilder.tests.cpp" > - <Original> - sb.size() == 0 - </Original> - <Expanded> - 0 == 0 - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/StringBuilder.tests.cpp" > - <Original> - sb.capacity() == 32 - </Original> - <Expanded> - 32 == 32 - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/StringBuilder.tests.cpp" > - <Original> - sb.size() == 5 - </Original> - <Expanded> - 5 == 5 - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/StringBuilder.tests.cpp" > - <Original> - s == "hello" - </Original> - <Expanded> - hello == "hello" - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/StringBuilder.tests.cpp" > - <Original> - s.size() == 5 - </Original> - <Expanded> - 5 == 5 - </Expanded> - </Expression> - <OverallResults successes="8" failures="0" expectedFailures="0"/> - </Section> - <Section name="concatenation" filename="projects/<exe-name>/StringBuilder.tests.cpp" > - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/StringBuilder.tests.cpp" > - <Original> - s == "hello world" - </Original> - <Expanded> - hello world == "hello world" - </Expanded> - </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> - </Section> - <Section name="concat & move" filename="projects/<exe-name>/StringBuilder.tests.cpp" > - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/StringBuilder.tests.cpp" > - <Original> - s == "hello world" - </Original> - <Expanded> - hello world == "hello world" - </Expanded> - </Expression> - <OverallResults successes="1" failures="0" expectedFailures="0"/> - </Section> - <Section name="reserved" filename="projects/<exe-name>/StringBuilder.tests.cpp" > - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/StringBuilder.tests.cpp" > - <Original> - sb16.capacity() == 16 - </Original> - <Expanded> - 16 == 16 - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/StringBuilder.tests.cpp" > - <Original> - sb16.capacity() == 16 - </Original> - <Expanded> - 16 == 16 - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/StringBuilder.tests.cpp" > - <Original> - s == "hello world" - </Original> - <Expanded> - hello world == "hello world" - </Expanded> - </Expression> - <OverallResults successes="3" failures="0" expectedFailures="0"/> - </Section> - <Section name="from String" filename="projects/<exe-name>/StringBuilder.tests.cpp" > - <Section name="copy" filename="projects/<exe-name>/StringBuilder.tests.cpp" > - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/StringBuilder.tests.cpp" > - <Original> - s2 == s - </Original> - <Expanded> - hello == hello - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/StringBuilder.tests.cpp" > - <Original> - s2.c_str() != s.c_str() - </Original> - <Expanded> - "hello" != "hello" - </Expanded> - </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> - </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> - </Section> - <Section name="from String" filename="projects/<exe-name>/StringBuilder.tests.cpp" > - <Section name="move from uniquely owned string" filename="projects/<exe-name>/StringBuilder.tests.cpp" > - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/StringBuilder.tests.cpp" > - <Original> - s2 == "hello" - </Original> - <Expanded> - hello == "hello" - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/StringBuilder.tests.cpp" > - <Original> - s2.c_str() == originalPointer - </Original> - <Expanded> - "hello" == "hello" - </Expanded> - </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> - </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> - </Section> - <Section name="from String" filename="projects/<exe-name>/StringBuilder.tests.cpp" > - <Section name="move from shared string (copies)" filename="projects/<exe-name>/StringBuilder.tests.cpp" > - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/StringBuilder.tests.cpp" > - <Original> - s2 == "hello" - </Original> - <Expanded> - hello == "hello" - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/StringBuilder.tests.cpp" > - <Original> - s2.c_str() != originalPointer - </Original> - <Expanded> - "hello" != "hello" - </Expanded> - </Expression> - <OverallResults successes="2" failures="0" expectedFailures="0"/> - </Section> - <OverallResults successes="2" failures="0" expectedFailures="0"/> - </Section> - <OverallResult success="true"/> - </TestCase> <TestCase name="StringRef" tags="[Strings]" filename="projects/<exe-name>/StringRef.tests.cpp" > <Section name="Empty string" filename="projects/<exe-name>/StringRef.tests.cpp" > <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/StringRef.tests.cpp" > @@ -5407,82 +5173,6 @@ Message from section two </Expression> <OverallResults successes="2" failures="0" expectedFailures="0"/> </Section> - <Section name="From string" filename="projects/<exe-name>/StringRef.tests.cpp" > - <Section name="Copied" filename="projects/<exe-name>/StringRef.tests.cpp" > - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/StringRef.tests.cpp" > - <Original> - copied == "hot potato" - </Original> - <Expanded> - hot potato == "hot potato" - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/StringRef.tests.cpp" > - <Original> - str == "hot potato" - </Original> - <Expanded> - hot potato == "hot potato" - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/StringRef.tests.cpp" > - <Original> - isOwned( copied ) == false - </Original> - <Expanded> - false == false - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/StringRef.tests.cpp" > - <Original> - data( copied ) == originalPointer - </Original> - <Expanded> - "hot potato" == "hot potato" - </Expanded> - </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> - </Section> - <OverallResults successes="4" failures="0" expectedFailures="0"/> - </Section> - <Section name="From string" filename="projects/<exe-name>/StringRef.tests.cpp" > - <Section name="Moved" filename="projects/<exe-name>/StringRef.tests.cpp" > - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/StringRef.tests.cpp" > - <Original> - copied == "hot potato" - </Original> - <Expanded> - hot potato == "hot potato" - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/StringRef.tests.cpp" > - <Original> - isOwned( copied ) - </Original> - <Expanded> - true - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/StringRef.tests.cpp" > - <Original> - str.empty() - </Original> - <Expanded> - true - </Expanded> - </Expression> - <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/StringRef.tests.cpp" > - <Original> - data( copied ) == originalPointer - </Original> - <Expanded> - "hot potato" == "hot potato" - </Expanded> - </Expression> - <OverallResults successes="4" failures="0" expectedFailures="0"/> - </Section> - <OverallResults successes="4" failures="0" expectedFailures="0"/> - </Section> <Section name="from std::string" filename="projects/<exe-name>/StringRef.tests.cpp" > <Section name="implicitly constructed" filename="projects/<exe-name>/StringRef.tests.cpp" > <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/StringRef.tests.cpp" > @@ -8568,7 +8258,7 @@ loose text artifact </Section> <OverallResult success="true"/> </TestCase> - <OverallResults successes="787" failures="103" expectedFailures="21"/> + <OverallResults successes="755" failures="103" expectedFailures="21"/> </Group> - <OverallResults successes="787" failures="102" expectedFailures="21"/> + <OverallResults successes="755" failures="102" expectedFailures="21"/> </Catch> diff --git a/projects/SelfTest/String.tests.cpp b/projects/SelfTest/String.tests.cpp deleted file mode 100644 index c27b7508..00000000 --- a/projects/SelfTest/String.tests.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#include "../include/internal/catch_string.h" - -#include "catch.hpp" - -#include <cstring> - -TEST_CASE( "String", "[Strings]" ) { - using Catch::String; - - SECTION( "empty string" ) { - String empty; - REQUIRE( empty.empty() ); - REQUIRE( empty.size() == 0 ); - REQUIRE( std::strcmp( empty.c_str(), "" ) == 0 ); - } - SECTION( "from literal" ) { - String s = "hello"; - REQUIRE( s.empty() == false ); - REQUIRE( s.size() == 5 ); - } - -}
\ No newline at end of file diff --git a/projects/SelfTest/StringBuilder.tests.cpp b/projects/SelfTest/StringBuilder.tests.cpp deleted file mode 100644 index e91d450d..00000000 --- a/projects/SelfTest/StringBuilder.tests.cpp +++ /dev/null @@ -1,76 +0,0 @@ -#include "internal/catch_stringbuilder.h" -#include "../include/internal/catch_stringref.h" -#include "../include/internal/catch_string.h" - -#include "catch.hpp" - -TEST_CASE( "StringBuilder", "[Strings]" ) { - - using Catch::StringBuilder; - using Catch::String; - - StringBuilder sb; - - SECTION( "basic" ) { - REQUIRE( sb.capacity() == 0 ); - REQUIRE( sb.size() == 0 ); - - sb.reserve( 32 ); - REQUIRE( sb.capacity() == 32 ); - REQUIRE( sb.size() == 0 ); - - sb.append( "hello" ); - REQUIRE( sb.capacity() == 32 ); - REQUIRE( sb.size() == 5 ); - - String s = std::move( sb ); - REQUIRE( s == "hello" ); - REQUIRE( s.size() == 5 ); - } - - SECTION( "concatenation" ) { - sb << "hello" << " " << "world"; - String s = std::move( sb ); - REQUIRE( s == "hello world" ); - } - - SECTION( "concat & move" ) { - String s = StringBuilder() << "hello" << " " << "world"; - REQUIRE( s == "hello world" ); - } - - SECTION( "reserved" ) { - StringBuilder sb16( 16 ); - REQUIRE( sb16.capacity() == 16 ); - sb16 << "hello" << " " << "world"; - REQUIRE( sb16.capacity() == 16 ); - String s = std::move( sb16 ); - REQUIRE( s == "hello world" ); - } - - SECTION( "from String" ) { - String s = "hello"; - - SECTION( "copy" ) { - StringBuilder sb2 = s; - String s2( std::move(sb2) ); - REQUIRE( s2 == s ); - REQUIRE( s2.c_str() != s.c_str() ); - } - SECTION( "move from uniquely owned string" ) { - auto originalPointer = s.c_str(); - StringBuilder sb2( std::move( s ) ); - String s2( std::move(sb2) ); - REQUIRE( s2 == "hello" ); - REQUIRE( s2.c_str() == originalPointer ); - } - SECTION( "move from shared string (copies)" ) { - auto originalPointer = s.c_str(); - String keepAlive = s; - StringBuilder sb2( std::move( s ) ); - String s2( std::move(sb2) ); |