OLD | NEW |
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 union PodUnion { | 7 union PodUnion { |
8 int8 f_int8; | 8 int8 f_int8; |
9 int8 f_int8_other; | 9 int8 f_int8_other; |
10 uint8 f_uint8; | 10 uint8 f_uint8; |
11 int16 f_int16; | 11 int16 f_int16; |
12 uint16 f_uint16; | 12 uint16 f_uint16; |
13 int32 f_int32; | 13 int32 f_int32; |
14 uint32 f_uint32; | 14 uint32 f_uint32; |
15 int64 f_int64; | 15 int64 f_int64; |
16 uint64 f_uint64; | 16 uint64 f_uint64; |
17 float f_float; | 17 float f_float; |
18 double f_double; | 18 double f_double; |
19 bool f_bool; | 19 bool f_bool; |
20 }; | 20 }; |
21 | 21 |
22 union ObjectUnion { | 22 union ObjectUnion { |
23 int8 f_int8; | 23 int8 f_int8; |
24 string f_string; | 24 string f_string; |
25 }; | 25 }; |
| 26 |
| 27 struct DummyStruct { |
| 28 int8 f_int8; |
| 29 }; |
| 30 |
| 31 struct SmallStruct { |
| 32 DummyStruct? dummy_struct; |
| 33 PodUnion? pod_union; |
| 34 array<PodUnion>? pod_union_array; |
| 35 array<DummyStruct>? s_array; |
| 36 }; |
| 37 |
| 38 struct SmallStructNonNullableUnion { |
| 39 PodUnion pod_union; |
| 40 }; |
| 41 |
| 42 struct SmallObjStruct { |
| 43 ObjectUnion obj_union; |
| 44 }; |
OLD | NEW |