diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/fxcrt/cfx_bytestring_unittest.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/core/fxcrt/cfx_bytestring_unittest.cpp b/core/fxcrt/cfx_bytestring_unittest.cpp index 86fa3830c2..b0265038d5 100644 --- a/core/fxcrt/cfx_bytestring_unittest.cpp +++ b/core/fxcrt/cfx_bytestring_unittest.cpp @@ -1261,9 +1261,16 @@ TEST(fxcrt, EqualNoCase) { } TEST(fxcrt, OStreamByteStringOverload) { - // Basic case std::ostringstream stream; - CFX_ByteString str("def"); + + // Basic case, empty string + CFX_ByteString str; + stream << str; + EXPECT_EQ("", stream.str()); + + // Basic case, non-empty string + str = "def"; + stream.str(""); stream << "abc" << str << "ghi"; EXPECT_EQ("abcdefghi", stream.str()); |