catch3
Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.
Clonegit clone https://git.progmasoft.com/catch3
Unify semi-duplicate test for StringRef
- Commit
39d69c134b35b13eda83a0fa5d39353f48793abe- Author
- Martin Hořeňovský ·
- Committer
- Leitwolf11
- Parents
98e4f8c8947c
Changes
tests/SelfTest/IntrospectiveTests/String.tests.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/SelfTest/IntrospectiveTests/String.tests.cpp b/tests/SelfTest/IntrospectiveTests/String.tests.cpp index 01cca40f..626842b6 100644 --- a/tests/SelfTest/IntrospectiveTests/String.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/String.tests.cpp @@ -39,6 +39,7 @@ TEST_CASE( "StringRef", "[Strings][StringRef]" ) { StringRef original = StringRef( "original string" ); StringRef copy = original; REQUIRE(original.begin() == copy.begin()); + REQUIRE( original.data() == copy.data() ); } SECTION( "Copy assignment is shallow" ) { StringRef original = StringRef( "original string" ); @@ -64,11 +65,6 @@ TEST_CASE( "StringRef", "[Strings][StringRef]" ) { REQUIRE( std::strcmp( ss.data(), "world!" ) == 0 ); } - SECTION( "Pointer values of full refs should match" ) { - StringRef s2 = s; - REQUIRE( s.data() == s2.data() ); - } - SECTION( "Pointer values of substring refs should also match" ) { REQUIRE( s.data() == ss.data() ); }