| // Copyright 2021 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. |
| // This file contains FIDL definitions used in GIDL goldens. |
| |
| library test.conformance; |
| |
| type GoldenBoolStruct = struct { |
| v bool; |
| }; |
| |
| type GoldenIntStruct = struct { |
| v int16; |
| }; |
| |
| type GoldenUintStruct = struct { |
| v uint16; |
| }; |
| |
| type GoldenFloatStruct = struct { |
| v float32; |
| }; |
| |
| type GoldenDoubleStruct = struct { |
| v float64; |
| }; |
| |
| type GoldenStringStruct = struct { |
| v string; |
| }; |
| |
| type GoldenNullableStringStruct = struct { |
| v string:optional; |
| }; |
| |
| type GoldenEnum = strict enum : uint16 { |
| A = 1; |
| }; |
| |
| type GoldenEnumStruct = struct { |
| v GoldenEnum; |
| }; |
| |
| type GoldenBits = strict bits : uint16 { |
| A = 1; |
| }; |
| |
| type GoldenBitsStruct = struct { |
| v GoldenBits; |
| }; |
| |
| type GoldenTable = table { |
| 1: v int16; |
| }; |
| |
| type GoldenTableStruct = struct { |
| v GoldenTable; |
| }; |
| |
| type GoldenUnion = strict union { |
| 1: v int16; |
| }; |
| |
| type GoldenUnionStruct = struct { |
| v GoldenUnion; |
| }; |
| |
| type GoldenNullableUnionStruct = struct { |
| v GoldenUnion:optional; |
| }; |
| |
| type GoldenByteArrayStruct = struct { |
| v array<byte, 4>; |
| }; |
| |
| type GoldenStructArrayStruct = struct { |
| v array<GoldenIntStruct, 2>; |
| }; |
| |
| type GoldenByteVectorStruct = struct { |
| v vector<byte>; |
| }; |
| |
| type GoldenNullableByteVectorStruct = struct { |
| v vector<byte>:optional; |
| }; |
| |
| type GoldenStructVectorStruct = struct { |
| v vector<GoldenIntStruct>; |
| }; |
| |
| type GoldenNullableStruct = struct { |
| v box<GoldenBoolStruct>; |
| }; |
| |
| type GoldenHandleBasicRightsStruct = resource struct { |
| v handle:<EVENT, RIGHTS_BASIC>; |
| }; |
| |
| type GoldenNullableHandleStruct = resource struct { |
| v handle:optional; |
| }; |
| |
| type GoldenStringWithMaxSize2 = struct { |
| s string:2; |
| }; |