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

Side by Side 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, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/callback.h" 6 #include "base/callback.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 ->get_struct() 543 ->get_struct()
544 .value); 544 .value);
545 quit_closure.Run(); 545 quit_closure.Run();
546 546
547 }, 547 },
548 loop.QuitClosure())); 548 loop.QuitClosure()));
549 loop.Run(); 549 loop.Run();
550 } 550 }
551 } 551 }
552 552
553 TEST_F(StructTraitsTest, DefaultValueOfEnumWithTraits) {
554 auto container = EnumWithTraitsContainer::New();
555 EXPECT_EQ(EnumWithTraitsImpl::CUSTOM_VALUE_1, container->f_field);
556 }
557
553 } // namespace test 558 } // namespace test
554 } // namespace mojo 559 } // namespace mojo
OLDNEW
« 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