diff options
Diffstat (limited to 'core/fxcrt/cfx_bytestring_unittest.cpp')
-rw-r--r-- | core/fxcrt/cfx_bytestring_unittest.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/fxcrt/cfx_bytestring_unittest.cpp b/core/fxcrt/cfx_bytestring_unittest.cpp index dcb8577b65..a4c5187c11 100644 --- a/core/fxcrt/cfx_bytestring_unittest.cpp +++ b/core/fxcrt/cfx_bytestring_unittest.cpp @@ -999,6 +999,14 @@ TEST(fxcrt, ByteStringCMid) { EXPECT_EQ("", longer_string.Mid(4, 3)); } +TEST(fxcrt, ByteStringCTrimmedRight) { + CFX_ByteStringC fred("FRED"); + EXPECT_EQ("FRED", fred.TrimmedRight('E')); + EXPECT_EQ("FRE", fred.TrimmedRight('D')); + CFX_ByteStringC fredd("FREDD"); + EXPECT_EQ("FRE", fred.TrimmedRight('D')); +} + TEST(fxcrt, ByteStringCElementAccess) { // CFX_ByteStringC includes the NUL terminator for non-empty strings. CFX_ByteStringC abc("abc"); |