blob: 2d3f81ab07eee5b5b409feac852650eb5bd7fc41 [file] [log] [blame]
// Copyright 2019 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 fidl.test.dartbindingstest;
type EmptyStruct = struct {};
type TestEmptyStructSandwich = struct {
before string;
es EmptyStruct;
after string;
};
type SimpleTable = table {
1: x int64;
2: reserved;
3: reserved;
4: reserved;
5: y int64;
};
type TestSimpleTable = struct {
table SimpleTable;
};
type TableWithStringAndVector = table {
1: foo string;
2: bar int32;
3: baz vector<uint8>;
};
type TestTableWithStringAndVector = struct {
table TableWithStringAndVector;
};
type SimpleUnion = strict union {
1: i32 int32;
2: i64 int64;
3: s Int64Struct;
4: str string;
};
type Int64Struct = struct {
x int64;
};
type SampleXUnion = flexible union {
1: u uint32;
2: su SimpleUnion;
3: st SimpleTable;
};
type TestInlineXUnionInStruct = struct {
before string;
xu SampleXUnion;
after string;
};
type TestOptionalXUnionInStruct = struct {
before string;
xu SampleXUnion:optional;
after string;
};
type XUnionInTable = table {
1: before string;
2: xu SampleXUnion;
3: after string;
};
type TestXUnionInTable = struct {
value XUnionInTable;
};
type TestString3 = struct {
a array<string:4, 2>;
b array<string:<4, optional>, 2>;
};
type TestStringWithBound = struct {
a string:8;
};