| // Copyright 2020 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| library test.conformance; |
| |
| type FlexibleEnumInt8 = flexible enum : int8 { |
| FIRST = 0x01; |
| SECOND = 0x11; |
| }; |
| |
| type FlexibleEnumInt16 = flexible enum : int16 { |
| FIRST = 0x0102; |
| SECOND = 0x1112; |
| }; |
| |
| type FlexibleEnumInt32 = flexible enum : int32 { |
| FIRST = 0x01020304; |
| SECOND = 0x11121314; |
| }; |
| |
| type FlexibleEnumInt64 = flexible enum : int64 { |
| FIRST = 0x0102030405060708; |
| SECOND = 0x1112131415161718; |
| }; |
| |
| type FlexibleEnumUint8 = flexible enum : uint8 { |
| FIRST = 1; |
| SECOND = 2; |
| }; |
| |
| type FlexibleEnumUint16 = flexible enum : uint16 { |
| FIRST = 0x0102; |
| SECOND = 0x1112; |
| }; |
| |
| type FlexibleEnumUint32 = flexible enum : uint32 { |
| FIRST = 0x01020304; |
| SECOND = 0x11121314; |
| }; |
| |
| type FlexibleEnumUint64 = flexible enum : uint64 { |
| FIRST = 0x0102030405060708; |
| SECOND = 0x1112131415161718; |
| }; |
| |
| type EmptyEnum = flexible enum {}; |
| |
| type FlexibleEnumInt8Struct = struct { |
| e FlexibleEnumInt8; |
| }; |
| |
| type FlexibleEnumInt16Struct = struct { |
| e FlexibleEnumInt16; |
| }; |
| |
| type FlexibleEnumInt32Struct = struct { |
| e FlexibleEnumInt32; |
| }; |
| |
| type FlexibleEnumInt64Struct = struct { |
| e FlexibleEnumInt64; |
| }; |
| |
| type FlexibleEnumUint8Struct = struct { |
| e FlexibleEnumUint8; |
| }; |
| |
| type FlexibleEnumUint16Struct = struct { |
| e FlexibleEnumUint16; |
| }; |
| |
| type FlexibleEnumUint32Struct = struct { |
| e FlexibleEnumUint32; |
| }; |
| |
| type FlexibleEnumUint64Struct = struct { |
| e FlexibleEnumUint64; |
| }; |
| |
| type EmptyEnumStruct = struct { |
| e EmptyEnum; |
| }; |