Add tests for StringRef's copy operations being shallow

This commit is contained in:
Martin Jeřábek
2021-03-08 14:57:59 +01:00
committed by Martin Hořeňovský
parent 72a09de236
commit 8711b63a0a
8 changed files with 72 additions and 6 deletions

View File

@@ -11079,6 +11079,30 @@ String.tests.cpp:<line number>: PASSED:
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
@@ -17541,5 +17565,5 @@ Misc.tests.cpp:<line number>: PASSED:
===============================================================================
test cases: 384 | 291 passed | 86 failed | 7 failed as expected
assertions: 2200 | 2027 passed | 146 failed | 27 failed as expected
assertions: 2202 | 2029 passed | 146 failed | 27 failed as expected