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

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

Issue 2965663002: Mojo C++ bindings: support setting default value for fields whose types are typemapped enums. (Closed)
Patch Set: . Created 3 years, 6 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
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 7e4bcd12f71c02af13096133462ced48d0a2797d..77122c975d09f203b0b662d04c32b65d001d8f6c 100644
--- a/mojo/public/cpp/bindings/tests/struct_traits_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/struct_traits_unittest.cc
@@ -550,5 +550,10 @@ TEST_F(StructTraitsTest, EchoUnionWithTraits) {
}
}
+TEST_F(StructTraitsTest, DefaultValueOfEnumWithTraits) {
+ auto container = EnumWithTraitsContainer::New();
+ EXPECT_EQ(EnumWithTraitsImpl::CUSTOM_VALUE_1, container->f_field);
+}
+
} // namespace test
} // namespace mojo
« no previous file with comments | « mojo/public/cpp/bindings/lib/bindings_internal.h ('k') | mojo/public/interfaces/bindings/tests/struct_with_traits.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698