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..e0d4736a686bcc27cf774dff0e0bc39cf531a74e 100644 |
--- a/mojo/public/cpp/bindings/tests/struct_traits_unittest.cc |
+++ b/mojo/public/cpp/bindings/tests/struct_traits_unittest.cc |
@@ -242,6 +242,16 @@ TEST_F(StructTraitsTest, EchoStructWithTraits) { |
loop.Run(); |
} |
+TEST_F(StructTraitsTest, CloneStructWithTraitsContainer) { |
+ StructWithTraitsContainerPtr container = StructWithTraitsContainer::New(); |
+ container->f_struct.set_uint32(7); |
+ container->f_struct.set_uint64(42); |
+ StructWithTraitsContainerPtr cloned_container = container.Clone(); |
+ EXPECT_EQ(7u, cloned_container->f_struct.get_uint32()); |
+ EXPECT_EQ(42u, cloned_container->f_struct.get_uint64()); |
+ |
+} |
+ |
TEST_F(StructTraitsTest, EchoPassByValueStructWithTraits) { |
MessagePipe mp; |
PassByValueStructWithTraitsImpl input; |