blob: 8150853854fa37a4da5790dfe041c2e2321e4f96 [file] [log] [blame]
// 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 StrictEnumInt8 = strict enum : int8 {
FIRST = 0x01;
SECOND = 0x11;
};
type StrictEnumInt16 = strict enum : int16 {
FIRST = 0x0102;
SECOND = 0x1112;
};
type StrictEnumInt32 = strict enum : int32 {
FIRST = 0x01020304;
SECOND = 0x11121314;
};
type StrictEnumInt64 = strict enum : int64 {
FIRST = 0x0102030405060708;
SECOND = 0x1112131415161718;
};
type StrictEnumUint8 = strict enum : uint8 {
FIRST = 1;
SECOND = 2;
};
type StrictEnumUint16 = strict enum : uint16 {
FIRST = 0x0102;
SECOND = 0x1112;
};
type StrictEnumUint32 = strict enum : uint32 {
FIRST = 0x01020304;
SECOND = 0x11121314;
};
type StrictEnumUint64 = strict enum : uint64 {
FIRST = 0x0102030405060708;
SECOND = 0x1112131415161718;
};
type StrictEnumInt8Struct = struct {
e StrictEnumInt8;
};
type StrictEnumInt16Struct = struct {
e StrictEnumInt16;
};
type StrictEnumInt32Struct = struct {
e StrictEnumInt32;
};
type StrictEnumInt64Struct = struct {
e StrictEnumInt64;
};
type StrictEnumUint8Struct = struct {
e StrictEnumUint8;
};
type StrictEnumUint16Struct = struct {
e StrictEnumUint16;
};
type StrictEnumUint32Struct = struct {
e StrictEnumUint32;
};
type StrictEnumUint64Struct = struct {
e StrictEnumUint64;
};
type VectorOfEnumStruct = struct {
v vector<StrictEnumInt16>;
};