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

Side by Side Diff: mojo/public/interfaces/bindings/tests/test_unions.mojom

Issue 2031823002: Mojo C++ bindings: more consistent Clone() and Equals(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 module mojo.test; 5 module mojo.test;
6 6
7 enum AnEnum { 7 enum AnEnum {
8 FIRST, SECOND 8 FIRST, SECOND
9 }; 9 };
10 10
(...skipping 20 matching lines...) Expand all
31 }; 31 };
32 32
33 union ObjectUnion { 33 union ObjectUnion {
34 int8 f_int8; 34 int8 f_int8;
35 string f_string; 35 string f_string;
36 DummyStruct f_dummy; 36 DummyStruct f_dummy;
37 DummyStruct? f_nullable; 37 DummyStruct? f_nullable;
38 array<int8> f_array_int8; 38 array<int8> f_array_int8;
39 map<string, int8> f_map_int8; 39 map<string, int8> f_map_int8;
40 PodUnion f_pod_union; 40 PodUnion f_pod_union;
41 // Test that Clone() is defined after SmallStruct is declared.
42 array<SmallStruct> f_small_structs;
41 }; 43 };
42 44
43 union HandleUnion { 45 union HandleUnion {
44 handle f_handle; 46 handle f_handle;
45 handle<message_pipe> f_message_pipe; 47 handle<message_pipe> f_message_pipe;
46 handle<data_pipe_consumer> f_data_pipe_consumer; 48 handle<data_pipe_consumer> f_data_pipe_consumer;
47 handle<data_pipe_producer> f_data_pipe_producer; 49 handle<data_pipe_producer> f_data_pipe_producer;
48 handle<shared_buffer> f_shared_buffer; 50 handle<shared_buffer> f_shared_buffer;
49 SmallCache f_small_cache; 51 SmallCache f_small_cache;
50 }; 52 };
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 }; 95 };
94 96
95 union OldUnion { 97 union OldUnion {
96 int8 f_int8; 98 int8 f_int8;
97 }; 99 };
98 100
99 union NewUnion { 101 union NewUnion {
100 int8 f_int8; 102 int8 f_int8;
101 int16 f_int16; 103 int16 f_int16;
102 }; 104 };
OLDNEW
« no previous file with comments | « mojo/public/interfaces/bindings/tests/struct_with_traits.mojom ('k') | mojo/public/tools/bindings/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698