Add test for past-the-end substr on StringRef
This commit is contained in:
parent
9f4c4777a5
commit
dab0296b64
6 changed files with 38 additions and 5 deletions
|
@ -111,6 +111,10 @@ TEST_CASE( "StringRef", "[Strings][StringRef]" ) {
|
|||
SECTION( "Pointer values of substring refs should not match" ) {
|
||||
REQUIRE( s.c_str() != ss.c_str() );
|
||||
}
|
||||
|
||||
SECTION("Past the end substring") {
|
||||
REQUIRE(s.substr(s.size() + 1, 123).empty());
|
||||
}
|
||||
}
|
||||
|
||||
SECTION( "Comparisons" ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue