mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-03 22:05:39 +02:00
Add tests for StringRef's copy operations being shallow
This commit is contained in:

committed by
Martin Hořeňovský

parent
72a09de236
commit
8711b63a0a
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user