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 enum AnEnum { | 7 enum AnEnum { |
8 FIRST, SECOND | 8 FIRST, SECOND |
9 }; | 9 }; |
10 | 10 |
| 11 [Extensible=True] |
| 12 enum AnExtensibleEnum { |
| 13 FIRST, SECOND, THIRD |
| 14 }; |
| 15 |
11 union PodUnion { | 16 union PodUnion { |
12 int8 f_int8; | 17 int8 f_int8; |
13 int8 f_int8_other; | 18 int8 f_int8_other; |
14 uint8 f_uint8; | 19 uint8 f_uint8; |
15 int16 f_int16; | 20 int16 f_int16; |
16 uint16 f_uint16; | 21 uint16 f_uint16; |
17 int32 f_int32; | 22 int32 f_int32; |
18 uint32 f_uint32; | 23 uint32 f_uint32; |
19 int64 f_int64; | 24 int64 f_int64; |
20 uint64 f_uint64; | 25 uint64 f_uint64; |
21 float f_float; | 26 float f_float; |
22 double f_double; | 27 double f_double; |
23 bool f_bool; | 28 bool f_bool; |
24 AnEnum f_enum; | 29 AnEnum f_enum; |
| 30 AnExtensibleEnum f_extensible_enum; |
25 }; | 31 }; |
26 | 32 |
27 union ObjectUnion { | 33 union ObjectUnion { |
28 int8 f_int8; | 34 int8 f_int8; |
29 string f_string; | 35 string f_string; |
30 DummyStruct f_dummy; | 36 DummyStruct f_dummy; |
31 DummyStruct? f_nullable; | 37 DummyStruct? f_nullable; |
32 array<int8> f_array_int8; | 38 array<int8> f_array_int8; |
33 map<string, int8> f_map_int8; | 39 map<string, int8> f_map_int8; |
34 PodUnion f_pod_union; | 40 PodUnion f_pod_union; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 }; | 93 }; |
88 | 94 |
89 union OldUnion { | 95 union OldUnion { |
90 int8 f_int8; | 96 int8 f_int8; |
91 }; | 97 }; |
92 | 98 |
93 union NewUnion { | 99 union NewUnion { |
94 int8 f_int8; | 100 int8 f_int8; |
95 int16 f_int16; | 101 int16 f_int16; |
96 }; | 102 }; |
OLD | NEW |