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

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

Issue 2014403002: Mojo C++ bindings: custom type mapping of map (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months 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/struct_traits.h ('k') | mojo/public/cpp/bindings/tests/struct_with_traits_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/tests/struct_traits_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/struct_traits_unittest.cc b/mojo/public/cpp/bindings/tests/struct_traits_unittest.cc
index 38fbaf11cfbd04fd4ac5d4744dcc0e3fd8893535..9e5e1d9e9bae710b6f6bf1905d54e1ae56c75ee7 100644
--- a/mojo/public/cpp/bindings/tests/struct_traits_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/struct_traits_unittest.cc
@@ -225,6 +225,8 @@ TEST_F(StructTraitsTest, EchoStructWithTraits) {
input.get_mutable_struct_array().resize(2);
input.get_mutable_struct_array()[0].value = 1;
input.get_mutable_struct_array()[1].value = 2;
+ input.get_mutable_struct_map()["hello"] = NestedStructWithTraitsImpl(1024);
+ input.get_mutable_struct_map()["world"] = NestedStructWithTraitsImpl(2048);
base::RunLoop loop;
TraitsTestServicePtr proxy = GetTraitsTestProxy();
@@ -237,6 +239,7 @@ TEST_F(StructTraitsTest, EchoStructWithTraits) {
EXPECT_EQ(input.get_string_array(), passed.get_string_array());
EXPECT_EQ(input.get_struct(), passed.get_struct());
EXPECT_EQ(input.get_struct_array(), passed.get_struct_array());
+ EXPECT_EQ(input.get_struct_map(), passed.get_struct_map());
loop.Quit();
});
loop.Run();
« no previous file with comments | « mojo/public/cpp/bindings/struct_traits.h ('k') | mojo/public/cpp/bindings/tests/struct_with_traits_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698