Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Unified Diff: mojo/public/cpp/bindings/tests/string_unittest.cc

Issue 1519673002: Add helpers for logging mojom objects. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: rebase Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/cpp/bindings/tests/map_unittest.cc ('k') | mojo/public/cpp/bindings/tests/struct_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « mojo/public/cpp/bindings/tests/map_unittest.cc ('k') | mojo/public/cpp/bindings/tests/struct_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698