Index: mojo/public/cpp/bindings/tests/string_unittest.cc |
diff --git a/mojo/public/cpp/bindings/tests/string_unittest.cc b/mojo/public/cpp/bindings/tests/string_unittest.cc |
index 0769071b15de760fae1b2d11b33fa4b76d2bf754..6a82987d438e7629e2e5c1541270a8707e2a388f 100644 |
--- a/mojo/public/cpp/bindings/tests/string_unittest.cc |
+++ b/mojo/public/cpp/bindings/tests/string_unittest.cc |
@@ -2,6 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+#include <sstream> |
+ |
#include "mojo/public/cpp/bindings/string.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -116,5 +118,14 @@ TEST(StringTest, LessThanNullness) { |
EXPECT_FALSE(real < null); |
} |
+TEST(StringText, OutputFormatting) { |
+ String s("abc"); |
+ String null; |
+ |
+ std::ostringstream so; |
+ so << "s=" << s << ", null=" << null; |
+ EXPECT_EQ("s=abc, null=", so.str()); |
+} |
+ |
} // namespace test |
} // namespace mojo |