| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 module mojo.test; | |
| 6 | |
| 7 enum AnEnum { | |
| 8 FIRST, SECOND | |
| 9 }; | |
| 10 | |
| 11 union PodUnion { | |
| 12 int8 f_int8; | |
| 13 int8 f_int8_other; | |
| 14 uint8 f_uint8; | |
| 15 int16 f_int16; | |
| 16 uint16 f_uint16; | |
| 17 int32 f_int32; | |
| 18 uint32 f_uint32; | |
| 19 int64 f_int64; | |
| 20 uint64 f_uint64; | |
| 21 float f_float; | |
| 22 double f_double; | |
| 23 bool f_bool; | |
| 24 AnEnum f_enum; | |
| 25 }; | |
| 26 | |
| 27 union ObjectUnion { | |
| 28 int8 f_int8; | |
| 29 string f_string; | |
| 30 DummyStruct f_dummy; | |
| 31 DummyStruct? f_nullable; | |
| 32 array<int8> f_array_int8; | |
| 33 map<string, int8> f_map_int8; | |
| 34 PodUnion f_pod_union; | |
| 35 }; | |
| 36 | |
| 37 union HandleUnion { | |
| 38 handle f_handle; | |
| 39 handle<message_pipe> f_message_pipe; | |
| 40 handle<data_pipe_consumer> f_data_pipe_consumer; | |
| 41 handle<data_pipe_producer> f_data_pipe_producer; | |
| 42 handle<shared_buffer> f_shared_buffer; | |
| 43 SmallCache f_small_cache; | |
| 44 }; | |
| 45 | |
| 46 struct WrapperStruct { | |
| 47 ObjectUnion? object_union; | |
| 48 PodUnion? pod_union; | |
| 49 HandleUnion? handle_union; | |
| 50 }; | |
| 51 | |
| 52 struct DummyStruct { | |
| 53 int8 f_int8; | |
| 54 }; | |
| 55 | |
| 56 struct SmallStruct { | |
| 57 DummyStruct? dummy_struct; | |
| 58 PodUnion? pod_union; | |
| 59 array<PodUnion>? pod_union_array; | |
| 60 array<PodUnion?>? nullable_pod_union_array; | |
| 61 array<DummyStruct>? s_array; | |
| 62 map<string, PodUnion>? pod_union_map; | |
| 63 map<string, PodUnion?>? nullable_pod_union_map; | |
| 64 }; | |
| 65 | |
| 66 struct SmallStructNonNullableUnion { | |
| 67 PodUnion pod_union; | |
| 68 }; | |
| 69 | |
| 70 struct SmallObjStruct { | |
| 71 ObjectUnion obj_union; | |
| 72 int8 f_int8; | |
| 73 }; | |
| 74 | |
| 75 interface SmallCache { | |
| 76 SetIntValue(int64 int_value); | |
| 77 GetIntValue() => (int64 int_value); | |
| 78 }; | |
| 79 | |
| 80 interface UnionInterface { | |
| 81 Echo(PodUnion in_val) => (PodUnion out_val); | |
| 82 }; | |
| 83 | |
| 84 struct TryNonNullStruct { | |
| 85 DummyStruct? nullable; | |
| 86 DummyStruct non_nullable; | |
| 87 }; | |
| 88 | |
| 89 union OldUnion { | |
| 90 int8 f_int8; | |
| 91 }; | |
| 92 | |
| 93 union NewUnion { | |
| 94 int8 f_int8; | |
| 95 int16 f_int16; | |
| 96 }; | |
| OLD | NEW |