blob: 158ea5f379e90b11cb4ec1021284e46bfceca371 [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.
//
// Code generated by tools/fidl/gidl-conformance-suite/regen.sh; DO NOT EDIT.
import 'dart:typed_data';
import 'package:test/test.dart';
import 'package:fidl/fidl.dart' as fidl;
import 'conformance_test_types.dart';
import 'gidl.dart';
void main() {
group('conformance', () {
group('encode success cases', () {
EncodeSuccessCase.run(
Encoders.old,
'3ByteObjectAlignmentInStruct_old',
ThreeByteInStruct(
elem1: ThreeByte(elem1: 0x1, elem2: 0x2, elem3: 0x3),
elem2: ThreeByte(elem1: 0x4, elem2: 0x5, elem3: 0x6),
elem3: ThreeByte(elem1: 0x7, elem2: 0x8, elem3: 0x9)),
kThreeByteInStruct_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, //
0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'5ByteObjectAlignmentInStruct_old',
FiveByteInStruct(
elem1: FiveByte(elem1: 0x1020304, elem2: 0x5),
elem2: FiveByte(elem1: 0x6070809, elem2: 0xa),
elem3: FiveByte(elem1: 0xb0c0d0e, elem2: 0xf)),
kFiveByteInStruct_Type,
Uint8List.fromList([
0x04, 0x03, 0x02, 0x01, 0x05, 0x00, 0x00, 0x00, //
0x09, 0x08, 0x07, 0x06, 0x0a, 0x00, 0x00, 0x00, //
0x0e, 0x0d, 0x0c, 0x0b, 0x0f, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'3ByteObjectAlignmentInVector_old',
ThreeByteInVector(elems: [
ThreeByte(elem1: 0x1, elem2: 0x2, elem3: 0x3),
ThreeByte(elem1: 0x4, elem2: 0x5, elem3: 0x6),
ThreeByte(elem1: 0x7, elem2: 0x8, elem3: 0x9)
]),
kThreeByteInVector_Type,
Uint8List.fromList([
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, //
0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'5ByteObjectAlignmentInVector_old',
FiveByteInVector(elems: [
FiveByte(elem1: 0x1020304, elem2: 0x5),
FiveByte(elem1: 0x6070809, elem2: 0xa),
FiveByte(elem1: 0xb0c0d0e, elem2: 0xf)
]),
kFiveByteInVector_Type,
Uint8List.fromList([
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x04, 0x03, 0x02, 0x01, 0x05, 0x00, 0x00, 0x00, //
0x09, 0x08, 0x07, 0x06, 0x0a, 0x00, 0x00, 0x00, //
0x0e, 0x0d, 0x0c, 0x0b, 0x0f, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'3ByteObjectAlignmentInArray_old',
ThreeByteInArray(elems: [
ThreeByte(elem1: 0x1, elem2: 0x2, elem3: 0x3),
ThreeByte(elem1: 0x4, elem2: 0x5, elem3: 0x6),
ThreeByte(elem1: 0x7, elem2: 0x8, elem3: 0x9)
]),
kThreeByteInArray_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, //
0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'5ByteObjectAlignmentInArray_old',
FiveByteInArray(elems: [
FiveByte(elem1: 0x1020304, elem2: 0x5),
FiveByte(elem1: 0x6070809, elem2: 0xa),
FiveByte(elem1: 0xb0c0d0e, elem2: 0xf)
]),
kFiveByteInArray_Type,
Uint8List.fromList([
0x04, 0x03, 0x02, 0x01, 0x05, 0x00, 0x00, 0x00, //
0x09, 0x08, 0x07, 0x06, 0x0a, 0x00, 0x00, 0x00, //
0x0e, 0x0d, 0x0c, 0x0b, 0x0f, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'EmptyStruct_old',
EmptyStruct(),
kEmptyStruct_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'EmptyStructSandwich_old',
EmptyStructSandwich(
before: 'before', es: EmptyStruct(), after: 'after'),
kEmptyStructSandwich_Type,
Uint8List.fromList([
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x00, 0x00, //
0x61, 0x66, 0x74, 0x65, 0x72, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Uint8Uint16Uint32Uint64_old',
Uint8Uint16Uint32Uint64(
f1: 0x1, f2: 0x203, f3: 0x4050607, f4: 0x8090a0b0c0d0e0f),
kUint8Uint16Uint32Uint64_Type,
Uint8List.fromList([
0x01, 0x00, 0x03, 0x02, 0x07, 0x06, 0x05, 0x04, //
0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Uint64Uint32Uint16Uint8_old',
Uint64Uint32Uint16Uint8(
f1: 0x8090a0b0c0d0e0f, f2: 0x4050607, f3: 0x203, f4: 0x1),
kUint64Uint32Uint16Uint8_Type,
Uint8List.fromList([
0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, //
0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'SimpleTableEmpty_old',
StructOfSimpleTable(table: SimpleTable()),
kStructOfSimpleTable_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
]));
EncodeSuccessCase.run(
Encoders.old,
'SimpleTableXAndY_old',
StructOfSimpleTable(table: SimpleTable(x: 0x2a, y: 0x43)),
kStructOfSimpleTable_Type,
Uint8List.fromList([
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'SimpleTableJustY_old',
StructOfSimpleTable(table: SimpleTable(y: 0x43)),
kStructOfSimpleTable_Type,
Uint8List.fromList([
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'TableWithStringAndVectorNoVectorContent_old',
StructOfTableWithStringAndVector(
table: TableWithStringAndVector(foo: 'hello', bar: 0x1b)),
kStructOfTableWithStringAndVector_Type,
Uint8List.fromList([
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x00, 0x00, 0x00, //
0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'SimpleTableThenUint64_old',
SimpleTableThenUint64(
table: SimpleTable(x: 0x2a, y: 0x43), number: 0xdeadbeefdeadbeef),
kSimpleTableThenUint64_Type,
Uint8List.fromList([
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xef, 0xbe, 0xad, 0xde, 0xef, 0xbe, 0xad, 0xde, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'ReverseOrdinalTable_old',
StructOfReverseOrdinalTable(
table: ReverseOrdinalTable(x: 0xaa, y: 0xbb, z: 0xcc)),
kStructOfReverseOrdinalTable_Type,
Uint8List.fromList([
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xbb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'InlineXUnionInStruct_old',
TestInlineXUnionInStruct(
before: 'before',
xu: SampleXUnion.withU(0xdeadbeef),
after: 'after'),
kTestInlineXUnionInStruct_Type,
Uint8List.fromList([
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xb2, 0x56, 0x9c, 0x38, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x00, 0x00, //
0xef, 0xbe, 0xad, 0xde, 0x00, 0x00, 0x00, 0x00, //
0x61, 0x66, 0x74, 0x65, 0x72, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'OptionalXUnionInStructAbsent_old',
TestOptionalXUnionInStruct(before: 'before', after: 'after'),
kTestOptionalXUnionInStruct_Type,
Uint8List.fromList([
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x00, 0x00, //
0x61, 0x66, 0x74, 0x65, 0x72, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'OptionalXUnionInStructPresent_old',
TestOptionalXUnionInStruct(
before: 'before',
xu: SampleXUnion.withU(0xdeadbeef),
after: 'after'),
kTestOptionalXUnionInStruct_Type,
Uint8List.fromList([
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xb2, 0x56, 0x9c, 0x38, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x00, 0x00, //
0xef, 0xbe, 0xad, 0xde, 0x00, 0x00, 0x00, 0x00, //
0x61, 0x66, 0x74, 0x65, 0x72, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'XUnionInTableXUnionAbsent_old',
TestXUnionInTable(
value: XUnionInTable(before: 'before', after: 'after')),
kTestXUnionInTable_Type,
Uint8List.fromList([
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x61, 0x66, 0x74, 0x65, 0x72, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'XUnionInTableXUnionPresent_old',
TestXUnionInTable(
value: XUnionInTable(
before: 'before',
xu: SampleXUnion.withU(0xdeadbeef),
after: 'after')),
kTestXUnionInTable_Type,
Uint8List.fromList([
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x00, 0x00, //
0xb2, 0x56, 0x9c, 0x38, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xef, 0xbe, 0xad, 0xde, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x61, 0x66, 0x74, 0x65, 0x72, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'StrictXUnion_old',
TestStrictXUnionInStruct(xu: SampleStrictXUnion.withU(0xdeadbeef)),
kTestStrictXUnionInStruct_Type,
Uint8List.fromList([
0x72, 0xea, 0xe2, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xef, 0xbe, 0xad, 0xde, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'AddEthernetDeviceRequest_old',
TestAddEthernetDeviceRequest(
topologicalPath: '@/dev/sys/pci/00:03.0/e1000/ethernet',
config: InterfaceConfig(
name: 'ethp0003',
ipAddressConfig: IpAddressConfig.withDhcp(true)),
thisShouldBeAHandle: 0xffffffff),
kTestAddEthernetDeviceRequest_Type,
Uint8List.fromList([
0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, //
0x40, 0x2f, 0x64, 0x65, 0x76, 0x2f, 0x73, 0x79, //
0x73, 0x2f, 0x70, 0x63, 0x69, 0x2f, 0x30, 0x30, //
0x3a, 0x30, 0x33, 0x2e, 0x30, 0x2f, 0x65, 0x31, //
0x30, 0x30, 0x30, 0x2f, 0x65, 0x74, 0x68, 0x65, //
0x72, 0x6e, 0x65, 0x74, 0x00, 0x00, 0x00, 0x00, //
0x65, 0x74, 0x68, 0x70, 0x30, 0x30, 0x30, 0x33, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'AddEthernetDeviceRequest_v1',
TestAddEthernetDeviceRequest(
topologicalPath: '@/dev/sys/pci/00:03.0/e1000/ethernet',
config: InterfaceConfig(
name: 'ethp0003',
ipAddressConfig: IpAddressConfig.withDhcp(true)),
thisShouldBeAHandle: 0xffffffff),
kTestAddEthernetDeviceRequest_Type,
Uint8List.fromList([
0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, //
0x40, 0x2f, 0x64, 0x65, 0x76, 0x2f, 0x73, 0x79, //
0x73, 0x2f, 0x70, 0x63, 0x69, 0x2f, 0x30, 0x30, //
0x3a, 0x30, 0x33, 0x2e, 0x30, 0x2f, 0x65, 0x31, //
0x30, 0x30, 0x30, 0x2f, 0x65, 0x74, 0x68, 0x65, //
0x72, 0x6e, 0x65, 0x74, 0x00, 0x00, 0x00, 0x00, //
0x65, 0x74, 0x68, 0x70, 0x30, 0x30, 0x30, 0x33, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'FileGetAttrResponse_old',
FileGetAttrResponse(
s: 0x7eadbeaf,
attributes: NodeAttributes(
mode: 0x962381a4,
id: 0x1,
contentSize: 0xe7,
storageSize: 0xe7,
linkCount: 0x1,
creationTime: 0x8877665544332211,
modificationTime: 0xffeeddccbbaa99)),
kFileGetAttrResponse_Type,
Uint8List.fromList([
0xaf, 0xbe, 0xad, 0x7e, 0x00, 0x00, 0x00, 0x00, //
0xa4, 0x81, 0x23, 0x96, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, //
0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Optionals_old',
StructWithOptionals(
s: EmptyStruct(),
s2: EmptyStruct(),
t: TableWithEmptyStruct(s: EmptyStruct()),
xu: XUnionWithEmptyStruct.withS(EmptyStruct()),
xu2: XUnionWithEmptyStruct.withS(EmptyStruct()),
u: UnionWithEmptyStruct.withS(EmptyStruct()),
u2: UnionWithEmptyStruct.withS(EmptyStruct())),
kStructWithOptionals_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xfe, 0xe0, 0x99, 0x74, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xfe, 0xe0, 0x99, 0x74, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Optionals_v1',
StructWithOptionals(
s: EmptyStruct(),
s2: EmptyStruct(),
t: TableWithEmptyStruct(s: EmptyStruct()),
xu: XUnionWithEmptyStruct.withS(EmptyStruct()),
xu2: XUnionWithEmptyStruct.withS(EmptyStruct()),
u: UnionWithEmptyStruct.withS(EmptyStruct()),
u2: UnionWithEmptyStruct.withS(EmptyStruct())),
kStructWithOptionals_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xfe, 0xe0, 0x99, 0x74, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xfe, 0xe0, 0x99, 0x74, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Arrays_old',
StructWithArrays(arrInt: Int32List.fromList([0x1, 0x2]), arrString: [
'a',
'b'
], arrNullableString: [
'c',
null
], arrStruct: [
StructWithInt(x: 0x1),
StructWithInt(x: 0x2)
], arrNullableStruct: [
null,
StructWithInt(x: 0x1020304)
], arrArrInt: [
Int32List.fromList([0x1, 0x2, 0x3]),
Int32List.fromList([0x4, 0x5, 0x6])
]),
kStructWithArrays_Type,
Uint8List.fromList([
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, //
0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Vectors_old',
StructWithVectors(
vecEmpty: Int32List.fromList([]),
vecInt: Int32List.fromList([0x1, 0x2]),
vecString: [
'a',
'b'
],
vecNullableString: [
null,
'c',
null
],
vecStruct: [
StructWithInt(x: 0x1)
],
vecNullableStruct: [
null,
null,
StructWithInt(x: 0x2)
],
vecVecInt: [
Int32List.fromList([0x1, 0x2]),
Int32List.fromList([0x3])
]),
kStructWithVectors_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'BoolTrue_old',
MyBool(value: true),
kMyBool_Type,
Uint8List.fromList([
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'BoolFalse_old',
MyBool(value: false),
kMyBool_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'ByteZero_old',
MyByte(value: 0x0),
kMyByte_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Byte255_old',
MyByte(value: 0xff),
kMyByte_Type,
Uint8List.fromList([
0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Int8Min_old',
MyInt8(value: -128),
kMyInt8_Type,
Uint8List.fromList([
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Int8Zero_old',
MyInt8(value: 0x0),
kMyInt8_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Int8Max_old',
MyInt8(value: 0x7f),
kMyInt8_Type,
Uint8List.fromList([
0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Int16Min_old',
MyInt16(value: -32768),
kMyInt16_Type,
Uint8List.fromList([
0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Int16Zero_old',
MyInt16(value: 0x0),
kMyInt16_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Int16Max_old',
MyInt16(value: 0x7fff),
kMyInt16_Type,
Uint8List.fromList([
0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Int32Min_old',
MyInt32(value: -2147483648),
kMyInt32_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Int32Zero_old',
MyInt32(value: 0x0),
kMyInt32_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Int32Max_old',
MyInt32(value: 0x7fffffff),
kMyInt32_Type,
Uint8List.fromList([
0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Int64Min_old',
MyInt64(value: -9223372036854775808),
kMyInt64_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Int64Zero_old',
MyInt64(value: 0x0),
kMyInt64_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Int64Max_old',
MyInt64(value: 0x7fffffffffffffff),
kMyInt64_Type,
Uint8List.fromList([
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Uint8Zero_old',
MyUint8(value: 0x0),
kMyUint8_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Uint8Max_old',
MyUint8(value: 0xff),
kMyUint8_Type,
Uint8List.fromList([
0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Uint16Zero_old',
MyUint16(value: 0x0),
kMyUint16_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Uint16Max_old',
MyUint16(value: 0xffff),
kMyUint16_Type,
Uint8List.fromList([
0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Uint32Zero_old',
MyUint32(value: 0x0),
kMyUint32_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Uint32Max_old',
MyUint32(value: 0xffffffff),
kMyUint32_Type,
Uint8List.fromList([
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Uint64Zero_old',
MyUint64(value: 0x0),
kMyUint64_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Uint64Max_old',
MyUint64(value: 0xffffffffffffffff),
kMyUint64_Type,
Uint8List.fromList([
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Float32Zero_old',
MyFloat32(value: 0),
kMyFloat32_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Float32One_old',
MyFloat32(value: 1),
kMyFloat32_Type,
Uint8List.fromList([
0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Float32MinusOne_old',
MyFloat32(value: -1),
kMyFloat32_Type,
Uint8List.fromList([
0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Float32Max_old',
MyFloat32(value: 3.4028234663852886e+38),
kMyFloat32_Type,
Uint8List.fromList([
0xff, 0xff, 0x7f, 0x7f, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Float64Zero_old',
MyFloat64(value: 0),
kMyFloat64_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Float64One_old',
MyFloat64(value: 1),
kMyFloat64_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Float64MinusOne_old',
MyFloat64(value: -1),
kMyFloat64_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xbf, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Float64Max_old',
MyFloat64(value: 1.7976931348623157e+308),
kMyFloat64_Type,
Uint8List.fromList([
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0x7f, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Sandwich1Case1_old',
Sandwich1(
before: 0x4030201,
theUnion: UnionSize8Align4.withVariant(0xc0b0a09),
after: 0x8070605),
kSandwich1_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x02, 0x00, 0x00, 0x00, //
0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x07, 0x08, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Sandwich1Case1_v1',
Sandwich1(
before: 0x4030201,
theUnion: UnionSize8Align4.withVariant(0xc0b0a09),
after: 0x8070605),
kSandwich1_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x09, 0x0a, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Sandwich1WithOptUnionPresent_old',
Sandwich1WithOptUnion(
before: 0x4030201,
optUnion: UnionSize8Align4.withVariant(0xc0b0a09),
after: 0x8070605),
kSandwich1WithOptUnion_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, 0x09, 0x0a, 0x0b, 0x0c, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Sandwich1WithOptUnionPresent_v1',
Sandwich1WithOptUnion(
before: 0x4030201,
optUnion: UnionSize8Align4.withVariant(0xc0b0a09),
after: 0x8070605),
kSandwich1WithOptUnion_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x09, 0x0a, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Sandwich1WithOptUnionAbsent_old',
Sandwich1WithOptUnion(before: 0x4030201, after: 0x8070605),
kSandwich1WithOptUnion_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Sandwich1WithOptUnionAbsent_v1',
Sandwich1WithOptUnion(before: 0x4030201, after: 0x8070605),
kSandwich1WithOptUnion_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Sandwich2Case1_old',
Sandwich2(
before: 0x4030201,
theUnion: UnionSize12Align4.withVariant(
Uint8List.fromList([0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5])),
after: 0x8070605),
kSandwich2_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x03, 0x00, 0x00, 0x00, //
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0x00, 0x00, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Sandwich2Case1_v1',
Sandwich2(
before: 0x4030201,
theUnion: UnionSize12Align4.withVariant(
Uint8List.fromList([0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5])),
after: 0x8070605),
kSandwich2_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Sandwich3Case1_old',
Sandwich3(
before: 0x4030201,
theUnion: UnionSize24Align8.withVariant(StructSize16Align8(
f1: 0xa7a6a5a4a3a2a1a0, f2: 0xafaeadacabaaa9a8)),
after: 0x8070605),
kSandwich3_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, //
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Sandwich3Case1_v1',
Sandwich3(
before: 0x4030201,
theUnion: UnionSize24Align8.withVariant(StructSize16Align8(
f1: 0xa7a6a5a4a3a2a1a0, f2: 0xafaeadacabaaa9a8)),
after: 0x8070605),
kSandwich3_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, //
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Sandwich4Case1_old',
Sandwich4(
before: 0x4030201,
theUnion: UnionSize36Align4.withVariant(Uint8List.fromList([
0xa0,
0xa1,
0xa2,
0xa3,
0xa4,
0xa5,
0xa6,
0xa7,
0xa8,
0xa9,
0xaa,
0xab,
0xac,
0xad,
0xae,
0xaf,
0xb0,
0xb1,
0xb2,
0xb3,
0xb4,
0xb5,
0xb6,
0xb7,
0xb8,
0xb9,
0xba,
0xbb,
0xbc,
0xbd,
0xbe,
0xbf
])),
after: 0x8070605),
kSandwich4_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x03, 0x00, 0x00, 0x00, //
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, //
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, //
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, //
0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Sandwich4Case1_v1',
Sandwich4(
before: 0x4030201,
theUnion: UnionSize36Align4.withVariant(Uint8List.fromList([
0xa0,
0xa1,
0xa2,
0xa3,
0xa4,
0xa5,
0xa6,
0xa7,
0xa8,
0xa9,
0xaa,
0xab,
0xac,
0xad,
0xae,
0xaf,
0xb0,
0xb1,
0xb2,
0xb3,
0xb4,
0xb5,
0xb6,
0xb7,
0xb8,
0xb9,
0xba,
0xbb,
0xbc,
0xbd,
0xbe,
0xbf
])),
after: 0x8070605),
kSandwich4_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, //
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, //
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, //
0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Sandwich5Case1_old',
Sandwich5(
before: 0x4030201,
unionOfUnion: UnionOfUnion.withSize8align4(
UnionSize8Align4.withVariant(0xc0b0a09)),
after: 0x8070605),
kSandwich5_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, 0x09, 0x0a, 0x0b, 0x0c, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Sandwich5Case1_v1',
Sandwich5(
before: 0x4030201,
unionOfUnion: UnionOfUnion.withSize8align4(
UnionSize8Align4.withVariant(0xc0b0a09)),
after: 0x8070605),
kSandwich5_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x09, 0x0a, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Sandwich5Case2_old',
Sandwich5(
before: 0x4030201,
unionOfUnion: UnionOfUnion.withSize24align8(
UnionSize24Align8.withVariant(StructSize16Align8(
f1: 0xa7a6a5a4a3a2a1a0, f2: 0xafaeadacabaaa9a8))),
after: 0x8070605),
kSandwich5_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, //
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Sandwich5Case2_v1',
Sandwich5(
before: 0x4030201,
unionOfUnion: UnionOfUnion.withSize24align8(
UnionSize24Align8.withVariant(StructSize16Align8(
f1: 0xa7a6a5a4a3a2a1a0, f2: 0xafaeadacabaaa9a8))),
after: 0x8070605),
kSandwich5_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, //
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Sandwich6Case1_old',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withVectorOfUint8(
Uint8List.fromList([0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5])),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Sandwich6Case1_v1',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withVectorOfUint8(
Uint8List.fromList([0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5])),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Sandwich6Case1AbsentVector_old',
Sandwich6(
before: 0x4030201,
theUnion:
UnionWithVector.withVectorOfUint8(Uint8List.fromList([])),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Sandwich6Case1AbsentVector_v1',
Sandwich6(
before: 0x4030201,
theUnion:
UnionWithVector.withVectorOfUint8(Uint8List.fromList([])),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Sandwich6Case2_old',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withS('soft migrations rock!'),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x73, 0x6f, 0x66, 0x74, 0x20, 0x6d, 0x69, 0x67, //
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, //
0x72, 0x6f, 0x63, 0x6b, 0x21, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Sandwich6Case2_v1',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withS('soft migrations rock!'),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x73, 0x6f, 0x66, 0x74, 0x20, 0x6d, 0x69, 0x67, //
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, //
0x72, 0x6f, 0x63, 0x6b, 0x21, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Sandwich6Case3_old',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withVectorS3A1([
StructSize3Align1(
threeBytes: Uint8List.fromList([0x73, 0x6f, 0x66])),
StructSize3Align1(
threeBytes: Uint8List.fromList([0x20, 0x6d, 0x69])),
StructSize3Align1(
threeBytes: Uint8List.fromList([0x72, 0x61, 0x74]))
]),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x73, 0x6f, 0x66, 0x20, 0x6d, 0x69, 0x72, 0x61, //
0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Sandwich6Case3_v1',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withVectorS3A1([
StructSize3Align1(
threeBytes: Uint8List.fromList([0x73, 0x6f, 0x66])),
StructSize3Align1(
threeBytes: Uint8List.fromList([0x20, 0x6d, 0x69])),
StructSize3Align1(
threeBytes: Uint8List.fromList([0x72, 0x61, 0x74]))
]),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x73, 0x6f, 0x66, 0x20, 0x6d, 0x69, 0x72, 0x61, //
0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Sandwich6Case4_old',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withVectorS3A2([
StructSize3Align2(f1: 0x6f73, f2: 0x66),
StructSize3Align2(f1: 0x6d20, f2: 0x69),
StructSize3Align2(f1: 0x6172, f2: 0x74)
]),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x73, 0x6f, 0x66, 0x00, 0x20, 0x6d, 0x69, 0x00, //
0x72, 0x61, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Sandwich6Case4_v1',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withVectorS3A2([
StructSize3Align2(f1: 0x6f73, f2: 0x66),
StructSize3Align2(f1: 0x6d20, f2: 0x69),
StructSize3Align2(f1: 0x6172, f2: 0x74)
]),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x73, 0x6f, 0x66, 0x00, 0x20, 0x6d, 0x69, 0x00, //
0x72, 0x61, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Sandwich6Case5_old',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withHandles(
Uint32List.fromList([0xffffffff, 0xffffffff, 0xffffffff])),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Sandwich6Case5_v1',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withHandles(
Uint32List.fromList([0xffffffff, 0xffffffff, 0xffffffff])),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Sandwich6Case6_old',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withArrayS3A1([
StructSize3Align1(
threeBytes: Uint8List.fromList([0xa1, 0xa2, 0xa3])),
StructSize3Align1(
threeBytes: Uint8List.fromList([0xa4, 0xa5, 0xa6]))
]),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Sandwich6Case6_v1',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withArrayS3A1([
StructSize3Align1(
threeBytes: Uint8List.fromList([0xa1, 0xa2, 0xa3])),
StructSize3Align1(
threeBytes: Uint8List.fromList([0xa4, 0xa5, 0xa6]))
]),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Sandwich6Case7_old',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withArrayS3A2([
StructSize3Align2(f1: 0xa2a1, f2: 0xa3),
StructSize3Align2(f1: 0xa5a4, f2: 0xa6)
]),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xa1, 0xa2, 0xa3, 0x00, 0xa4, 0xa5, 0xa6, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Sandwich6Case7_v1',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withArrayS3A2([
StructSize3Align2(f1: 0xa2a1, f2: 0xa3),
StructSize3Align2(f1: 0xa5a4, f2: 0xa6)
]),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0xa1, 0xa2, 0xa3, 0x00, 0xa4, 0xa5, 0xa6, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Sandwich6Case8_old',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withVectorUnion(
[UnionSize8Align4.withVariant(0xc0b0a09)]),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, 0x09, 0x0a, 0x0b, 0x0c, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Sandwich6Case8_v1',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withVectorUnion(
[UnionSize8Align4.withVariant(0xc0b0a09)]),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x09, 0x0a, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Sandwich7Case1_old',
Sandwich7(
before: 0x14131211,
optSandwich1: Sandwich1(
before: 0x4030201,
theUnion: UnionSize8Align4.withVariant(0xc0b0a09),
after: 0x8070605),
after: 0x24232221),
kSandwich7_Type,
Uint8List.fromList([
0x11, 0x12, 0x13, 0x14, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x21, 0x22, 0x23, 0x24, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x02, 0x03, 0x04, 0x02, 0x00, 0x00, 0x00, //
0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x07, 0x08, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Sandwich7Case1_v1',
Sandwich7(
before: 0x14131211,
optSandwich1: Sandwich1(
before: 0x4030201,
theUnion: UnionSize8Align4.withVariant(0xc0b0a09),
after: 0x8070605),
after: 0x24232221),
kSandwich7_Type,
Uint8List.fromList([
0x11, 0x12, 0x13, 0x14, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x21, 0x22, 0x23, 0x24, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x09, 0x0a, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Sandwich7Case2_old',
Sandwich7(before: 0x14131211, after: 0x24232221),
kSandwich7_Type,
Uint8List.fromList([
0x11, 0x12, 0x13, 0x14, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x21, 0x22, 0x23, 0x24, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Sandwich7Case2_v1',
Sandwich7(before: 0x14131211, after: 0x24232221),
kSandwich7_Type,
Uint8List.fromList([
0x11, 0x12, 0x13, 0x14, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x21, 0x22, 0x23, 0x24, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Regression1_old',
Regression1(f1: 0x1, f2: 0x2, f3: 0x3, f4: 0x4, f5: 0x5, f6: 0x6),
kRegression1_Type,
Uint8List.fromList([
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Regression1_v1',
Regression1(f1: 0x1, f2: 0x2, f3: 0x3, f4: 0x4, f5: 0x5, f6: 0x6),
kRegression1_Type,
Uint8List.fromList([
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Regression2_old',
Regression2(
head: Regression1(
f1: 0x1, f2: 0x2, f3: 0x3, f4: 0x4, f5: 0x5, f6: 0x6),
f7: 0x7),
kRegression2_Type,
Uint8List.fromList([
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Regression2_v1',
Regression2(
head: Regression1(
f1: 0x1, f2: 0x2, f3: 0x3, f4: 0x4, f5: 0x5, f6: 0x6),
f7: 0x7),
kRegression2_Type,
Uint8List.fromList([
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Regression3Absent_old',
Regression3(),
kRegression3_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Regression3Absent_v1',
Regression3(),
kRegression3_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Regression3Present_old',
Regression3(
optValue: Regression2(
head: Regression1(
f1: 0x1, f2: 0x2, f3: 0x3, f4: 0x4, f5: 0x5, f6: 0x6),
f7: 0x7)),
kRegression3_Type,
Uint8List.fromList([
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Regression3Present_v1',
Regression3(
optValue: Regression2(
head: Regression1(
f1: 0x1, f2: 0x2, f3: 0x3, f4: 0x4, f5: 0x5, f6: 0x6),
f7: 0x7)),
kRegression3_Type,
Uint8List.fromList([
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Size5Alignment1Array_old',
Size5Alignment1Array(a: [
Size5Alignment1(
data: Uint8List.fromList([0x1, 0x2, 0x3, 0x4, 0x5])),
Size5Alignment1(
data: Uint8List.fromList([0x6, 0x7, 0x8, 0x9, 0xa])),
Size5Alignment1(data: Uint8List.fromList([0xb, 0xc, 0xd, 0xe, 0xf]))
]),
kSize5Alignment1Array_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, //
0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Size5Alignment1Array_v1',
Size5Alignment1Array(a: [
Size5Alignment1(
data: Uint8List.fromList([0x1, 0x2, 0x3, 0x4, 0x5])),
Size5Alignment1(
data: Uint8List.fromList([0x6, 0x7, 0x8, 0x9, 0xa])),
Size5Alignment1(data: Uint8List.fromList([0xb, 0xc, 0xd, 0xe, 0xf]))
]),
kSize5Alignment1Array_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, //
0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Size5Alignment4Array_old',
Size5Alignment4Array(a: [
Size5Alignment4(four: 0x4030201, one: 0x5),
Size5Alignment4(four: 0x9080706, one: 0xa),
Size5Alignment4(four: 0xe0d0c0b, one: 0xf)
]),
kSize5Alignment4Array_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x05, 0x00, 0x00, 0x00, //
0x06, 0x07, 0x08, 0x09, 0x0a, 0x00, 0x00, 0x00, //
0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Size5Alignment4Array_v1',
Size5Alignment4Array(a: [
Size5Alignment4(four: 0x4030201, one: 0x5),
Size5Alignment4(four: 0x9080706, one: 0xa),
Size5Alignment4(four: 0xe0d0c0b, one: 0xf)
]),
kSize5Alignment4Array_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x05, 0x00, 0x00, 0x00, //
0x06, 0x07, 0x08, 0x09, 0x0a, 0x00, 0x00, 0x00, //
0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Size5Alignment1Vector_old',
Size5Alignment1Vector(v: [
Size5Alignment1(
data: Uint8List.fromList([0x1, 0x2, 0x3, 0x4, 0x5])),
Size5Alignment1(data: Uint8List.fromList([0x6, 0x7, 0x8, 0x9, 0xa]))
]),
kSize5Alignment1Vector_Type,
Uint8List.fromList([
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, //
0x09, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Size5Alignment1Vector_v1',
Size5Alignment1Vector(v: [
Size5Alignment1(
data: Uint8List.fromList([0x1, 0x2, 0x3, 0x4, 0x5])),
Size5Alignment1(data: Uint8List.fromList([0x6, 0x7, 0x8, 0x9, 0xa]))
]),
kSize5Alignment1Vector_Type,
Uint8List.fromList([
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, //
0x09, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Size5Alignment4Vector_old',
Size5Alignment4Vector(v: [
Size5Alignment4(four: 0x4030201, one: 0x5),
Size5Alignment4(four: 0x9080706, one: 0xa)
]),
kSize5Alignment4Vector_Type,
Uint8List.fromList([
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x02, 0x03, 0x04, 0x05, 0x00, 0x00, 0x00, //
0x06, 0x07, 0x08, 0x09, 0x0a, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Size5Alignment4Vector_v1',
Size5Alignment4Vector(v: [
Size5Alignment4(four: 0x4030201, one: 0x5),
Size5Alignment4(four: 0x9080706, one: 0xa)
]),
kSize5Alignment4Vector_Type,
Uint8List.fromList([
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x02, 0x03, 0x04, 0x05, 0x00, 0x00, 0x00, //
0x06, 0x07, 0x08, 0x09, 0x0a, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Table_StructWithReservedSandwich_old',
TableStructWithReservedSandwichStruct(
table: TableStructWithReservedSandwich(
s1: StructSize3Align1(
threeBytes: Uint8List.fromList([0x9, 0xa, 0xb])),
s2: StructSize3Align1(
threeBytes: Uint8List.fromList([0x19, 0x1a, 0x1b])))),
kTable_StructWithReservedSandwichStruct_Type,
Uint8List.fromList([
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x09, 0x0a, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x19, 0x1a, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Table_StructWithReservedSandwich_v1',
TableStructWithReservedSandwichStruct(
table: TableStructWithReservedSandwich(
s1: StructSize3Align1(
threeBytes: Uint8List.fromList([0x9, 0xa, 0xb])),
s2: StructSize3Align1(
threeBytes: Uint8List.fromList([0x19, 0x1a, 0x1b])))),
kTable_StructWithReservedSandwichStruct_Type,
Uint8List.fromList([
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x09, 0x0a, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x19, 0x1a, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Table_StructWithUint32Sandwich_old',
TableStructWithUint32SandwichStruct(
table: TableStructWithUint32Sandwich(
i: 0x4030201,
s1: StructSize3Align1(
threeBytes: Uint8List.fromList([0x9, 0xa, 0xb])),
s2: StructSize3Align1(
threeBytes: Uint8List.fromList([0x19, 0x1a, 0x1b])),
i2: 0xd0c0b0a)),
kTable_StructWithUint32SandwichStruct_Type,
Uint8List.fromList([
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x09, 0x0a, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x19, 0x1a, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x0a, 0x0b, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Table_StructWithUint32Sandwich_v1',
TableStructWithUint32SandwichStruct(
table: TableStructWithUint32Sandwich(
i: 0x4030201,
s1: StructSize3Align1(
threeBytes: Uint8List.fromList([0x9, 0xa, 0xb])),
s2: StructSize3Align1(
threeBytes: Uint8List.fromList([0x19, 0x1a, 0x1b])),
i2: 0xd0c0b0a)),
kTable_StructWithUint32SandwichStruct_Type,
Uint8List.fromList([
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x09, 0x0a, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x19, 0x1a, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x0a, 0x0b, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Table_UnionWithVector_ReservedSandwich_old',
TableUnionWithVectorReservedSandwichStruct(
table: TableUnionWithVectorReservedSandwich(
uv: UnionWithVector.withS('hello'))),
kTable_UnionWithVector_ReservedSandwichStruct_Type,
Uint8List.fromList([
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Table_UnionWithVector_ReservedSandwich_v1',
TableUnionWithVectorReservedSandwichStruct(
table: TableUnionWithVectorReservedSandwich(
uv: UnionWithVector.withS('hello'))),
kTable_UnionWithVector_ReservedSandwichStruct_Type,
Uint8List.fromList([
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Table_UnionWithVector_StructSandwich_old',
TableUnionWithVectorStructSandwichStruct(
table: TableUnionWithVectorStructSandwich(
s1: StructSize3Align1(
threeBytes: Uint8List.fromList([0x1, 0x2, 0x3])),
uv: UnionWithVector.withS('hello'),
s2: StructSize3Align1(
threeBytes: Uint8List.fromList([0x4, 0x5, 0x6])))),
kTable_UnionWithVector_StructSandwichStruct_Type,
Uint8List.fromList([
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x00, 0x00, 0x00, //
0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Table_UnionWithVector_StructSandwich_v1',
TableUnionWithVectorStructSandwichStruct(
table: TableUnionWithVectorStructSandwich(
s1: StructSize3Align1(
threeBytes: Uint8List.fromList([0x1, 0x2, 0x3])),
uv: UnionWithVector.withS('hello'),
s2: StructSize3Align1(
threeBytes: Uint8List.fromList([0x4, 0x5, 0x6])))),
kTable_UnionWithVector_StructSandwichStruct_Type,
Uint8List.fromList([
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x00, 0x00, 0x00, //
0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'XUnionWithStruct_old',
XUnionWithStructStruct(
xu: XUnionWithStruct.withS(StructSize3Align1(
threeBytes: Uint8List.fromList([0x1, 0x2, 0x3])))),
kXUnionWithStructStruct_Type,
Uint8List.fromList([
0x14, 0x5c, 0x3e, 0x19, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'XUnionWithStruct_v1',
XUnionWithStructStruct(
xu: XUnionWithStruct.withS(StructSize3Align1(
threeBytes: Uint8List.fromList([0x1, 0x2, 0x3])))),
kXUnionWithStructStruct_Type,
Uint8List.fromList([
0x14, 0x5c, 0x3e, 0x19, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'ArrayStruct_old',
ArrayStruct(unions: [
StringUnion.withS('one'),
StringUnion.withS('two'),
StringUnion.withS('three')
], optionalUnions: [
StringUnion.withS('four'),
StringUnion.withS('five'),
StringUnion.withS('six')
]),
kArrayStruct_Type,
Uint8List.fromList([
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x6f, 0x6e, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x74, 0x77, 0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x74, 0x68, 0x72, 0x65, 0x65, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x66, 0x6f, 0x75, 0x72, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x66, 0x69, 0x76, 0x65, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x73, 0x69, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'ArrayStruct_v1',
ArrayStruct(unions: [
StringUnion.withS('one'),
StringUnion.withS('two'),
StringUnion.withS('three')
], optionalUnions: [
StringUnion.withS('four'),
StringUnion.withS('five'),
StringUnion.withS('six')
]),
kArrayStruct_Type,
Uint8List.fromList([
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x6f, 0x6e, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x74, 0x77, 0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x74, 0x68, 0x72, 0x65, 0x65, 0x00, 0x00, 0x00, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x66, 0x6f, 0x75, 0x72, 0x00, 0x00, 0x00, 0x00, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x66, 0x69, 0x76, 0x65, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x73, 0x69, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'TransformerEmptyStruct_old',
TransformerEmptyStruct(),
kTransformerEmptyStruct_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'TransformerEmptyStruct_v1',
TransformerEmptyStruct(),
kTransformerEmptyStruct_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'EmptyStructUnion_old',
EmptyStructUnionStruct(
u: EmptyStructUnion.withEs(TransformerEmptyStruct())),
kEmptyStructUnionStruct_Type,
Uint8List.fromList([
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'EmptyStructUnion_v1',
EmptyStructUnionStruct(
u: EmptyStructUnion.withEs(TransformerEmptyStruct())),
kEmptyStructUnionStruct_Type,
Uint8List.fromList([
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'NoCodingTablesStressor_old',
NoCodingTablesStressor(
f1: 0x1111111111111111,
f2: 0x2222222222222222,
u1: UnionSize36Align4.withVariant(Uint8List.fromList([
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33
])),
f3: 0x4444444444444444,
f4: 0x5555555555555555,
u2: UnionSize36Align4.withVariant(Uint8List.fromList([
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66
])),
f5: 0x7777777777777777,
f6: 0x8888888888888888,
u3: UnionSize36Align4.withVariant(Uint8List.fromList([
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99
])),
f7: 0xaaaaaaaaaaaaaaaa,
p1: Size8Align8(data: 0xeeeeeeeeeeeeeeee),
f8: 0xbbbbbbbbbbbbbbbb,
p2: Size8Align8(data: 0xeeeeeeeeeeeeeeee),
f9: 0xdddddddddddddddd),
kNoCodingTablesStressor_Type,
Uint8List.fromList([
0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, //
0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, //
0x03, 0x00, 0x00, 0x00, 0x33, 0x33, 0x33, 0x33, //
0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, //
0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, //
0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, //
0x33, 0x33, 0x33, 0x33, 0x00, 0x00, 0x00, 0x00, //
0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, //
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, //
0x03, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, //
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, //
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, //
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, //
0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, //
0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, //
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, //
0x03, 0x00, 0x00, 0x00, 0x99, 0x99, 0x99, 0x99, //
0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, //
0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, //
0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, //
0x99, 0x99, 0x99, 0x99, 0x00, 0x00, 0x00, 0x00, //
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, //
0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, //
0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'NoCodingTablesStressor_v1',
NoCodingTablesStressor(
f1: 0x1111111111111111,
f2: 0x2222222222222222,
u1: UnionSize36Align4.withVariant(Uint8List.fromList([
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33
])),
f3: 0x4444444444444444,
f4: 0x5555555555555555,
u2: UnionSize36Align4.withVariant(Uint8List.fromList([
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66
])),
f5: 0x7777777777777777,
f6: 0x8888888888888888,
u3: UnionSize36Align4.withVariant(Uint8List.fromList([
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99
])),
f7: 0xaaaaaaaaaaaaaaaa,
p1: Size8Align8(data: 0xeeeeeeeeeeeeeeee),
f8: 0xbbbbbbbbbbbbbbbb,
p2: Size8Align8(data: 0xeeeeeeeeeeeeeeee),
f9: 0xdddddddddddddddd),
kNoCodingTablesStressor_Type,
Uint8List.fromList([
0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, //
0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, //
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, //
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, //
0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, //
0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, //
0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, //
0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, //
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, //
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, //
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, //
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, //
0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, //
0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, //
0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, //
0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, //
0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, //
0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, //
]));
EncodeSuccessCase.run(
Encoders.old,
'OutOfLineSandwich1Case1_old',
OutOfLineSandwich1(
before: 'soft migrations rock!',
v: [
Sandwich1(
before: 0x4030201,
theUnion: UnionSize8Align4.withVariant(0xc0b0a09),
after: 0x8070605)
],
after: 'hard transitions suck!'),
kOutOfLineSandwich1_Type,
Uint8List.fromList([
0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x73, 0x6f, 0x66, 0x74, 0x20, 0x6d, 0x69, 0x67, //
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, //
0x72, 0x6f, 0x63, 0x6b, 0x21, 0x00, 0x00, 0x00, //
0x01, 0x02, 0x03, 0x04, 0x02, 0x00, 0x00, 0x00, //
0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x07, 0x08, //
0x68, 0x61, 0x72, 0x64, 0x20, 0x74, 0x72, 0x61, //
0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, //
0x20, 0x73, 0x75, 0x63, 0x6b, 0x21, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'OutOfLineSandwich1Case1_v1',
OutOfLineSandwich1(
before: 'soft migrations rock!',
v: [
Sandwich1(
before: 0x4030201,
theUnion: UnionSize8Align4.withVariant(0xc0b0a09),
after: 0x8070605)
],
after: 'hard transitions suck!'),
kOutOfLineSandwich1_Type,
Uint8List.fromList([
0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x73, 0x6f, 0x66, 0x74, 0x20, 0x6d, 0x69, 0x67, //
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, //
0x72, 0x6f, 0x63, 0x6b, 0x21, 0x00, 0x00, 0x00, //
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x09, 0x0a, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, //
0x68, 0x61, 0x72, 0x64, 0x20, 0x74, 0x72, 0x61, //
0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, //
0x20, 0x73, 0x75, 0x63, 0x6b, 0x21, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'OutOfLineSandwich1WithOptUnionPresent_old',
OutOfLineSandwich1WithOptUnion(
before: 'soft migrations rock!',
v: [
Sandwich1WithOptUnion(
before: 0x4030201,
optUnion: UnionSize8Align4.withVariant(0xc0b0a09),
after: 0x8070605)
],
after: 'hard transitions suck!'),
kOutOfLineSandwich1WithOptUnion_Type,
Uint8List.fromList([
0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x73, 0x6f, 0x66, 0x74, 0x20, 0x6d, 0x69, 0x67, //
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, //
0x72, 0x6f, 0x63, 0x6b, 0x21, 0x00, 0x00, 0x00, //
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, 0x09, 0x0a, 0x0b, 0x0c, //
0x68, 0x61, 0x72, 0x64, 0x20, 0x74, 0x72, 0x61, //
0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, //
0x20, 0x73, 0x75, 0x63, 0x6b, 0x21, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'OutOfLineSandwich1WithOptUnionPresent_v1',
OutOfLineSandwich1WithOptUnion(
before: 'soft migrations rock!',
v: [
Sandwich1WithOptUnion(
before: 0x4030201,
optUnion: UnionSize8Align4.withVariant(0xc0b0a09),
after: 0x8070605)
],
after: 'hard transitions suck!'),
kOutOfLineSandwich1WithOptUnion_Type,
Uint8List.fromList([
0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x73, 0x6f, 0x66, 0x74, 0x20, 0x6d, 0x69, 0x67, //
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, //
0x72, 0x6f, 0x63, 0x6b, 0x21, 0x00, 0x00, 0x00, //
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x09, 0x0a, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, //
0x68, 0x61, 0x72, 0x64, 0x20, 0x74, 0x72, 0x61, //
0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, //
0x20, 0x73, 0x75, 0x63, 0x6b, 0x21, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'OutOfLineSandwich1WithOptUnionAbsent_old',
OutOfLineSandwich1WithOptUnion(
before: 'soft migrations rock!',
v: [Sandwich1WithOptUnion(before: 0x4030201, after: 0x8070605)],
after: 'hard transitions suck!'),
kOutOfLineSandwich1WithOptUnion_Type,
Uint8List.fromList([
0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x73, 0x6f, 0x66, 0x74, 0x20, 0x6d, 0x69, 0x67, //
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, //
0x72, 0x6f, 0x63, 0x6b, 0x21, 0x00, 0x00, 0x00, //
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x68, 0x61, 0x72, 0x64, 0x20, 0x74, 0x72, 0x61, //
0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, //
0x20, 0x73, 0x75, 0x63, 0x6b, 0x21, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'OutOfLineSandwich1WithOptUnionAbsent_v1',
OutOfLineSandwich1WithOptUnion(
before: 'soft migrations rock!',
v: [Sandwich1WithOptUnion(before: 0x4030201, after: 0x8070605)],
after: 'hard transitions suck!'),
kOutOfLineSandwich1WithOptUnion_Type,
Uint8List.fromList([
0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x73, 0x6f, 0x66, 0x74, 0x20, 0x6d, 0x69, 0x67, //
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, //
0x72, 0x6f, 0x63, 0x6b, 0x21, 0x00, 0x00, 0x00, //
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x68, 0x61, 0x72, 0x64, 0x20, 0x74, 0x72, 0x61, //
0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, //
0x20, 0x73, 0x75, 0x63, 0x6b, 0x21, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Regression4_old',
Regression4(
f1: 0x1,
f2: 0x2,
s1: StructSize3Align1(
threeBytes: Uint8List.fromList([0x9, 0xa, 0xb])),
f3: 0x3,
f4: 0x4,
f5: 0x5,
f6: 0x6),
kRegression4_Type,
Uint8List.fromList([
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, //
0x09, 0x0a, 0x0b, 0x03, 0x04, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Regression4_v1',
Regression4(
f1: 0x1,
f2: 0x2,
s1: StructSize3Align1(
threeBytes: Uint8List.fromList([0x9, 0xa, 0xb])),
f3: 0x3,
f4: 0x4,
f5: 0x5,
f6: 0x6),
kRegression4_Type,
Uint8List.fromList([
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, //
0x09, 0x0a, 0x0b, 0x03, 0x04, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Sandwich4Align8_old',
Sandwich4Align8(
sandwich4: Sandwich4(
before: 0x4030201,
theUnion: UnionSize36Align4.withVariant(Uint8List.fromList([
0xa0,
0xa1,
0xa2,
0xa3,
0xa4,
0xa5,
0xa6,
0xa7,
0xa8,
0xa9,
0xaa,
0xab,
0xac,
0xad,
0xae,
0xaf,
0xb0,
0xb1,
0xb2,
0xb3,
0xb4,
0xb5,
0xb6,
0xb7,
0xb8,
0xb9,
0xba,
0xbb,
0xbc,
0xbd,
0xbe,
0xbf
])),
after: 0x8070605),
alignment8Enforcement: 0x100f0e0d0c0b0a09),
kSandwich4Align8_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x03, 0x00, 0x00, 0x00, //
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, //
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, //
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, //
0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Sandwich4Align8_v1',
Sandwich4Align8(
sandwich4: Sandwich4(
before: 0x4030201,
theUnion: UnionSize36Align4.withVariant(Uint8List.fromList([
0xa0,
0xa1,
0xa2,
0xa3,
0xa4,
0xa5,
0xa6,
0xa7,
0xa8,
0xa9,
0xaa,
0xab,
0xac,
0xad,
0xae,
0xaf,
0xb0,
0xb1,
0xb2,
0xb3,
0xb4,
0xb5,
0xb6,
0xb7,
0xb8,
0xb9,
0xba,
0xbb,
0xbc,
0xbd,
0xbe,
0xbf
])),
after: 0x8070605),
alignment8Enforcement: 0x100f0e0d0c0b0a09),
kSandwich4Align8_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, //
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, //
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, //
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, //
0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Sandwich4Align8WithPointer_old',
Sandwich4Align8WithPointer(
sandwich4: Sandwich4(
before: 0x4030201,
theUnion: UnionSize36Align4.withVariant(Uint8List.fromList([
0xa0,
0xa1,
0xa2,
0xa3,
0xa4,
0xa5,
0xa6,
0xa7,
0xa8,
0xa9,
0xaa,
0xab,
0xac,
0xad,
0xae,
0xaf,
0xb0,
0xb1,
0xb2,
0xb3,
0xb4,
0xb5,
0xb6,
0xb7,
0xb8,
0xb9,
0xba,
0xbb,
0xbc,
0xbd,
0xbe,
0xbf
])),
after: 0x8070605),
alignment8Enforcement: Size8Align8(data: 0x100f0e0d0c0b0a09)),
kSandwich4Align8WithPointer_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x03, 0x00, 0x00, 0x00, //
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, //
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, //
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, //
0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Sandwich4Align8WithPointer_v1',
Sandwich4Align8WithPointer(
sandwich4: Sandwich4(
before: 0x4030201,
theUnion: UnionSize36Align4.withVariant(Uint8List.fromList([
0xa0,
0xa1,
0xa2,
0xa3,
0xa4,
0xa5,
0xa6,
0xa7,
0xa8,
0xa9,
0xaa,
0xab,
0xac,
0xad,
0xae,
0xaf,
0xb0,
0xb1,
0xb2,
0xb3,
0xb4,
0xb5,
0xb6,
0xb7,
0xb8,
0xb9,
0xba,
0xbb,
0xbc,
0xbd,
0xbe,
0xbf
])),
after: 0x8070605),
alignment8Enforcement: Size8Align8(data: 0x100f0e0d0c0b0a09)),
kSandwich4Align8WithPointer_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, //
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, //
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, //
0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, //
0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Sandwich8Case1_old',
Sandwich8(
before: 0x4030201,
unionOfUnion: UnionOfUnion.withSize8align4(
UnionSize8Align4.withVariant(0xc0b0a09)),
after: 0x8070605),
kSandwich8_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, 0x09, 0x0a, 0x0b, 0x0c, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Sandwich8Case1_v1',
Sandwich8(
before: 0x4030201,
unionOfUnion: UnionOfUnion.withSize8align4(
UnionSize8Align4.withVariant(0xc0b0a09)),
after: 0x8070605),
kSandwich8_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x09, 0x0a, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'Sandwich9Case1_old',
Sandwich9(
before: 0x201,
theUnion: UnionWithVectorOfVectors.withV([
[
StructSize3Align1(
threeBytes: Uint8List.fromList([0x10, 0x11, 0x12])),
StructSize3Align1(
threeBytes: Uint8List.fromList([0x13, 0x14, 0x15]))
]
]),
after: 0x1211),
kSandwich9_Type,
Uint8List.fromList([
0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x11, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x10, 0x11, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x13, 0x14, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'Sandwich9Case1_v1',
Sandwich9(
before: 0x201,
theUnion: UnionWithVectorOfVectors.withV([
[
StructSize3Align1(
threeBytes: Uint8List.fromList([0x10, 0x11, 0x12])),
StructSize3Align1(
threeBytes: Uint8List.fromList([0x13, 0x14, 0x15]))
]
]),
after: 0x1211),
kSandwich9_Type,
Uint8List.fromList([
0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x11, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x10, 0x11, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x13, 0x14, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'SimpleTableArrayStruct_old',
SimpleTableArrayStruct(theArray: [
TransformerSimpleTable(value: 0xa3a2a1a0),
TransformerSimpleTable(value: 0xb3b2b1b0)
]),
kSimpleTableArrayStruct_Type,
Uint8List.fromList([
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xa0, 0xa1, 0xa2, 0xa3, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xb0, 0xb1, 0xb2, 0xb3, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'SimpleTableArrayStruct_v1',
SimpleTableArrayStruct(theArray: [
TransformerSimpleTable(value: 0xa3a2a1a0),
TransformerSimpleTable(value: 0xb3b2b1b0)
]),
kSimpleTableArrayStruct_Type,
Uint8List.fromList([
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xa0, 0xa1, 0xa2, 0xa3, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xb0, 0xb1, 0xb2, 0xb3, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'StringUnionVector_old',
StringUnionVector(theVector: [
StringUnion.withS('hello'),
StringUnion.withU8(0xaa),
StringUnion.withU8(0xbb)
]),
kStringUnionVector_Type,
Uint8List.fromList([
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xbb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'StringUnionVector_v1',
StringUnionVector(theVector: [
StringUnion.withS('hello'),
StringUnion.withU8(0xaa),
StringUnion.withU8(0xbb)
]),
kStringUnionVector_Type,
Uint8List.fromList([
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x00, 0x00, 0x00, //
0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xbb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'CreateComponentRequest_old',
CreateComponentRequest(
launchInfo: LaunchInfo(
url:
'fuchsia-pkg://fuchsia.com/fidl_compatibility_test_server_rust_write_xunion#meta/fidl_compatibility_test_server_rust_write_xunion.cmx',
directoryRequest: 0xffffffff),
controller: 0xffffffff),
kCreateComponentRequest_Type,
Uint8List.fromList([
0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, //
0x66, 0x75, 0x63, 0x68, 0x73, 0x69, 0x61, 0x2d, //
0x70, 0x6b, 0x67, 0x3a, 0x2f, 0x2f, 0x66, 0x75, //
0x63, 0x68, 0x73, 0x69, 0x61, 0x2e, 0x63, 0x6f, //
0x6d, 0x2f, 0x66, 0x69, 0x64, 0x6c, 0x5f, 0x63, //
0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, //
0x6c, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x65, 0x73, //
0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, //
0x5f, 0x72, 0x75, 0x73, 0x74, 0x5f, 0x77, 0x72, //
0x69, 0x74, 0x65, 0x5f, 0x78, 0x75, 0x6e, 0x69, //
0x6f, 0x6e, 0x23, 0x6d, 0x65, 0x74, 0x61, 0x2f, //
0x66, 0x69, 0x64, 0x6c, 0x5f, 0x63, 0x6f, 0x6d, //
0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, //
0x74, 0x79, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, //
0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x72, //
0x75, 0x73, 0x74, 0x5f, 0x77, 0x72, 0x69, 0x74, //
0x65, 0x5f, 0x78, 0x75, 0x6e, 0x69, 0x6f, 0x6e, //
0x2e, 0x63, 0x6d, 0x78, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'CreateComponentRequest_v1',
CreateComponentRequest(
launchInfo: LaunchInfo(
url:
'fuchsia-pkg://fuchsia.com/fidl_compatibility_test_server_rust_write_xunion#meta/fidl_compatibility_test_server_rust_write_xunion.cmx',
directoryRequest: 0xffffffff),
controller: 0xffffffff),
kCreateComponentRequest_Type,
Uint8List.fromList([
0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, //
0x66, 0x75, 0x63, 0x68, 0x73, 0x69, 0x61, 0x2d, //
0x70, 0x6b, 0x67, 0x3a, 0x2f, 0x2f, 0x66, 0x75, //
0x63, 0x68, 0x73, 0x69, 0x61, 0x2e, 0x63, 0x6f, //
0x6d, 0x2f, 0x66, 0x69, 0x64, 0x6c, 0x5f, 0x63, //
0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, //
0x6c, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x65, 0x73, //
0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, //
0x5f, 0x72, 0x75, 0x73, 0x74, 0x5f, 0x77, 0x72, //
0x69, 0x74, 0x65, 0x5f, 0x78, 0x75, 0x6e, 0x69, //
0x6f, 0x6e, 0x23, 0x6d, 0x65, 0x74, 0x61, 0x2f, //
0x66, 0x69, 0x64, 0x6c, 0x5f, 0x63, 0x6f, 0x6d, //
0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, //
0x74, 0x79, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, //
0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x72, //
0x75, 0x73, 0x74, 0x5f, 0x77, 0x72, 0x69, 0x74, //
0x65, 0x5f, 0x78, 0x75, 0x6e, 0x69, 0x6f, 0x6e, //
0x2e, 0x63, 0x6d, 0x78, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'UnionWithBoundString_old',
UnionWithBoundStringStruct(
v: UnionWithBoundString.withBoundFiveStr('abcd')),
kUnionWithBoundStringStruct_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x61, 0x62, 0x63, 0x64, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'UnionWithBoundString_v1',
UnionWithBoundStringStruct(
v: UnionWithBoundString.withBoundFiveStr('abcd')),
kUnionWithBoundStringStruct_Type,
Uint8List.fromList([
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x61, 0x62, 0x63, 0x64, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'UnionMigration_SingleVariant_old',
SingleVariantUnionStruct(u: SingleVariantUnion.withX(0x2a)),
kSingleVariantUnionStruct_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'UnionMigration_SingleVariant_v1',
SingleVariantUnionStruct(u: SingleVariantUnion.withX(0x2a)),
kSingleVariantUnionStruct_Type,
Uint8List.fromList([
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.old,
'ReverseOrdinalUnion_old',
ReverseOrdinalUnionStruct(u: ReverseOrdinalUnion.withX(0x2a)),
kReverseOrdinalUnionStruct_Type,
Uint8List.fromList([
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
EncodeSuccessCase.run(
Encoders.v1,
'ReverseOrdinalUnion_v1',
ReverseOrdinalUnionStruct(u: ReverseOrdinalUnion.withX(0x2a)),
kReverseOrdinalUnionStruct_Type,
Uint8List.fromList([
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
});
group('decode success cases', () {
DecodeSuccessCase.run(
Decoders.old,
'3ByteObjectAlignmentInStruct_old',
ThreeByteInStruct(
elem1: ThreeByte(elem1: 0x1, elem2: 0x2, elem3: 0x3),
elem2: ThreeByte(elem1: 0x4, elem2: 0x5, elem3: 0x6),
elem3: ThreeByte(elem1: 0x7, elem2: 0x8, elem3: 0x9)),
kThreeByteInStruct_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, //
0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'5ByteObjectAlignmentInStruct_old',
FiveByteInStruct(
elem1: FiveByte(elem1: 0x1020304, elem2: 0x5),
elem2: FiveByte(elem1: 0x6070809, elem2: 0xa),
elem3: FiveByte(elem1: 0xb0c0d0e, elem2: 0xf)),
kFiveByteInStruct_Type,
Uint8List.fromList([
0x04, 0x03, 0x02, 0x01, 0x05, 0x00, 0x00, 0x00, //
0x09, 0x08, 0x07, 0x06, 0x0a, 0x00, 0x00, 0x00, //
0x0e, 0x0d, 0x0c, 0x0b, 0x0f, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'3ByteObjectAlignmentInVector_old',
ThreeByteInVector(elems: [
ThreeByte(elem1: 0x1, elem2: 0x2, elem3: 0x3),
ThreeByte(elem1: 0x4, elem2: 0x5, elem3: 0x6),
ThreeByte(elem1: 0x7, elem2: 0x8, elem3: 0x9)
]),
kThreeByteInVector_Type,
Uint8List.fromList([
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, //
0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'5ByteObjectAlignmentInVector_old',
FiveByteInVector(elems: [
FiveByte(elem1: 0x1020304, elem2: 0x5),
FiveByte(elem1: 0x6070809, elem2: 0xa),
FiveByte(elem1: 0xb0c0d0e, elem2: 0xf)
]),
kFiveByteInVector_Type,
Uint8List.fromList([
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x04, 0x03, 0x02, 0x01, 0x05, 0x00, 0x00, 0x00, //
0x09, 0x08, 0x07, 0x06, 0x0a, 0x00, 0x00, 0x00, //
0x0e, 0x0d, 0x0c, 0x0b, 0x0f, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'3ByteObjectAlignmentInArray_old',
ThreeByteInArray(elems: [
ThreeByte(elem1: 0x1, elem2: 0x2, elem3: 0x3),
ThreeByte(elem1: 0x4, elem2: 0x5, elem3: 0x6),
ThreeByte(elem1: 0x7, elem2: 0x8, elem3: 0x9)
]),
kThreeByteInArray_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, //
0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'5ByteObjectAlignmentInArray_old',
FiveByteInArray(elems: [
FiveByte(elem1: 0x1020304, elem2: 0x5),
FiveByte(elem1: 0x6070809, elem2: 0xa),
FiveByte(elem1: 0xb0c0d0e, elem2: 0xf)
]),
kFiveByteInArray_Type,
Uint8List.fromList([
0x04, 0x03, 0x02, 0x01, 0x05, 0x00, 0x00, 0x00, //
0x09, 0x08, 0x07, 0x06, 0x0a, 0x00, 0x00, 0x00, //
0x0e, 0x0d, 0x0c, 0x0b, 0x0f, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'EmptyStruct_old',
EmptyStruct(),
kEmptyStruct_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'EmptyStructSandwich_old',
EmptyStructSandwich(
before: 'before', es: EmptyStruct(), after: 'after'),
kEmptyStructSandwich_Type,
Uint8List.fromList([
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x00, 0x00, //
0x61, 0x66, 0x74, 0x65, 0x72, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Uint8Uint16Uint32Uint64_old',
Uint8Uint16Uint32Uint64(
f1: 0x1, f2: 0x203, f3: 0x4050607, f4: 0x8090a0b0c0d0e0f),
kUint8Uint16Uint32Uint64_Type,
Uint8List.fromList([
0x01, 0x00, 0x03, 0x02, 0x07, 0x06, 0x05, 0x04, //
0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Uint64Uint32Uint16Uint8_old',
Uint64Uint32Uint16Uint8(
f1: 0x8090a0b0c0d0e0f, f2: 0x4050607, f3: 0x203, f4: 0x1),
kUint64Uint32Uint16Uint8_Type,
Uint8List.fromList([
0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, //
0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'SimpleTableEmpty_old',
StructOfSimpleTable(table: SimpleTable()),
kStructOfSimpleTable_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
]));
DecodeSuccessCase.run(
Decoders.old,
'SimpleTableXAndY_old',
StructOfSimpleTable(table: SimpleTable(x: 0x2a, y: 0x43)),
kStructOfSimpleTable_Type,
Uint8List.fromList([
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'SimpleTableJustY_old',
StructOfSimpleTable(table: SimpleTable(y: 0x43)),
kStructOfSimpleTable_Type,
Uint8List.fromList([
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'TableWithStringAndVectorNoVectorContent_old',
StructOfTableWithStringAndVector(
table: TableWithStringAndVector(foo: 'hello', bar: 0x1b)),
kStructOfTableWithStringAndVector_Type,
Uint8List.fromList([
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x00, 0x00, 0x00, //
0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'SimpleTableThenUint64_old',
SimpleTableThenUint64(
table: SimpleTable(x: 0x2a, y: 0x43), number: 0xdeadbeefdeadbeef),
kSimpleTableThenUint64_Type,
Uint8List.fromList([
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xef, 0xbe, 0xad, 0xde, 0xef, 0xbe, 0xad, 0xde, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'ReverseOrdinalTable_old',
StructOfReverseOrdinalTable(
table: ReverseOrdinalTable(x: 0xaa, y: 0xbb, z: 0xcc)),
kStructOfReverseOrdinalTable_Type,
Uint8List.fromList([
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xbb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'InlineXUnionInStruct_old',
TestInlineXUnionInStruct(
before: 'before',
xu: SampleXUnion.withU(0xdeadbeef),
after: 'after'),
kTestInlineXUnionInStruct_Type,
Uint8List.fromList([
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xb2, 0x56, 0x9c, 0x38, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x00, 0x00, //
0xef, 0xbe, 0xad, 0xde, 0x00, 0x00, 0x00, 0x00, //
0x61, 0x66, 0x74, 0x65, 0x72, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'OptionalXUnionInStructAbsent_old',
TestOptionalXUnionInStruct(before: 'before', after: 'after'),
kTestOptionalXUnionInStruct_Type,
Uint8List.fromList([
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x00, 0x00, //
0x61, 0x66, 0x74, 0x65, 0x72, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'OptionalXUnionInStructPresent_old',
TestOptionalXUnionInStruct(
before: 'before',
xu: SampleXUnion.withU(0xdeadbeef),
after: 'after'),
kTestOptionalXUnionInStruct_Type,
Uint8List.fromList([
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xb2, 0x56, 0x9c, 0x38, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x00, 0x00, //
0xef, 0xbe, 0xad, 0xde, 0x00, 0x00, 0x00, 0x00, //
0x61, 0x66, 0x74, 0x65, 0x72, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'XUnionInTableXUnionAbsent_old',
TestXUnionInTable(
value: XUnionInTable(before: 'before', after: 'after')),
kTestXUnionInTable_Type,
Uint8List.fromList([
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x61, 0x66, 0x74, 0x65, 0x72, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'XUnionInTableXUnionPresent_old',
TestXUnionInTable(
value: XUnionInTable(
before: 'before',
xu: SampleXUnion.withU(0xdeadbeef),
after: 'after')),
kTestXUnionInTable_Type,
Uint8List.fromList([
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x00, 0x00, //
0xb2, 0x56, 0x9c, 0x38, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xef, 0xbe, 0xad, 0xde, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x61, 0x66, 0x74, 0x65, 0x72, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'StrictXUnion_old',
TestStrictXUnionInStruct(xu: SampleStrictXUnion.withU(0xdeadbeef)),
kTestStrictXUnionInStruct_Type,
Uint8List.fromList([
0x72, 0xea, 0xe2, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xef, 0xbe, 0xad, 0xde, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'AddEthernetDeviceRequest_old',
TestAddEthernetDeviceRequest(
topologicalPath: '@/dev/sys/pci/00:03.0/e1000/ethernet',
config: InterfaceConfig(
name: 'ethp0003',
ipAddressConfig: IpAddressConfig.withDhcp(true)),
thisShouldBeAHandle: 0xffffffff),
kTestAddEthernetDeviceRequest_Type,
Uint8List.fromList([
0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, //
0x40, 0x2f, 0x64, 0x65, 0x76, 0x2f, 0x73, 0x79, //
0x73, 0x2f, 0x70, 0x63, 0x69, 0x2f, 0x30, 0x30, //
0x3a, 0x30, 0x33, 0x2e, 0x30, 0x2f, 0x65, 0x31, //
0x30, 0x30, 0x30, 0x2f, 0x65, 0x74, 0x68, 0x65, //
0x72, 0x6e, 0x65, 0x74, 0x00, 0x00, 0x00, 0x00, //
0x65, 0x74, 0x68, 0x70, 0x30, 0x30, 0x30, 0x33, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'AddEthernetDeviceRequest_v1',
TestAddEthernetDeviceRequest(
topologicalPath: '@/dev/sys/pci/00:03.0/e1000/ethernet',
config: InterfaceConfig(
name: 'ethp0003',
ipAddressConfig: IpAddressConfig.withDhcp(true)),
thisShouldBeAHandle: 0xffffffff),
kTestAddEthernetDeviceRequest_Type,
Uint8List.fromList([
0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, //
0x40, 0x2f, 0x64, 0x65, 0x76, 0x2f, 0x73, 0x79, //
0x73, 0x2f, 0x70, 0x63, 0x69, 0x2f, 0x30, 0x30, //
0x3a, 0x30, 0x33, 0x2e, 0x30, 0x2f, 0x65, 0x31, //
0x30, 0x30, 0x30, 0x2f, 0x65, 0x74, 0x68, 0x65, //
0x72, 0x6e, 0x65, 0x74, 0x00, 0x00, 0x00, 0x00, //
0x65, 0x74, 0x68, 0x70, 0x30, 0x30, 0x30, 0x33, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'FileGetAttrResponse_old',
FileGetAttrResponse(
s: 0x7eadbeaf,
attributes: NodeAttributes(
mode: 0x962381a4,
id: 0x1,
contentSize: 0xe7,
storageSize: 0xe7,
linkCount: 0x1,
creationTime: 0x8877665544332211,
modificationTime: 0xffeeddccbbaa99)),
kFileGetAttrResponse_Type,
Uint8List.fromList([
0xaf, 0xbe, 0xad, 0x7e, 0x00, 0x00, 0x00, 0x00, //
0xa4, 0x81, 0x23, 0x96, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, //
0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Optionals_old',
StructWithOptionals(
s: EmptyStruct(),
s2: EmptyStruct(),
t: TableWithEmptyStruct(s: EmptyStruct()),
xu: XUnionWithEmptyStruct.withS(EmptyStruct()),
xu2: XUnionWithEmptyStruct.withS(EmptyStruct()),
u: UnionWithEmptyStruct.withS(EmptyStruct()),
u2: UnionWithEmptyStruct.withS(EmptyStruct())),
kStructWithOptionals_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xfe, 0xe0, 0x99, 0x74, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xfe, 0xe0, 0x99, 0x74, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Optionals_v1',
StructWithOptionals(
s: EmptyStruct(),
s2: EmptyStruct(),
t: TableWithEmptyStruct(s: EmptyStruct()),
xu: XUnionWithEmptyStruct.withS(EmptyStruct()),
xu2: XUnionWithEmptyStruct.withS(EmptyStruct()),
u: UnionWithEmptyStruct.withS(EmptyStruct()),
u2: UnionWithEmptyStruct.withS(EmptyStruct())),
kStructWithOptionals_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xfe, 0xe0, 0x99, 0x74, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xfe, 0xe0, 0x99, 0x74, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Arrays_old',
StructWithArrays(arrInt: Int32List.fromList([0x1, 0x2]), arrString: [
'a',
'b'
], arrNullableString: [
'c',
null
], arrStruct: [
StructWithInt(x: 0x1),
StructWithInt(x: 0x2)
], arrNullableStruct: [
null,
StructWithInt(x: 0x1020304)
], arrArrInt: [
Int32List.fromList([0x1, 0x2, 0x3]),
Int32List.fromList([0x4, 0x5, 0x6])
]),
kStructWithArrays_Type,
Uint8List.fromList([
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, //
0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Vectors_old',
StructWithVectors(
vecEmpty: Int32List.fromList([]),
vecInt: Int32List.fromList([0x1, 0x2]),
vecString: [
'a',
'b'
],
vecNullableString: [
null,
'c',
null
],
vecStruct: [
StructWithInt(x: 0x1)
],
vecNullableStruct: [
null,
null,
StructWithInt(x: 0x2)
],
vecVecInt: [
Int32List.fromList([0x1, 0x2]),
Int32List.fromList([0x3])
]),
kStructWithVectors_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'BoolTrue_old',
MyBool(value: true),
kMyBool_Type,
Uint8List.fromList([
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'BoolFalse_old',
MyBool(value: false),
kMyBool_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'ByteZero_old',
MyByte(value: 0x0),
kMyByte_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Byte255_old',
MyByte(value: 0xff),
kMyByte_Type,
Uint8List.fromList([
0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Int8Min_old',
MyInt8(value: -128),
kMyInt8_Type,
Uint8List.fromList([
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Int8Zero_old',
MyInt8(value: 0x0),
kMyInt8_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Int8Max_old',
MyInt8(value: 0x7f),
kMyInt8_Type,
Uint8List.fromList([
0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Int16Min_old',
MyInt16(value: -32768),
kMyInt16_Type,
Uint8List.fromList([
0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Int16Zero_old',
MyInt16(value: 0x0),
kMyInt16_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Int16Max_old',
MyInt16(value: 0x7fff),
kMyInt16_Type,
Uint8List.fromList([
0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Int32Min_old',
MyInt32(value: -2147483648),
kMyInt32_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Int32Zero_old',
MyInt32(value: 0x0),
kMyInt32_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Int32Max_old',
MyInt32(value: 0x7fffffff),
kMyInt32_Type,
Uint8List.fromList([
0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Int64Min_old',
MyInt64(value: -9223372036854775808),
kMyInt64_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Int64Zero_old',
MyInt64(value: 0x0),
kMyInt64_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Int64Max_old',
MyInt64(value: 0x7fffffffffffffff),
kMyInt64_Type,
Uint8List.fromList([
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Uint8Zero_old',
MyUint8(value: 0x0),
kMyUint8_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Uint8Max_old',
MyUint8(value: 0xff),
kMyUint8_Type,
Uint8List.fromList([
0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Uint16Zero_old',
MyUint16(value: 0x0),
kMyUint16_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Uint16Max_old',
MyUint16(value: 0xffff),
kMyUint16_Type,
Uint8List.fromList([
0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Uint32Zero_old',
MyUint32(value: 0x0),
kMyUint32_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Uint32Max_old',
MyUint32(value: 0xffffffff),
kMyUint32_Type,
Uint8List.fromList([
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Uint64Zero_old',
MyUint64(value: 0x0),
kMyUint64_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Uint64Max_old',
MyUint64(value: 0xffffffffffffffff),
kMyUint64_Type,
Uint8List.fromList([
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Float32Zero_old',
MyFloat32(value: 0),
kMyFloat32_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Float32One_old',
MyFloat32(value: 1),
kMyFloat32_Type,
Uint8List.fromList([
0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Float32MinusOne_old',
MyFloat32(value: -1),
kMyFloat32_Type,
Uint8List.fromList([
0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Float32Max_old',
MyFloat32(value: 3.4028234663852886e+38),
kMyFloat32_Type,
Uint8List.fromList([
0xff, 0xff, 0x7f, 0x7f, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Float64Zero_old',
MyFloat64(value: 0),
kMyFloat64_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Float64One_old',
MyFloat64(value: 1),
kMyFloat64_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Float64MinusOne_old',
MyFloat64(value: -1),
kMyFloat64_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xbf, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Float64Max_old',
MyFloat64(value: 1.7976931348623157e+308),
kMyFloat64_Type,
Uint8List.fromList([
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0x7f, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Sandwich1Case1_old',
Sandwich1(
before: 0x4030201,
theUnion: UnionSize8Align4.withVariant(0xc0b0a09),
after: 0x8070605),
kSandwich1_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x02, 0x00, 0x00, 0x00, //
0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x07, 0x08, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Sandwich1Case1_v1',
Sandwich1(
before: 0x4030201,
theUnion: UnionSize8Align4.withVariant(0xc0b0a09),
after: 0x8070605),
kSandwich1_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x09, 0x0a, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Sandwich1WithOptUnionPresent_old',
Sandwich1WithOptUnion(
before: 0x4030201,
optUnion: UnionSize8Align4.withVariant(0xc0b0a09),
after: 0x8070605),
kSandwich1WithOptUnion_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, 0x09, 0x0a, 0x0b, 0x0c, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Sandwich1WithOptUnionPresent_v1',
Sandwich1WithOptUnion(
before: 0x4030201,
optUnion: UnionSize8Align4.withVariant(0xc0b0a09),
after: 0x8070605),
kSandwich1WithOptUnion_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x09, 0x0a, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Sandwich1WithOptUnionAbsent_old',
Sandwich1WithOptUnion(before: 0x4030201, after: 0x8070605),
kSandwich1WithOptUnion_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Sandwich1WithOptUnionAbsent_v1',
Sandwich1WithOptUnion(before: 0x4030201, after: 0x8070605),
kSandwich1WithOptUnion_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Sandwich2Case1_old',
Sandwich2(
before: 0x4030201,
theUnion: UnionSize12Align4.withVariant(
Uint8List.fromList([0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5])),
after: 0x8070605),
kSandwich2_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x03, 0x00, 0x00, 0x00, //
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0x00, 0x00, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Sandwich2Case1_v1',
Sandwich2(
before: 0x4030201,
theUnion: UnionSize12Align4.withVariant(
Uint8List.fromList([0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5])),
after: 0x8070605),
kSandwich2_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Sandwich3Case1_old',
Sandwich3(
before: 0x4030201,
theUnion: UnionSize24Align8.withVariant(StructSize16Align8(
f1: 0xa7a6a5a4a3a2a1a0, f2: 0xafaeadacabaaa9a8)),
after: 0x8070605),
kSandwich3_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, //
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Sandwich3Case1_v1',
Sandwich3(
before: 0x4030201,
theUnion: UnionSize24Align8.withVariant(StructSize16Align8(
f1: 0xa7a6a5a4a3a2a1a0, f2: 0xafaeadacabaaa9a8)),
after: 0x8070605),
kSandwich3_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, //
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Sandwich4Case1_old',
Sandwich4(
before: 0x4030201,
theUnion: UnionSize36Align4.withVariant(Uint8List.fromList([
0xa0,
0xa1,
0xa2,
0xa3,
0xa4,
0xa5,
0xa6,
0xa7,
0xa8,
0xa9,
0xaa,
0xab,
0xac,
0xad,
0xae,
0xaf,
0xb0,
0xb1,
0xb2,
0xb3,
0xb4,
0xb5,
0xb6,
0xb7,
0xb8,
0xb9,
0xba,
0xbb,
0xbc,
0xbd,
0xbe,
0xbf
])),
after: 0x8070605),
kSandwich4_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x03, 0x00, 0x00, 0x00, //
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, //
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, //
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, //
0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Sandwich4Case1_v1',
Sandwich4(
before: 0x4030201,
theUnion: UnionSize36Align4.withVariant(Uint8List.fromList([
0xa0,
0xa1,
0xa2,
0xa3,
0xa4,
0xa5,
0xa6,
0xa7,
0xa8,
0xa9,
0xaa,
0xab,
0xac,
0xad,
0xae,
0xaf,
0xb0,
0xb1,
0xb2,
0xb3,
0xb4,
0xb5,
0xb6,
0xb7,
0xb8,
0xb9,
0xba,
0xbb,
0xbc,
0xbd,
0xbe,
0xbf
])),
after: 0x8070605),
kSandwich4_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, //
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, //
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, //
0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Sandwich5Case1_old',
Sandwich5(
before: 0x4030201,
unionOfUnion: UnionOfUnion.withSize8align4(
UnionSize8Align4.withVariant(0xc0b0a09)),
after: 0x8070605),
kSandwich5_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, 0x09, 0x0a, 0x0b, 0x0c, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Sandwich5Case1_v1',
Sandwich5(
before: 0x4030201,
unionOfUnion: UnionOfUnion.withSize8align4(
UnionSize8Align4.withVariant(0xc0b0a09)),
after: 0x8070605),
kSandwich5_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x09, 0x0a, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Sandwich5Case2_old',
Sandwich5(
before: 0x4030201,
unionOfUnion: UnionOfUnion.withSize24align8(
UnionSize24Align8.withVariant(StructSize16Align8(
f1: 0xa7a6a5a4a3a2a1a0, f2: 0xafaeadacabaaa9a8))),
after: 0x8070605),
kSandwich5_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, //
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Sandwich5Case2_v1',
Sandwich5(
before: 0x4030201,
unionOfUnion: UnionOfUnion.withSize24align8(
UnionSize24Align8.withVariant(StructSize16Align8(
f1: 0xa7a6a5a4a3a2a1a0, f2: 0xafaeadacabaaa9a8))),
after: 0x8070605),
kSandwich5_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, //
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Sandwich6Case1_old',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withVectorOfUint8(
Uint8List.fromList([0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5])),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Sandwich6Case1_v1',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withVectorOfUint8(
Uint8List.fromList([0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5])),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Sandwich6Case1AbsentVector_old',
Sandwich6(
before: 0x4030201,
theUnion:
UnionWithVector.withVectorOfUint8(Uint8List.fromList([])),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Sandwich6Case1AbsentVector_v1',
Sandwich6(
before: 0x4030201,
theUnion:
UnionWithVector.withVectorOfUint8(Uint8List.fromList([])),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Sandwich6Case2_old',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withS('soft migrations rock!'),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x73, 0x6f, 0x66, 0x74, 0x20, 0x6d, 0x69, 0x67, //
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, //
0x72, 0x6f, 0x63, 0x6b, 0x21, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Sandwich6Case2_v1',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withS('soft migrations rock!'),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x73, 0x6f, 0x66, 0x74, 0x20, 0x6d, 0x69, 0x67, //
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, //
0x72, 0x6f, 0x63, 0x6b, 0x21, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Sandwich6Case3_old',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withVectorS3A1([
StructSize3Align1(
threeBytes: Uint8List.fromList([0x73, 0x6f, 0x66])),
StructSize3Align1(
threeBytes: Uint8List.fromList([0x20, 0x6d, 0x69])),
StructSize3Align1(
threeBytes: Uint8List.fromList([0x72, 0x61, 0x74]))
]),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x73, 0x6f, 0x66, 0x20, 0x6d, 0x69, 0x72, 0x61, //
0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Sandwich6Case3_v1',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withVectorS3A1([
StructSize3Align1(
threeBytes: Uint8List.fromList([0x73, 0x6f, 0x66])),
StructSize3Align1(
threeBytes: Uint8List.fromList([0x20, 0x6d, 0x69])),
StructSize3Align1(
threeBytes: Uint8List.fromList([0x72, 0x61, 0x74]))
]),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x73, 0x6f, 0x66, 0x20, 0x6d, 0x69, 0x72, 0x61, //
0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Sandwich6Case4_old',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withVectorS3A2([
StructSize3Align2(f1: 0x6f73, f2: 0x66),
StructSize3Align2(f1: 0x6d20, f2: 0x69),
StructSize3Align2(f1: 0x6172, f2: 0x74)
]),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x73, 0x6f, 0x66, 0x00, 0x20, 0x6d, 0x69, 0x00, //
0x72, 0x61, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Sandwich6Case4_v1',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withVectorS3A2([
StructSize3Align2(f1: 0x6f73, f2: 0x66),
StructSize3Align2(f1: 0x6d20, f2: 0x69),
StructSize3Align2(f1: 0x6172, f2: 0x74)
]),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x73, 0x6f, 0x66, 0x00, 0x20, 0x6d, 0x69, 0x00, //
0x72, 0x61, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Sandwich6Case5_old',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withHandles(
Uint32List.fromList([0xffffffff, 0xffffffff, 0xffffffff])),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Sandwich6Case5_v1',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withHandles(
Uint32List.fromList([0xffffffff, 0xffffffff, 0xffffffff])),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Sandwich6Case6_old',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withArrayS3A1([
StructSize3Align1(
threeBytes: Uint8List.fromList([0xa1, 0xa2, 0xa3])),
StructSize3Align1(
threeBytes: Uint8List.fromList([0xa4, 0xa5, 0xa6]))
]),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Sandwich6Case6_v1',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withArrayS3A1([
StructSize3Align1(
threeBytes: Uint8List.fromList([0xa1, 0xa2, 0xa3])),
StructSize3Align1(
threeBytes: Uint8List.fromList([0xa4, 0xa5, 0xa6]))
]),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Sandwich6Case7_old',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withArrayS3A2([
StructSize3Align2(f1: 0xa2a1, f2: 0xa3),
StructSize3Align2(f1: 0xa5a4, f2: 0xa6)
]),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xa1, 0xa2, 0xa3, 0x00, 0xa4, 0xa5, 0xa6, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Sandwich6Case7_v1',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withArrayS3A2([
StructSize3Align2(f1: 0xa2a1, f2: 0xa3),
StructSize3Align2(f1: 0xa5a4, f2: 0xa6)
]),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0xa1, 0xa2, 0xa3, 0x00, 0xa4, 0xa5, 0xa6, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Sandwich6Case8_old',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withVectorUnion(
[UnionSize8Align4.withVariant(0xc0b0a09)]),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, 0x09, 0x0a, 0x0b, 0x0c, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Sandwich6Case8_v1',
Sandwich6(
before: 0x4030201,
theUnion: UnionWithVector.withVectorUnion(
[UnionSize8Align4.withVariant(0xc0b0a09)]),
after: 0x8070605),
kSandwich6_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x09, 0x0a, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Sandwich7Case1_old',
Sandwich7(
before: 0x14131211,
optSandwich1: Sandwich1(
before: 0x4030201,
theUnion: UnionSize8Align4.withVariant(0xc0b0a09),
after: 0x8070605),
after: 0x24232221),
kSandwich7_Type,
Uint8List.fromList([
0x11, 0x12, 0x13, 0x14, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x21, 0x22, 0x23, 0x24, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x02, 0x03, 0x04, 0x02, 0x00, 0x00, 0x00, //
0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x07, 0x08, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Sandwich7Case1_v1',
Sandwich7(
before: 0x14131211,
optSandwich1: Sandwich1(
before: 0x4030201,
theUnion: UnionSize8Align4.withVariant(0xc0b0a09),
after: 0x8070605),
after: 0x24232221),
kSandwich7_Type,
Uint8List.fromList([
0x11, 0x12, 0x13, 0x14, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x21, 0x22, 0x23, 0x24, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x09, 0x0a, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Sandwich7Case2_old',
Sandwich7(before: 0x14131211, after: 0x24232221),
kSandwich7_Type,
Uint8List.fromList([
0x11, 0x12, 0x13, 0x14, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x21, 0x22, 0x23, 0x24, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Sandwich7Case2_v1',
Sandwich7(before: 0x14131211, after: 0x24232221),
kSandwich7_Type,
Uint8List.fromList([
0x11, 0x12, 0x13, 0x14, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x21, 0x22, 0x23, 0x24, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Regression1_old',
Regression1(f1: 0x1, f2: 0x2, f3: 0x3, f4: 0x4, f5: 0x5, f6: 0x6),
kRegression1_Type,
Uint8List.fromList([
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Regression1_v1',
Regression1(f1: 0x1, f2: 0x2, f3: 0x3, f4: 0x4, f5: 0x5, f6: 0x6),
kRegression1_Type,
Uint8List.fromList([
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Regression2_old',
Regression2(
head: Regression1(
f1: 0x1, f2: 0x2, f3: 0x3, f4: 0x4, f5: 0x5, f6: 0x6),
f7: 0x7),
kRegression2_Type,
Uint8List.fromList([
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Regression2_v1',
Regression2(
head: Regression1(
f1: 0x1, f2: 0x2, f3: 0x3, f4: 0x4, f5: 0x5, f6: 0x6),
f7: 0x7),
kRegression2_Type,
Uint8List.fromList([
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Regression3Absent_old',
Regression3(),
kRegression3_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Regression3Absent_v1',
Regression3(),
kRegression3_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Regression3Present_old',
Regression3(
optValue: Regression2(
head: Regression1(
f1: 0x1, f2: 0x2, f3: 0x3, f4: 0x4, f5: 0x5, f6: 0x6),
f7: 0x7)),
kRegression3_Type,
Uint8List.fromList([
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Regression3Present_v1',
Regression3(
optValue: Regression2(
head: Regression1(
f1: 0x1, f2: 0x2, f3: 0x3, f4: 0x4, f5: 0x5, f6: 0x6),
f7: 0x7)),
kRegression3_Type,
Uint8List.fromList([
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Size5Alignment1Array_old',
Size5Alignment1Array(a: [
Size5Alignment1(
data: Uint8List.fromList([0x1, 0x2, 0x3, 0x4, 0x5])),
Size5Alignment1(
data: Uint8List.fromList([0x6, 0x7, 0x8, 0x9, 0xa])),
Size5Alignment1(data: Uint8List.fromList([0xb, 0xc, 0xd, 0xe, 0xf]))
]),
kSize5Alignment1Array_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, //
0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Size5Alignment1Array_v1',
Size5Alignment1Array(a: [
Size5Alignment1(
data: Uint8List.fromList([0x1, 0x2, 0x3, 0x4, 0x5])),
Size5Alignment1(
data: Uint8List.fromList([0x6, 0x7, 0x8, 0x9, 0xa])),
Size5Alignment1(data: Uint8List.fromList([0xb, 0xc, 0xd, 0xe, 0xf]))
]),
kSize5Alignment1Array_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, //
0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Size5Alignment4Array_old',
Size5Alignment4Array(a: [
Size5Alignment4(four: 0x4030201, one: 0x5),
Size5Alignment4(four: 0x9080706, one: 0xa),
Size5Alignment4(four: 0xe0d0c0b, one: 0xf)
]),
kSize5Alignment4Array_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x05, 0x00, 0x00, 0x00, //
0x06, 0x07, 0x08, 0x09, 0x0a, 0x00, 0x00, 0x00, //
0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Size5Alignment4Array_v1',
Size5Alignment4Array(a: [
Size5Alignment4(four: 0x4030201, one: 0x5),
Size5Alignment4(four: 0x9080706, one: 0xa),
Size5Alignment4(four: 0xe0d0c0b, one: 0xf)
]),
kSize5Alignment4Array_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x05, 0x00, 0x00, 0x00, //
0x06, 0x07, 0x08, 0x09, 0x0a, 0x00, 0x00, 0x00, //
0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Size5Alignment1Vector_old',
Size5Alignment1Vector(v: [
Size5Alignment1(
data: Uint8List.fromList([0x1, 0x2, 0x3, 0x4, 0x5])),
Size5Alignment1(data: Uint8List.fromList([0x6, 0x7, 0x8, 0x9, 0xa]))
]),
kSize5Alignment1Vector_Type,
Uint8List.fromList([
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, //
0x09, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Size5Alignment1Vector_v1',
Size5Alignment1Vector(v: [
Size5Alignment1(
data: Uint8List.fromList([0x1, 0x2, 0x3, 0x4, 0x5])),
Size5Alignment1(data: Uint8List.fromList([0x6, 0x7, 0x8, 0x9, 0xa]))
]),
kSize5Alignment1Vector_Type,
Uint8List.fromList([
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, //
0x09, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Size5Alignment4Vector_old',
Size5Alignment4Vector(v: [
Size5Alignment4(four: 0x4030201, one: 0x5),
Size5Alignment4(four: 0x9080706, one: 0xa)
]),
kSize5Alignment4Vector_Type,
Uint8List.fromList([
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x02, 0x03, 0x04, 0x05, 0x00, 0x00, 0x00, //
0x06, 0x07, 0x08, 0x09, 0x0a, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Size5Alignment4Vector_v1',
Size5Alignment4Vector(v: [
Size5Alignment4(four: 0x4030201, one: 0x5),
Size5Alignment4(four: 0x9080706, one: 0xa)
]),
kSize5Alignment4Vector_Type,
Uint8List.fromList([
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x02, 0x03, 0x04, 0x05, 0x00, 0x00, 0x00, //
0x06, 0x07, 0x08, 0x09, 0x0a, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Table_StructWithReservedSandwich_old',
TableStructWithReservedSandwichStruct(
table: TableStructWithReservedSandwich(
s1: StructSize3Align1(
threeBytes: Uint8List.fromList([0x9, 0xa, 0xb])),
s2: StructSize3Align1(
threeBytes: Uint8List.fromList([0x19, 0x1a, 0x1b])))),
kTable_StructWithReservedSandwichStruct_Type,
Uint8List.fromList([
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x09, 0x0a, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x19, 0x1a, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Table_StructWithReservedSandwich_v1',
TableStructWithReservedSandwichStruct(
table: TableStructWithReservedSandwich(
s1: StructSize3Align1(
threeBytes: Uint8List.fromList([0x9, 0xa, 0xb])),
s2: StructSize3Align1(
threeBytes: Uint8List.fromList([0x19, 0x1a, 0x1b])))),
kTable_StructWithReservedSandwichStruct_Type,
Uint8List.fromList([
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x09, 0x0a, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x19, 0x1a, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Table_StructWithUint32Sandwich_old',
TableStructWithUint32SandwichStruct(
table: TableStructWithUint32Sandwich(
i: 0x4030201,
s1: StructSize3Align1(
threeBytes: Uint8List.fromList([0x9, 0xa, 0xb])),
s2: StructSize3Align1(
threeBytes: Uint8List.fromList([0x19, 0x1a, 0x1b])),
i2: 0xd0c0b0a)),
kTable_StructWithUint32SandwichStruct_Type,
Uint8List.fromList([
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x09, 0x0a, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x19, 0x1a, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x0a, 0x0b, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Table_StructWithUint32Sandwich_v1',
TableStructWithUint32SandwichStruct(
table: TableStructWithUint32Sandwich(
i: 0x4030201,
s1: StructSize3Align1(
threeBytes: Uint8List.fromList([0x9, 0xa, 0xb])),
s2: StructSize3Align1(
threeBytes: Uint8List.fromList([0x19, 0x1a, 0x1b])),
i2: 0xd0c0b0a)),
kTable_StructWithUint32SandwichStruct_Type,
Uint8List.fromList([
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x09, 0x0a, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x19, 0x1a, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x0a, 0x0b, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Table_UnionWithVector_ReservedSandwich_old',
TableUnionWithVectorReservedSandwichStruct(
table: TableUnionWithVectorReservedSandwich(
uv: UnionWithVector.withS('hello'))),
kTable_UnionWithVector_ReservedSandwichStruct_Type,
Uint8List.fromList([
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Table_UnionWithVector_ReservedSandwich_v1',
TableUnionWithVectorReservedSandwichStruct(
table: TableUnionWithVectorReservedSandwich(
uv: UnionWithVector.withS('hello'))),
kTable_UnionWithVector_ReservedSandwichStruct_Type,
Uint8List.fromList([
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Table_UnionWithVector_StructSandwich_old',
TableUnionWithVectorStructSandwichStruct(
table: TableUnionWithVectorStructSandwich(
s1: StructSize3Align1(
threeBytes: Uint8List.fromList([0x1, 0x2, 0x3])),
uv: UnionWithVector.withS('hello'),
s2: StructSize3Align1(
threeBytes: Uint8List.fromList([0x4, 0x5, 0x6])))),
kTable_UnionWithVector_StructSandwichStruct_Type,
Uint8List.fromList([
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x00, 0x00, 0x00, //
0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Table_UnionWithVector_StructSandwich_v1',
TableUnionWithVectorStructSandwichStruct(
table: TableUnionWithVectorStructSandwich(
s1: StructSize3Align1(
threeBytes: Uint8List.fromList([0x1, 0x2, 0x3])),
uv: UnionWithVector.withS('hello'),
s2: StructSize3Align1(
threeBytes: Uint8List.fromList([0x4, 0x5, 0x6])))),
kTable_UnionWithVector_StructSandwichStruct_Type,
Uint8List.fromList([
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x00, 0x00, 0x00, //
0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'XUnionWithStruct_old',
XUnionWithStructStruct(
xu: XUnionWithStruct.withS(StructSize3Align1(
threeBytes: Uint8List.fromList([0x1, 0x2, 0x3])))),
kXUnionWithStructStruct_Type,
Uint8List.fromList([
0x14, 0x5c, 0x3e, 0x19, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'XUnionWithStruct_v1',
XUnionWithStructStruct(
xu: XUnionWithStruct.withS(StructSize3Align1(
threeBytes: Uint8List.fromList([0x1, 0x2, 0x3])))),
kXUnionWithStructStruct_Type,
Uint8List.fromList([
0x14, 0x5c, 0x3e, 0x19, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'ArrayStruct_old',
ArrayStruct(unions: [
StringUnion.withS('one'),
StringUnion.withS('two'),
StringUnion.withS('three')
], optionalUnions: [
StringUnion.withS('four'),
StringUnion.withS('five'),
StringUnion.withS('six')
]),
kArrayStruct_Type,
Uint8List.fromList([
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x6f, 0x6e, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x74, 0x77, 0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x74, 0x68, 0x72, 0x65, 0x65, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x66, 0x6f, 0x75, 0x72, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x66, 0x69, 0x76, 0x65, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x73, 0x69, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'ArrayStruct_v1',
ArrayStruct(unions: [
StringUnion.withS('one'),
StringUnion.withS('two'),
StringUnion.withS('three')
], optionalUnions: [
StringUnion.withS('four'),
StringUnion.withS('five'),
StringUnion.withS('six')
]),
kArrayStruct_Type,
Uint8List.fromList([
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x6f, 0x6e, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x74, 0x77, 0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x74, 0x68, 0x72, 0x65, 0x65, 0x00, 0x00, 0x00, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x66, 0x6f, 0x75, 0x72, 0x00, 0x00, 0x00, 0x00, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x66, 0x69, 0x76, 0x65, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x73, 0x69, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'TransformerEmptyStruct_old',
TransformerEmptyStruct(),
kTransformerEmptyStruct_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'TransformerEmptyStruct_v1',
TransformerEmptyStruct(),
kTransformerEmptyStruct_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'EmptyStructUnion_old',
EmptyStructUnionStruct(
u: EmptyStructUnion.withEs(TransformerEmptyStruct())),
kEmptyStructUnionStruct_Type,
Uint8List.fromList([
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'EmptyStructUnion_v1',
EmptyStructUnionStruct(
u: EmptyStructUnion.withEs(TransformerEmptyStruct())),
kEmptyStructUnionStruct_Type,
Uint8List.fromList([
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'NoCodingTablesStressor_old',
NoCodingTablesStressor(
f1: 0x1111111111111111,
f2: 0x2222222222222222,
u1: UnionSize36Align4.withVariant(Uint8List.fromList([
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33
])),
f3: 0x4444444444444444,
f4: 0x5555555555555555,
u2: UnionSize36Align4.withVariant(Uint8List.fromList([
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66
])),
f5: 0x7777777777777777,
f6: 0x8888888888888888,
u3: UnionSize36Align4.withVariant(Uint8List.fromList([
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99
])),
f7: 0xaaaaaaaaaaaaaaaa,
p1: Size8Align8(data: 0xeeeeeeeeeeeeeeee),
f8: 0xbbbbbbbbbbbbbbbb,
p2: Size8Align8(data: 0xeeeeeeeeeeeeeeee),
f9: 0xdddddddddddddddd),
kNoCodingTablesStressor_Type,
Uint8List.fromList([
0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, //
0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, //
0x03, 0x00, 0x00, 0x00, 0x33, 0x33, 0x33, 0x33, //
0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, //
0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, //
0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, //
0x33, 0x33, 0x33, 0x33, 0x00, 0x00, 0x00, 0x00, //
0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, //
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, //
0x03, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, //
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, //
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, //
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, //
0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, //
0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, //
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, //
0x03, 0x00, 0x00, 0x00, 0x99, 0x99, 0x99, 0x99, //
0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, //
0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, //
0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, //
0x99, 0x99, 0x99, 0x99, 0x00, 0x00, 0x00, 0x00, //
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, //
0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, //
0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'NoCodingTablesStressor_v1',
NoCodingTablesStressor(
f1: 0x1111111111111111,
f2: 0x2222222222222222,
u1: UnionSize36Align4.withVariant(Uint8List.fromList([
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33,
0x33
])),
f3: 0x4444444444444444,
f4: 0x5555555555555555,
u2: UnionSize36Align4.withVariant(Uint8List.fromList([
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66,
0x66
])),
f5: 0x7777777777777777,
f6: 0x8888888888888888,
u3: UnionSize36Align4.withVariant(Uint8List.fromList([
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99,
0x99
])),
f7: 0xaaaaaaaaaaaaaaaa,
p1: Size8Align8(data: 0xeeeeeeeeeeeeeeee),
f8: 0xbbbbbbbbbbbbbbbb,
p2: Size8Align8(data: 0xeeeeeeeeeeeeeeee),
f9: 0xdddddddddddddddd),
kNoCodingTablesStressor_Type,
Uint8List.fromList([
0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, //
0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, //
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, //
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, //
0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, //
0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, //
0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, //
0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, //
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, //
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, //
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, //
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, //
0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, //
0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, //
0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, //
0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, //
0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, //
0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, //
]));
DecodeSuccessCase.run(
Decoders.old,
'OutOfLineSandwich1Case1_old',
OutOfLineSandwich1(
before: 'soft migrations rock!',
v: [
Sandwich1(
before: 0x4030201,
theUnion: UnionSize8Align4.withVariant(0xc0b0a09),
after: 0x8070605)
],
after: 'hard transitions suck!'),
kOutOfLineSandwich1_Type,
Uint8List.fromList([
0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x73, 0x6f, 0x66, 0x74, 0x20, 0x6d, 0x69, 0x67, //
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, //
0x72, 0x6f, 0x63, 0x6b, 0x21, 0x00, 0x00, 0x00, //
0x01, 0x02, 0x03, 0x04, 0x02, 0x00, 0x00, 0x00, //
0x09, 0x0a, 0x0b, 0x0c, 0x05, 0x06, 0x07, 0x08, //
0x68, 0x61, 0x72, 0x64, 0x20, 0x74, 0x72, 0x61, //
0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, //
0x20, 0x73, 0x75, 0x63, 0x6b, 0x21, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'OutOfLineSandwich1Case1_v1',
OutOfLineSandwich1(
before: 'soft migrations rock!',
v: [
Sandwich1(
before: 0x4030201,
theUnion: UnionSize8Align4.withVariant(0xc0b0a09),
after: 0x8070605)
],
after: 'hard transitions suck!'),
kOutOfLineSandwich1_Type,
Uint8List.fromList([
0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x73, 0x6f, 0x66, 0x74, 0x20, 0x6d, 0x69, 0x67, //
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, //
0x72, 0x6f, 0x63, 0x6b, 0x21, 0x00, 0x00, 0x00, //
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x09, 0x0a, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, //
0x68, 0x61, 0x72, 0x64, 0x20, 0x74, 0x72, 0x61, //
0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, //
0x20, 0x73, 0x75, 0x63, 0x6b, 0x21, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'OutOfLineSandwich1WithOptUnionPresent_old',
OutOfLineSandwich1WithOptUnion(
before: 'soft migrations rock!',
v: [
Sandwich1WithOptUnion(
before: 0x4030201,
optUnion: UnionSize8Align4.withVariant(0xc0b0a09),
after: 0x8070605)
],
after: 'hard transitions suck!'),
kOutOfLineSandwich1WithOptUnion_Type,
Uint8List.fromList([
0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x73, 0x6f, 0x66, 0x74, 0x20, 0x6d, 0x69, 0x67, //
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, //
0x72, 0x6f, 0x63, 0x6b, 0x21, 0x00, 0x00, 0x00, //
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, 0x09, 0x0a, 0x0b, 0x0c, //
0x68, 0x61, 0x72, 0x64, 0x20, 0x74, 0x72, 0x61, //
0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, //
0x20, 0x73, 0x75, 0x63, 0x6b, 0x21, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'OutOfLineSandwich1WithOptUnionPresent_v1',
OutOfLineSandwich1WithOptUnion(
before: 'soft migrations rock!',
v: [
Sandwich1WithOptUnion(
before: 0x4030201,
optUnion: UnionSize8Align4.withVariant(0xc0b0a09),
after: 0x8070605)
],
after: 'hard transitions suck!'),
kOutOfLineSandwich1WithOptUnion_Type,
Uint8List.fromList([
0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x73, 0x6f, 0x66, 0x74, 0x20, 0x6d, 0x69, 0x67, //
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, //
0x72, 0x6f, 0x63, 0x6b, 0x21, 0x00, 0x00, 0x00, //
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x09, 0x0a, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, //
0x68, 0x61, 0x72, 0x64, 0x20, 0x74, 0x72, 0x61, //
0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, //
0x20, 0x73, 0x75, 0x63, 0x6b, 0x21, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'OutOfLineSandwich1WithOptUnionAbsent_old',
OutOfLineSandwich1WithOptUnion(
before: 'soft migrations rock!',
v: [Sandwich1WithOptUnion(before: 0x4030201, after: 0x8070605)],
after: 'hard transitions suck!'),
kOutOfLineSandwich1WithOptUnion_Type,
Uint8List.fromList([
0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x73, 0x6f, 0x66, 0x74, 0x20, 0x6d, 0x69, 0x67, //
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, //
0x72, 0x6f, 0x63, 0x6b, 0x21, 0x00, 0x00, 0x00, //
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x68, 0x61, 0x72, 0x64, 0x20, 0x74, 0x72, 0x61, //
0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, //
0x20, 0x73, 0x75, 0x63, 0x6b, 0x21, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'OutOfLineSandwich1WithOptUnionAbsent_v1',
OutOfLineSandwich1WithOptUnion(
before: 'soft migrations rock!',
v: [Sandwich1WithOptUnion(before: 0x4030201, after: 0x8070605)],
after: 'hard transitions suck!'),
kOutOfLineSandwich1WithOptUnion_Type,
Uint8List.fromList([
0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x73, 0x6f, 0x66, 0x74, 0x20, 0x6d, 0x69, 0x67, //
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, //
0x72, 0x6f, 0x63, 0x6b, 0x21, 0x00, 0x00, 0x00, //
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x68, 0x61, 0x72, 0x64, 0x20, 0x74, 0x72, 0x61, //
0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, //
0x20, 0x73, 0x75, 0x63, 0x6b, 0x21, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Regression4_old',
Regression4(
f1: 0x1,
f2: 0x2,
s1: StructSize3Align1(
threeBytes: Uint8List.fromList([0x9, 0xa, 0xb])),
f3: 0x3,
f4: 0x4,
f5: 0x5,
f6: 0x6),
kRegression4_Type,
Uint8List.fromList([
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, //
0x09, 0x0a, 0x0b, 0x03, 0x04, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Regression4_v1',
Regression4(
f1: 0x1,
f2: 0x2,
s1: StructSize3Align1(
threeBytes: Uint8List.fromList([0x9, 0xa, 0xb])),
f3: 0x3,
f4: 0x4,
f5: 0x5,
f6: 0x6),
kRegression4_Type,
Uint8List.fromList([
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, //
0x09, 0x0a, 0x0b, 0x03, 0x04, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Sandwich4Align8_old',
Sandwich4Align8(
sandwich4: Sandwich4(
before: 0x4030201,
theUnion: UnionSize36Align4.withVariant(Uint8List.fromList([
0xa0,
0xa1,
0xa2,
0xa3,
0xa4,
0xa5,
0xa6,
0xa7,
0xa8,
0xa9,
0xaa,
0xab,
0xac,
0xad,
0xae,
0xaf,
0xb0,
0xb1,
0xb2,
0xb3,
0xb4,
0xb5,
0xb6,
0xb7,
0xb8,
0xb9,
0xba,
0xbb,
0xbc,
0xbd,
0xbe,
0xbf
])),
after: 0x8070605),
alignment8Enforcement: 0x100f0e0d0c0b0a09),
kSandwich4Align8_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x03, 0x00, 0x00, 0x00, //
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, //
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, //
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, //
0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Sandwich4Align8_v1',
Sandwich4Align8(
sandwich4: Sandwich4(
before: 0x4030201,
theUnion: UnionSize36Align4.withVariant(Uint8List.fromList([
0xa0,
0xa1,
0xa2,
0xa3,
0xa4,
0xa5,
0xa6,
0xa7,
0xa8,
0xa9,
0xaa,
0xab,
0xac,
0xad,
0xae,
0xaf,
0xb0,
0xb1,
0xb2,
0xb3,
0xb4,
0xb5,
0xb6,
0xb7,
0xb8,
0xb9,
0xba,
0xbb,
0xbc,
0xbd,
0xbe,
0xbf
])),
after: 0x8070605),
alignment8Enforcement: 0x100f0e0d0c0b0a09),
kSandwich4Align8_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, //
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, //
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, //
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, //
0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Sandwich4Align8WithPointer_old',
Sandwich4Align8WithPointer(
sandwich4: Sandwich4(
before: 0x4030201,
theUnion: UnionSize36Align4.withVariant(Uint8List.fromList([
0xa0,
0xa1,
0xa2,
0xa3,
0xa4,
0xa5,
0xa6,
0xa7,
0xa8,
0xa9,
0xaa,
0xab,
0xac,
0xad,
0xae,
0xaf,
0xb0,
0xb1,
0xb2,
0xb3,
0xb4,
0xb5,
0xb6,
0xb7,
0xb8,
0xb9,
0xba,
0xbb,
0xbc,
0xbd,
0xbe,
0xbf
])),
after: 0x8070605),
alignment8Enforcement: Size8Align8(data: 0x100f0e0d0c0b0a09)),
kSandwich4Align8WithPointer_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x03, 0x00, 0x00, 0x00, //
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, //
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, //
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, //
0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Sandwich4Align8WithPointer_v1',
Sandwich4Align8WithPointer(
sandwich4: Sandwich4(
before: 0x4030201,
theUnion: UnionSize36Align4.withVariant(Uint8List.fromList([
0xa0,
0xa1,
0xa2,
0xa3,
0xa4,
0xa5,
0xa6,
0xa7,
0xa8,
0xa9,
0xaa,
0xab,
0xac,
0xad,
0xae,
0xaf,
0xb0,
0xb1,
0xb2,
0xb3,
0xb4,
0xb5,
0xb6,
0xb7,
0xb8,
0xb9,
0xba,
0xbb,
0xbc,
0xbd,
0xbe,
0xbf
])),
after: 0x8070605),
alignment8Enforcement: Size8Align8(data: 0x100f0e0d0c0b0a09)),
kSandwich4Align8WithPointer_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, //
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, //
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, //
0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, //
0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Sandwich8Case1_old',
Sandwich8(
before: 0x4030201,
unionOfUnion: UnionOfUnion.withSize8align4(
UnionSize8Align4.withVariant(0xc0b0a09)),
after: 0x8070605),
kSandwich8_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, 0x09, 0x0a, 0x0b, 0x0c, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Sandwich8Case1_v1',
Sandwich8(
before: 0x4030201,
unionOfUnion: UnionOfUnion.withSize8align4(
UnionSize8Align4.withVariant(0xc0b0a09)),
after: 0x8070605),
kSandwich8_Type,
Uint8List.fromList([
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x09, 0x0a, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'Sandwich9Case1_old',
Sandwich9(
before: 0x201,
theUnion: UnionWithVectorOfVectors.withV([
[
StructSize3Align1(
threeBytes: Uint8List.fromList([0x10, 0x11, 0x12])),
StructSize3Align1(
threeBytes: Uint8List.fromList([0x13, 0x14, 0x15]))
]
]),
after: 0x1211),
kSandwich9_Type,
Uint8List.fromList([
0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x11, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x10, 0x11, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x13, 0x14, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'Sandwich9Case1_v1',
Sandwich9(
before: 0x201,
theUnion: UnionWithVectorOfVectors.withV([
[
StructSize3Align1(
threeBytes: Uint8List.fromList([0x10, 0x11, 0x12])),
StructSize3Align1(
threeBytes: Uint8List.fromList([0x13, 0x14, 0x15]))
]
]),
after: 0x1211),
kSandwich9_Type,
Uint8List.fromList([
0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x11, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x10, 0x11, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x13, 0x14, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'SimpleTableArrayStruct_old',
SimpleTableArrayStruct(theArray: [
TransformerSimpleTable(value: 0xa3a2a1a0),
TransformerSimpleTable(value: 0xb3b2b1b0)
]),
kSimpleTableArrayStruct_Type,
Uint8List.fromList([
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xa0, 0xa1, 0xa2, 0xa3, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xb0, 0xb1, 0xb2, 0xb3, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'SimpleTableArrayStruct_v1',
SimpleTableArrayStruct(theArray: [
TransformerSimpleTable(value: 0xa3a2a1a0),
TransformerSimpleTable(value: 0xb3b2b1b0)
]),
kSimpleTableArrayStruct_Type,
Uint8List.fromList([
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xa0, 0xa1, 0xa2, 0xa3, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xb0, 0xb1, 0xb2, 0xb3, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'StringUnionVector_old',
StringUnionVector(theVector: [
StringUnion.withS('hello'),
StringUnion.withU8(0xaa),
StringUnion.withU8(0xbb)
]),
kStringUnionVector_Type,
Uint8List.fromList([
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xbb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'StringUnionVector_v1',
StringUnionVector(theVector: [
StringUnion.withS('hello'),
StringUnion.withU8(0xaa),
StringUnion.withU8(0xbb)
]),
kStringUnionVector_Type,
Uint8List.fromList([
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x00, 0x00, 0x00, //
0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xbb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'CreateComponentRequest_old',
CreateComponentRequest(
launchInfo: LaunchInfo(
url:
'fuchsia-pkg://fuchsia.com/fidl_compatibility_test_server_rust_write_xunion#meta/fidl_compatibility_test_server_rust_write_xunion.cmx',
directoryRequest: 0xffffffff),
controller: 0xffffffff),
kCreateComponentRequest_Type,
Uint8List.fromList([
0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, //
0x66, 0x75, 0x63, 0x68, 0x73, 0x69, 0x61, 0x2d, //
0x70, 0x6b, 0x67, 0x3a, 0x2f, 0x2f, 0x66, 0x75, //
0x63, 0x68, 0x73, 0x69, 0x61, 0x2e, 0x63, 0x6f, //
0x6d, 0x2f, 0x66, 0x69, 0x64, 0x6c, 0x5f, 0x63, //
0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, //
0x6c, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x65, 0x73, //
0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, //
0x5f, 0x72, 0x75, 0x73, 0x74, 0x5f, 0x77, 0x72, //
0x69, 0x74, 0x65, 0x5f, 0x78, 0x75, 0x6e, 0x69, //
0x6f, 0x6e, 0x23, 0x6d, 0x65, 0x74, 0x61, 0x2f, //
0x66, 0x69, 0x64, 0x6c, 0x5f, 0x63, 0x6f, 0x6d, //
0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, //
0x74, 0x79, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, //
0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x72, //
0x75, 0x73, 0x74, 0x5f, 0x77, 0x72, 0x69, 0x74, //
0x65, 0x5f, 0x78, 0x75, 0x6e, 0x69, 0x6f, 0x6e, //
0x2e, 0x63, 0x6d, 0x78, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'CreateComponentRequest_v1',
CreateComponentRequest(
launchInfo: LaunchInfo(
url:
'fuchsia-pkg://fuchsia.com/fidl_compatibility_test_server_rust_write_xunion#meta/fidl_compatibility_test_server_rust_write_xunion.cmx',
directoryRequest: 0xffffffff),
controller: 0xffffffff),
kCreateComponentRequest_Type,
Uint8List.fromList([
0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, //
0x66, 0x75, 0x63, 0x68, 0x73, 0x69, 0x61, 0x2d, //
0x70, 0x6b, 0x67, 0x3a, 0x2f, 0x2f, 0x66, 0x75, //
0x63, 0x68, 0x73, 0x69, 0x61, 0x2e, 0x63, 0x6f, //
0x6d, 0x2f, 0x66, 0x69, 0x64, 0x6c, 0x5f, 0x63, //
0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, //
0x6c, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x65, 0x73, //
0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, //
0x5f, 0x72, 0x75, 0x73, 0x74, 0x5f, 0x77, 0x72, //
0x69, 0x74, 0x65, 0x5f, 0x78, 0x75, 0x6e, 0x69, //
0x6f, 0x6e, 0x23, 0x6d, 0x65, 0x74, 0x61, 0x2f, //
0x66, 0x69, 0x64, 0x6c, 0x5f, 0x63, 0x6f, 0x6d, //
0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, //
0x74, 0x79, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, //
0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x72, //
0x75, 0x73, 0x74, 0x5f, 0x77, 0x72, 0x69, 0x74, //
0x65, 0x5f, 0x78, 0x75, 0x6e, 0x69, 0x6f, 0x6e, //
0x2e, 0x63, 0x6d, 0x78, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'UnionWithBoundString_old',
UnionWithBoundStringStruct(
v: UnionWithBoundString.withBoundFiveStr('abcd')),
kUnionWithBoundStringStruct_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x61, 0x62, 0x63, 0x64, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'UnionWithBoundString_v1',
UnionWithBoundStringStruct(
v: UnionWithBoundString.withBoundFiveStr('abcd')),
kUnionWithBoundStringStruct_Type,
Uint8List.fromList([
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x61, 0x62, 0x63, 0x64, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'UnionMigration_SingleVariant_old',
SingleVariantUnionStruct(u: SingleVariantUnion.withX(0x2a)),
kSingleVariantUnionStruct_Type,
Uint8List.fromList([
0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'UnionMigration_SingleVariant_v1',
SingleVariantUnionStruct(u: SingleVariantUnion.withX(0x2a)),
kSingleVariantUnionStruct_Type,
Uint8List.fromList([
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.old,
'ReverseOrdinalUnion_old',
ReverseOrdinalUnionStruct(u: ReverseOrdinalUnion.withX(0x2a)),
kReverseOrdinalUnionStruct_Type,
Uint8List.fromList([
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
DecodeSuccessCase.run(
Decoders.v1,
'ReverseOrdinalUnion_v1',
ReverseOrdinalUnionStruct(u: ReverseOrdinalUnion.withX(0x2a)),
kReverseOrdinalUnionStruct_Type,
Uint8List.fromList([
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]));
});
group('encode failure cases', () {
EncodeFailureCase.run(
Encoders.old,
'StringExceedsLimit_old',
Length2StringWrapper(length2String: 'abc'),
kLength2StringWrapper_Type,
fidl.FidlErrorCode.fidlStringTooLong);
EncodeFailureCase.run(
Encoders.v1,
'StringExceedsLimit_v1',
Length2StringWrapper(length2String: 'abc'),
kLength2StringWrapper_Type,
fidl.FidlErrorCode.fidlStringTooLong);
EncodeFailureCase.run(
Encoders.old,
'UnionWithBoundString_ExceedsBounds_old',
UnionWithBoundStringStruct(
v: UnionWithBoundString.withBoundFiveStr('abcdef')),
kUnionWithBoundStringStruct_Type,
fidl.FidlErrorCode.fidlStringTooLong);
EncodeFailureCase.run(
Encoders.v1,
'UnionWithBoundString_ExceedsBounds_v1',
UnionWithBoundStringStruct(
v: UnionWithBoundString.withBoundFiveStr('abcdef')),
kUnionWithBoundStringStruct_Type,
fidl.FidlErrorCode.fidlStringTooLong);
});
group('decode failure cases', () {
DecodeFailureCase.run(
Decoders.old,
'StrictXUnion Field Unknown_old',
kTestStrictXUnionInStruct_Type,
Uint8List.fromList([
0x11, 0xba, 0x5e, 0xba, 0x00, 0x00, 0x00, 0x00, //
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //
0xde, 0xad, 0xbe, 0xef, 0x5c, 0xa1, 0xab, 0x1e, //
]),
fidl.FidlErrorCode.fidlStrictXUnionUnknownField);
DecodeFailureCase.run(
Decoders.old,
'NonEmptyStringWithNullPtrBody_old',
kStringWrapper_Type,
Uint8List.fromList([
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
]),
fidl.FidlErrorCode.fidlNonNullableTypeWithNullValue);
});
});
}