diff options
author | Henrique Nakashima <hnakashima@chromium.org> | 2017-06-27 15:32:50 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-06-27 20:19:47 +0000 |
commit | b109ac4f09528f2e3a4ef96a163625846039198f (patch) | |
tree | f8e5d7422d260f6ab9097bed8cf8b2eaf8c2eac8 | |
parent | 2e2da135d4b38cad719cd1a410ea2356e5ae1a8a (diff) | |
download | pdfium-b109ac4f09528f2e3a4ef96a163625846039198f.tar.xz |
Add empty string test case for ostream << CFX_ByteString.
Change-Id: I1f3933709ad4a4f251a634dbe6d87a541994f02e
Reviewed-on: https://pdfium-review.googlesource.com/7037
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
-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()); |