blob: 80653c2ddf06b61a1f747a3f6c26762165029c4f [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.
#include <lib/fidl/transformer.h>
#include <cstring>
#include <iostream>
#include <unittest/unittest.h>
#include "generated/transformer_tables.test.h"
namespace {
bool cmp_payload(const uint8_t* actual, size_t actual_size, const uint8_t* expected,
size_t expected_size) {
bool pass = true;
for (size_t i = 0; i < actual_size && i < expected_size; i++) {
if (actual[i] != expected[i]) {
pass = false;
std::cout << std::dec << "element[" << i << "]: " << std::hex << "actual=0x" << +actual[i]
<< " "
<< "expected=0x" << +expected[i] << "\n";
}
}
if (actual_size != expected_size) {
pass = false;
std::cout << std::dec << "element[...]: "
<< "actual.size=" << +actual_size << " "
<< "expected.size=" << +expected_size << "\n";
}
return pass;
}
uint8_t sandwich1_case1_v1[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich1.before
0x00, 0x00, 0x00, 0x00, // Sandwich1.before (padding)
0x03, 0x00, 0x00, 0x00, // UnionSize8Aligned4.tag, i.e. Sandwich1.the_union
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.padding
0x08, 0x00, 0x00, 0x00, // UnionSize8Aligned4.env.num_bytes
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.env.num_handle
0xff, 0xff, 0xff, 0xff, // UnionSize8Aligned4.env.presence
0xff, 0xff, 0xff, 0xff, // UnionSize8Aligned4.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich1.after
0x00, 0x00, 0x00, 0x00, // Sandwich1.after (padding)
0x09, 0x0a, 0x0b, 0x0c, // UnionSize8Aligned4.data, i.e. Sandwich1.the_union.data
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.data (padding)
};
uint8_t sandwich1_case1_old[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich1.before
0x02, 0x00, 0x00, 0x00, // UnionSize8Aligned4.tag, i.e. Sandwich1.the_union
0x09, 0x0a, 0x0b, 0x0c, // UnionSize8Aligned4.data
0x05, 0x06, 0x07, 0x08, // Sandwich1.after
};
uint8_t sandwich1_case1_with_hdr_v1[] = {
0xf0, 0xf1, 0xf2, 0xf3, // Fake transaction header
0xf4, 0xf5, 0xf6, 0xf7, // [cont.]
0xf8, 0xf9, 0xfa, 0xfb, // [cont.]
0xfc, 0xfd, 0xfe, 0xff, // [cont.]
0x01, 0x02, 0x03, 0x04, // Sandwich1.before
0x00, 0x00, 0x00, 0x00, // Sandwich1.before (padding)
0x03, 0x00, 0x00, 0x00, // UnionSize8Aligned4.tag, i.e. Sandwich1.the_union
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.padding
0x08, 0x00, 0x00, 0x00, // UnionSize8Aligned4.env.num_bytes
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.env.num_handle
0xff, 0xff, 0xff, 0xff, // UnionSize8Aligned4.env.presence
0xff, 0xff, 0xff, 0xff, // UnionSize8Aligned4.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich1.after
0x00, 0x00, 0x00, 0x00, // Sandwich1.after (padding)
0x09, 0x0a, 0x0b, 0x0c, // UnionSize8Aligned4.data, i.e. Sandwich1.the_union.data
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.data (padding)
};
uint8_t sandwich1_case1_with_hdr_old[] = {
0xf0, 0xf1, 0xf2, 0xf3, // Fake transaction header
0xf4, 0xf5, 0xf6, 0xf7, // [cont.]
0xf8, 0xf9, 0xfa, 0xfb, // [cont.]
0xfc, 0xfd, 0xfe, 0xff, // [cont.]
0x01, 0x02, 0x03, 0x04, // Sandwich1.before
0x02, 0x00, 0x00, 0x00, // UnionSize8Aligned4.tag, i.e. Sandwich1.the_union
0x09, 0x0a, 0x0b, 0x0c, // UnionSize8Aligned4.data
0x05, 0x06, 0x07, 0x08, // Sandwich1.after
};
uint8_t sandwich1_with_opt_union_present_v1[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich1WithOptUnion.before
0x00, 0x00, 0x00, 0x00, // Sandwich1WithOptUnion.before (padding)
0x03, 0x00, 0x00, 0x00, // UnionSize8Aligned4.tag, i.e. Sandwich1WithOptUnion.union
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.padding
0x08, 0x00, 0x00, 0x00, // UnionSize8Aligned4.env.num_bytes
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.env.num_handle
0xff, 0xff, 0xff, 0xff, // UnionSize8Aligned4.env.presence (present)
0xff, 0xff, 0xff, 0xff, // UnionSize8Aligned4.presence (present) [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich1WithOptUnion.after
0x00, 0x00, 0x00, 0x00, // Sandwich1WithOptUnion.after (padding)
0x09, 0x0a, 0x0b, 0x0c, // UnionSize8Aligned4.data, i.e. Sandwich1WithOptUnion.union.data
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.data (padding)
};
uint8_t sandwich1_with_opt_union_present_old[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich1WithOptUnion.before
0x00, 0x00, 0x00, 0x00, // Sandwich1WithOptUnion.before (padding)
0xff, 0xff, 0xff, 0xff, // Sandwich1WithOptUnion.opt_union (present)
0xff, 0xff, 0xff, 0xff, // Sandwich1WithOptUnion.opt_union (present) [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich1WithOptUnion.after
0x00, 0x00, 0x00, 0x00, // Sandwich1WithOptUnion.after (padding)
0x02, 0x00, 0x00, 0x00, // UnionSize8Aligned4.tag, i.e. Sandwich1WithOptUnion.opt_union
0x09, 0x0a, 0x0b, 0x0c, // UnionSize8Aligned4.data
};
uint8_t sandwich1_with_opt_union_absent_v1[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich1WithOptUnion.before
0x00, 0x00, 0x00, 0x00, // Sandwich1WithOptUnion.before (padding)
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.tag, i.e. Sandwich1WithOptUnion.opt_union
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.padding
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.env.num_bytes
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.env.num_handle
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.env.presence (absent)
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.env.presence (preabsentsent) [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich1WithOptUnion.after
0x00, 0x00, 0x00, 0x00, // Sandwich1WithOptUnion.after (padding)
};
uint8_t sandwich1_with_opt_union_absent_old[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich1WithOptUnion.before
0x00, 0x00, 0x00, 0x00, // Sandwich1WithOptUnion.before (padding)
0x00, 0x00, 0x00, 0x00, // Sandwich1WithOptUnion.opt_union (absent)
0x00, 0x00, 0x00, 0x00, // Sandwich1WithOptUnion.opt_union (absent) [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich1WithOptUnion.after
0x00, 0x00, 0x00, 0x00, // Sandwich1WithOptUnion.after (padding)
};
uint8_t sandwich2_case1_v1[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich2.before
0x00, 0x00, 0x00, 0x00, // Sandwich2.before (padding)
0x04, 0x00, 0x00, 0x00, // UnionSize12Aligned4.tag, i.e. Sandwich2.the_union
0x00, 0x00, 0x00, 0x00, // UnionSize12Aligned4.padding
0x08, 0x00, 0x00, 0x00, // UnionSize12Aligned4.env.num_bytes
0x00, 0x00, 0x00, 0x00, // UnionSize12Aligned4.env.num_handle
0xff, 0xff, 0xff, 0xff, // UnionSize12Aligned4.env.presence
0xff, 0xff, 0xff, 0xff, // UnionSize12Aligned4.env.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich2.after
0x00, 0x00, 0x00, 0x00, // Sandwich2.after (padding)
0xa0, 0xa1, 0xa2, 0xa3, // UnionSize12Aligned4.data, i.e. Sandwich2.the_union.data
0xa4, 0xa5, 0x00, 0x00, // UnionSize12Aligned4.data [cont.] and padding
};
uint8_t sandwich2_case1_old[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich2.before
0x03, 0x00, 0x00, 0x00, // UnionSize12Aligned4.tag, i.e. Sandwich2.the_union
0xa0, 0xa1, 0xa2, 0xa3, // UnionSize12Aligned4.data
0xa4, 0xa5, 0x00, 0x00, // UnionSize12Aligned4.data [cont.] and padding
0x05, 0x06, 0x07, 0x08, // Sandwich2.after
0x00, 0x00, 0x00, 0x00, // padding for top-level struct
};
uint8_t sandwich3_case1_v1[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich3.before
0x00, 0x00, 0x00, 0x00, // Sandwich3.before (padding)
0x04, 0x00, 0x00, 0x00, // UnionSize24Alignment8.tag, i.e. Sandwich2.the_union
0x00, 0x00, 0x00, 0x00, // UnionSize24Alignment8.padding
0x10, 0x00, 0x00, 0x00, // UnionSize24Alignment8.env.num_bytes
0x00, 0x00, 0x00, 0x00, // UnionSize24Alignment8.env.num_handle
0xff, 0xff, 0xff, 0xff, // UnionSize24Alignment8.env.presence
0xff, 0xff, 0xff, 0xff, // UnionSize24Alignment8.env.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich3.after
0x00, 0x00, 0x00, 0x00, // Sandwich3.after (padding)
0xa0, 0xa1, 0xa2, 0xa3, // UnionSize24Alignment8.data, i.e Sandwich2.the_union.data
0xa4, 0xa5, 0xa6, 0xa7, // UnionSize24Alignment8.data [cont.]
0xa8, 0xa9, 0xaa, 0xab, // UnionSize24Alignment8.data [cont.]
0xac, 0xad, 0xae, 0xaf, // UnionSize24Alignment8.data [cont.]
};
uint8_t sandwich3_case1_old[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich3.before
0x00, 0x00, 0x00, 0x00, // Sandwich3.before (padding)
0x03, 0x00, 0x00, 0x00, // UnionSize24Alignment8.tag, i.e. Sandwich3.the_union
0x00, 0x00, 0x00, 0x00, // UnionSize24Alignment8.tag (padding)
0xa0, 0xa1, 0xa2, 0xa3, // UnionSize24Alignment8.data
0xa4, 0xa5, 0xa6, 0xa7, // UnionSize24Alignment8.data [cont.]
0xa8, 0xa9, 0xaa, 0xab, // UnionSize24Alignment8.data [cont.]
0xac, 0xad, 0xae, 0xaf, // UnionSize24Alignment8.data [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich3.after
0x00, 0x00, 0x00, 0x00, // Sandwich3.after (padding)
};
uint8_t sandwich4_case1_v1[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich4.before
0x00, 0x00, 0x00, 0x00, // Sandwich4.before (padding)
0x04, 0x00, 0x00, 0x00, // UnionSize36Alignment4.tag, i.e. Sandwich4.the_union
0x00, 0x00, 0x00, 0x00, // UnionSize36Alignment4.tag (padding)
0x20, 0x00, 0x00, 0x00, // UnionSize36Alignment4.env.num_bytes
0x00, 0x00, 0x00, 0x00, // UnionSize36Alignment4.env.num_handle
0xff, 0xff, 0xff, 0xff, // UnionSize36Alignment4.env.presence
0xff, 0xff, 0xff, 0xff, // UnionSize36Alignment4.env.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich4.after
0x00, 0x00, 0x00, 0x00, // Sandwich4.after (padding)
0xa0, 0xa1, 0xa2, 0xa3, // UnionSize36Alignment4.data, i.e. Sandwich4.the_union.data
0xa4, 0xa5, 0xa6, 0xa7, // UnionSize36Alignment4.data [cont.]
0xa8, 0xa9, 0xaa, 0xab, // UnionSize36Alignment4.data [cont.]
0xac, 0xad, 0xae, 0xaf, // UnionSize36Alignment4.data [cont.]
0xb0, 0xb1, 0xb2, 0xb3, // UnionSize36Alignment4.data [cont.]
0xb4, 0xb5, 0xb6, 0xb7, // UnionSize36Alignment4.data [cont.]
0xb8, 0xb9, 0xba, 0xbb, // UnionSize36Alignment4.data [cont.]
0xbc, 0xbd, 0xbe, 0xbf, // UnionSize36Alignment4.data [cont.]
};
uint8_t sandwich4_case1_old[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich4.before
0x03, 0x00, 0x00, 0x00, // UnionSize36Alignment4.tag, i.e. Sandwich4.the_union
0xa0, 0xa1, 0xa2, 0xa3, // UnionSize36Alignment4.data
0xa4, 0xa5, 0xa6, 0xa7, // UnionSize36Alignment4.data [cont.]
0xa8, 0xa9, 0xaa, 0xab, // UnionSize36Alignment4.data [cont.]
0xac, 0xad, 0xae, 0xaf, // UnionSize36Alignment4.data [cont.]
0xb0, 0xb1, 0xb2, 0xb3, // UnionSize36Alignment4.data [cont.]
0xb4, 0xb5, 0xb6, 0xb7, // UnionSize36Alignment4.data [cont.]
0xb8, 0xb9, 0xba, 0xbb, // UnionSize36Alignment4.data [cont.]
0xbc, 0xbd, 0xbe, 0xbf, // UnionSize36Alignment4.data [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich4.after
0x00, 0x00, 0x00, 0x00, // padding for top-level struct
};
uint8_t sandwich4align8_case1_v1[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich4.before 0x00
0x00, 0x00, 0x00, 0x00, // Sandwich4.before (padding)
0x04, 0x00, 0x00, 0x00, // UnionSize36Alignment4.tag, i.e. Sandwich4.the_union
0x00, 0x00, 0x00, 0x00, // UnionSize36Alignment4.tag (padding)
0x20, 0x00, 0x00, 0x00, // UnionSize36Alignment4.env.num_bytes 0x10
0x00, 0x00, 0x00, 0x00, // UnionSize36Alignment4.env.num_handle
0xff, 0xff, 0xff, 0xff, // UnionSize36Alignment4.env.presence
0xff, 0xff, 0xff, 0xff, // UnionSize36Alignment4.env.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich4.after 0x20
0x00, 0x00, 0x00, 0x00, // Sandwich4.after (padding)
0x09, 0x0a, 0x0b, 0x0c, // alignment8_enforcement
0x0d, 0x0e, 0x0f, 0x10, // alignment8_enforcement
0xa0, 0xa1, 0xa2, 0xa3, // UnionSize36Alignment4.data, i.e. Sandwich4.the_union.data 0x30
0xa4, 0xa5, 0xa6, 0xa7, // UnionSize36Alignment4.data [cont.]
0xa8, 0xa9, 0xaa, 0xab, // UnionSize36Alignment4.data [cont.]
0xac, 0xad, 0xae, 0xaf, // UnionSize36Alignment4.data [cont.]
0xb0, 0xb1, 0xb2, 0xb3, // UnionSize36Alignment4.data [cont.] 0x40
0xb4, 0xb5, 0xb6, 0xb7, // UnionSize36Alignment4.data [cont.]
0xb8, 0xb9, 0xba, 0xbb, // UnionSize36Alignment4.data [cont.]
0xbc, 0xbd, 0xbe, 0xbf, // UnionSize36Alignment4.data [cont.]
};
uint8_t sandwich4align8_case1_old[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich4.before 0x00
0x03, 0x00, 0x00, 0x00, // UnionSize36Alignment4.tag, i.e. Sandwich4.the_union
0xa0, 0xa1, 0xa2, 0xa3, // UnionSize36Alignment4.data
0xa4, 0xa5, 0xa6, 0xa7, // UnionSize36Alignment4.data [cont.]
0xa8, 0xa9, 0xaa, 0xab, // UnionSize36Alignment4.data [cont.] 0x10
0xac, 0xad, 0xae, 0xaf, // UnionSize36Alignment4.data [cont.]
0xb0, 0xb1, 0xb2, 0xb3, // UnionSize36Alignment4.data [cont.]
0xb4, 0xb5, 0xb6, 0xb7, // UnionSize36Alignment4.data [cont.]
0xb8, 0xb9, 0xba, 0xbb, // UnionSize36Alignment4.data [cont.] 0x20
0xbc, 0xbd, 0xbe, 0xbf, // UnionSize36Alignment4.data [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich4.after
0x00, 0x00, 0x00, 0x00, // Sandwich4.padding
0x09, 0x0a, 0x0b, 0x0c, // alignment8_enforcement 0x30
0x0d, 0x0e, 0x0f, 0x10, // alignment8_enforcement
};
uint8_t sandwich4align8withpointer_case1_v1[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich4.before 0x00
0x00, 0x00, 0x00, 0x00, // Sandwich4.before (padding)
0x04, 0x00, 0x00, 0x00, // UnionSize36Alignment4.tag, i.e. Sandwich4.the_union
0x00, 0x00, 0x00, 0x00, // UnionSize36Alignment4.tag (padding)
0x20, 0x00, 0x00, 0x00, // UnionSize36Alignment4.env.num_bytes 0x10
0x00, 0x00, 0x00, 0x00, // UnionSize36Alignment4.env.num_handle
0xff, 0xff, 0xff, 0xff, // UnionSize36Alignment4.env.presence
0xff, 0xff, 0xff, 0xff, // UnionSize36Alignment4.env.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich4.after 0x20
0x00, 0x00, 0x00, 0x00, // Sandwich4.after (padding)
0xff, 0xff, 0xff, 0xff, // alignment8_enforcement presence
0xff, 0xff, 0xff, 0xff, //
0xa0, 0xa1, 0xa2, 0xa3, // UnionSize36Alignment4.data, i.e. Sandwich4.the_union.data 0x30
0xa4, 0xa5, 0xa6, 0xa7, // UnionSize36Alignment4.data [cont.]
0xa8, 0xa9, 0xaa, 0xab, // UnionSize36Alignment4.data [cont.]
0xac, 0xad, 0xae, 0xaf, // UnionSize36Alignment4.data [cont.]
0xb0, 0xb1, 0xb2, 0xb3, // UnionSize36Alignment4.data [cont.] 0x40
0xb4, 0xb5, 0xb6, 0xb7, // UnionSize36Alignment4.data [cont.]
0xb8, 0xb9, 0xba, 0xbb, // UnionSize36Alignment4.data [cont.]
0xbc, 0xbd, 0xbe, 0xbf, // UnionSize36Alignment4.data [cont.]
0x09, 0x0a, 0x0b, 0x0c, // alignment8_enforcement 0x50
0x0d, 0x0e, 0x0f, 0x10, // alignment8_enforcement
};
uint8_t sandwich4align8withpointer_case1_old[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich4.before 0x00
0x03, 0x00, 0x00, 0x00, // UnionSize36Alignment4.tag, i.e. Sandwich4.the_union
0xa0, 0xa1, 0xa2, 0xa3, // UnionSize36Alignment4.data
0xa4, 0xa5, 0xa6, 0xa7, // UnionSize36Alignment4.data [cont.]
0xa8, 0xa9, 0xaa, 0xab, // UnionSize36Alignment4.data [cont.] 0x10
0xac, 0xad, 0xae, 0xaf, // UnionSize36Alignment4.data [cont.]
0xb0, 0xb1, 0xb2, 0xb3, // UnionSize36Alignment4.data [cont.]
0xb4, 0xb5, 0xb6, 0xb7, // UnionSize36Alignment4.data [cont.]
0xb8, 0xb9, 0xba, 0xbb, // UnionSize36Alignment4.data [cont.] 0x20
0xbc, 0xbd, 0xbe, 0xbf, // UnionSize36Alignment4.data [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich4.after
0x00, 0x00, 0x00, 0x00, // Sandwich4.padding
0xff, 0xff, 0xff, 0xff, // alignment8_enforcement presence 0x30
0xff, 0xff, 0xff, 0xff, //
0x09, 0x0a, 0x0b, 0x0c, // alignment8_enforcement 0x30
0x0d, 0x0e, 0x0f, 0x10, // alignment8_enforcement
};
uint8_t sandwich4_with_hdr_case1_v1[] = {
0x00, 0x00, 0x00, 0x00, // Fake transaction header 0x00
0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, //
0x01, 0x02, 0x03, 0x04, // Sandwich4.before 0x10
0x00, 0x00, 0x00, 0x00, // Sandwich4.before (padding)
0x04, 0x00, 0x00, 0x00, // UnionSize36Alignment4.tag, i.e. Sandwich4.the_union
0x00, 0x00, 0x00, 0x00, // UnionSize36Alignment4.tag (padding)
0x20, 0x00, 0x00, 0x00, // UnionSize36Alignment4.env.num_bytes 0x20
0x00, 0x00, 0x00, 0x00, // UnionSize36Alignment4.env.num_handle
0xff, 0xff, 0xff, 0xff, // UnionSize36Alignment4.env.presence
0xff, 0xff, 0xff, 0xff, // UnionSize36Alignment4.env.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich4.after 0x30
0x00, 0x00, 0x00, 0x00, // Sandwich4.after (padding)
0xa0, 0xa1, 0xa2, 0xa3, // UnionSize36Alignment4.data, i.e. Sandwich4.the_union.data
0xa4, 0xa5, 0xa6, 0xa7, // UnionSize36Alignment4.data [cont.]
0xa8, 0xa9, 0xaa, 0xab, // UnionSize36Alignment4.data [cont.] 0x40
0xac, 0xad, 0xae, 0xaf, // UnionSize36Alignment4.data [cont.]
0xb0, 0xb1, 0xb2, 0xb3, // UnionSize36Alignment4.data [cont.]
0xb4, 0xb5, 0xb6, 0xb7, // UnionSize36Alignment4.data [cont.]
0xb8, 0xb9, 0xba, 0xbb, // UnionSize36Alignment4.data [cont.] 0x50
0xbc, 0xbd, 0xbe, 0xbf, // UnionSize36Alignment4.data [cont.]
};
uint8_t sandwich4_with_hdr_case1_old[] = {
0x00, 0x00, 0x00, 0x00, // Fake transaction header 0x00
0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, //
0x01, 0x02, 0x03, 0x04, // Sandwich4.before 0x10
0x03, 0x00, 0x00, 0x00, // UnionSize36Alignment4.tag, i.e. Sandwich4.the_union
0xa0, 0xa1, 0xa2, 0xa3, // UnionSize36Alignment4.data
0xa4, 0xa5, 0xa6, 0xa7, // UnionSize36Alignment4.data [cont.]
0xa8, 0xa9, 0xaa, 0xab, // UnionSize36Alignment4.data [cont.] 0x20
0xac, 0xad, 0xae, 0xaf, // UnionSize36Alignment4.data [cont.]
0xb0, 0xb1, 0xb2, 0xb3, // UnionSize36Alignment4.data [cont.]
0xb4, 0xb5, 0xb6, 0xb7, // UnionSize36Alignment4.data [cont.]
0xb8, 0xb9, 0xba, 0xbb, // UnionSize36Alignment4.data [cont.] 0x30
0xbc, 0xbd, 0xbe, 0xbf, // UnionSize36Alignment4.data [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich4.after
0x00, 0x00, 0x00, 0x00, // padding for top-level struct
};
uint8_t sandwich5_case1_v1[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich5.before
0x00, 0x00, 0x00, 0x00, // Sandwich5.before (padding)
0x02, 0x00, 0x00, 0x00, // Sandwich5.UnionOfUnion.ordinal
0x00, 0x00, 0x00, 0x00, // Sandwich5.UnionOfUnion.padding
0x20, 0x00, 0x00, 0x00, // Sandwich5.UnionOfUnion.env.num_bytes
0x00, 0x00, 0x00, 0x00, // Sandwich5.UnionOfUnion.env.num_handle
0xff, 0xff, 0xff, 0xff, // Sandwich5.UnionOfUnion.env.presence
0xff, 0xff, 0xff, 0xff, // Sandwich5.UnionOfUnion.env.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich5.after
0x00, 0x00, 0x00, 0x00, // Sandwich5.after (padding)
0x03, 0x00, 0x00, 0x00, // UnionOfUnion.UnionSize8Aligned4.ordinal
0x00, 0x00, 0x00, 0x00, // UnionOfUnion.UnionSize8Aligned4.padding
0x08, 0x00, 0x00, 0x00, // UnionOfUnion.UnionSize8Aligned4.env.num_bytes
0x00, 0x00, 0x00, 0x00, // UnionOfUnion.UnionSize8Aligned4.env.num_handle
0xff, 0xff, 0xff, 0xff, // UnionOfUnion.UnionSize8Aligned4.env.presence
0xff, 0xff, 0xff, 0xff, // UnionOfUnion.UnionSize8Aligned4.env.presence [cont.]
0x09, 0x0a, 0x0b, 0x0c, // UnionOfUnion.UnionSize8Aligned4.data
0x00, 0x00, 0x00, 0x00, // UnionOfUnion.UnionSize8Aligned4.data (padding)
};
uint8_t sandwich5_case1_old[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich5.before
0x00, 0x00, 0x00, 0x00, // Sandwich5.before (padding)
0x01, 0x00, 0x00, 0x00, // Sandwich5.UnionOfUnion.tag
0x00, 0x00, 0x00, 0x00, // Sandwich5.UnionOfUnion.tag (padding)
0x02, 0x00, 0x00, 0x00, // UnionSize8Aligned4.tag, i.e Sandwich5.UnionOfUnion.data
0x09, 0x0a, 0x0b, 0x0c, // UnionSize8Aligned4.data
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.data (padding)
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.data (padding)
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.data (padding)
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.UnionSize8Aligned4.data (padding)
0x05, 0x06, 0x07, 0x08, // Sandwich5.after
0x00, 0x00, 0x00, 0x00, // Sandwich5.after (padding)
};
uint8_t sandwich5_case1_with_hdr_v1[] = {
0xf0, 0xf1, 0xf2, 0xf3, // Fake transaction header
0xf4, 0xf5, 0xf6, 0xf7, // [cont.]
0xf8, 0xf9, 0xfa, 0xfb, // [cont.]
0xfc, 0xfd, 0xfe, 0xff, // [cont.]
0x01, 0x02, 0x03, 0x04, // Sandwich5.before
0x00, 0x00, 0x00, 0x00, // Sandwich5.before (padding)
0x02, 0x00, 0x00, 0x00, // Sandwich5.UnionOfUnion.ordinal
0x00, 0x00, 0x00, 0x00, // Sandwich5.UnionOfUnion.padding
0x20, 0x00, 0x00, 0x00, // Sandwich5.UnionOfUnion.env.num_bytes
0x00, 0x00, 0x00, 0x00, // Sandwich5.UnionOfUnion.env.num_handle
0xff, 0xff, 0xff, 0xff, // Sandwich5.UnionOfUnion.env.presence
0xff, 0xff, 0xff, 0xff, // Sandwich5.UnionOfUnion.env.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich5.after
0x00, 0x00, 0x00, 0x00, // Sandwich5.after (padding)
0x03, 0x00, 0x00, 0x00, // UnionOfUnion.UnionSize8Aligned4.ordinal
0x00, 0x00, 0x00, 0x00, // UnionOfUnion.UnionSize8Aligned4.padding
0x08, 0x00, 0x00, 0x00, // UnionOfUnion.UnionSize8Aligned4.env.num_bytes
0x00, 0x00, 0x00, 0x00, // UnionOfUnion.UnionSize8Aligned4.env.num_handle
0xff, 0xff, 0xff, 0xff, // UnionOfUnion.UnionSize8Aligned4.env.presence
0xff, 0xff, 0xff, 0xff, // UnionOfUnion.UnionSize8Aligned4.env.presence [cont.]
0x09, 0x0a, 0x0b, 0x0c, // UnionOfUnion.UnionSize8Aligned4.data
0x00, 0x00, 0x00, 0x00, // UnionOfUnion.UnionSize8Aligned4.data (padding)
};
uint8_t sandwich5_case1_with_hdr_old[] = {
0xf0, 0xf1, 0xf2, 0xf3, // Fake transaction header
0xf4, 0xf5, 0xf6, 0xf7, // [cont.]
0xf8, 0xf9, 0xfa, 0xfb, // [cont.]
0xfc, 0xfd, 0xfe, 0xff, // [cont.]
0x01, 0x02, 0x03, 0x04, // Sandwich5.before
0x00, 0x00, 0x00, 0x00, // Sandwich5.before (padding)
0x01, 0x00, 0x00, 0x00, // Sandwich5.UnionOfUnion.tag
0x00, 0x00, 0x00, 0x00, // Sandwich5.UnionOfUnion.tag (padding)
0x02, 0x00, 0x00, 0x00, // UnionSize8Aligned4.tag, i.e Sandwich5.UnionOfUnion.data
0x09, 0x0a, 0x0b, 0x0c, // UnionSize8Aligned4.data
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.data (padding)
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.data (padding)
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.data (padding)
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.UnionSize8Aligned4.data (padding)
0x05, 0x06, 0x07, 0x08, // Sandwich5.after
0x00, 0x00, 0x00, 0x00, // Sandwich5.after (padding)
};
uint8_t sandwich5_case2_v1[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich5.before
0x00, 0x00, 0x00, 0x00, // Sandwich5.before (padding)
0x04, 0x00, 0x00, 0x00, // Sandwich5.UnionOfUnion.ordinal
0x00, 0x00, 0x00, 0x00, // Sandwich5.UnionOfUnion.padding
0x28, 0x00, 0x00, 0x00, // Sandwich5.UnionOfUnion.env.num_bytes
0x00, 0x00, 0x00, 0x00, // Sandwich5.UnionOfUnion.env.num_handle
0xff, 0xff, 0xff, 0xff, // Sandwich5.UnionOfUnion.env.presence
0xff, 0xff, 0xff, 0xff, // Sandwich5.UnionOfUnion.env.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich5.after
0x00, 0x00, 0x00, 0x00, // Sandwich5.after (padding)
0x04, 0x00, 0x00, 0x00, // UnionOfUnion.UnionSize24Alignment8.ordinal
0x00, 0x00, 0x00, 0x00, // UnionOfUnion.UnionSize24Alignment8.padding
0x10, 0x00, 0x00, 0x00, // UnionOfUnion.UnionSize24Alignment8.env.num_bytes
0x00, 0x00, 0x00, 0x00, // UnionOfUnion.UnionSize24Alignment8.env.num_handle
0xff, 0xff, 0xff, 0xff, // UnionOfUnion.UnionSize24Alignment8.env.presence
0xff, 0xff, 0xff, 0xff, // UnionOfUnion.UnionSize24Alignment8.env.presence [cont.]
0xa0, 0xa1, 0xa2, 0xa3, // UnionOfUnion.UnionSize24Alignment8.data
0xa4, 0xa5, 0xa6, 0xa7, // UnionOfUnion.UnionSize24Alignment8.data [cont.]
0xa8, 0xa9, 0xaa, 0xab, // UnionOfUnion.UnionSize24Alignment8.data [cont.]
0xac, 0xad, 0xae, 0xaf, // UnionOfUnion.UnionSize24Alignment8.data [cont.]
};
uint8_t sandwich5_case2_old[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich5.before
0x00, 0x00, 0x00, 0x00, // Sandwich5.before (padding)
0x03, 0x00, 0x00, 0x00, // Sandwich5.UnionOfUnion.tag
0x00, 0x00, 0x00, 0x00, // Sandwich5.UnionOfUnion.tag (padding)
0x03, 0x00, 0x00, 0x00, // UnionSize24Alignment8.tag, i.e Sandwich5.UnionOfUnion.data
0x00, 0x00, 0x00, 0x00, // UnionSize24Alignment8.tag (padding)
0xa0, 0xa1, 0xa2, 0xa3, // UnionSize24Alignment8.data
0xa4, 0xa5, 0xa6, 0xa7, // UnionSize24Alignment8.data [cont.]
0xa8, 0xa9, 0xaa, 0xab, // UnionSize24Alignment8.data [cont.]
0xac, 0xad, 0xae, 0xaf, // UnionSize24Alignment8.data [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich5.after
0x00, 0x00, 0x00, 0x00, // Sandwich5.after (padding)
};
uint8_t sandwich5_case2_with_hdr_v1[] = {
0xf0, 0xf1, 0xf2, 0xf3, // Fake transaction header
0xf4, 0xf5, 0xf6, 0xf7, // [cont.]
0xf8, 0xf9, 0xfa, 0xfb, // [cont.]
0xfc, 0xfd, 0xfe, 0xff, // [cont.]
0x01, 0x02, 0x03, 0x04, // Sandwich5.before
0x00, 0x00, 0x00, 0x00, // Sandwich5.before (padding)
0x04, 0x00, 0x00, 0x00, // Sandwich5.UnionOfUnion.ordinal
0x00, 0x00, 0x00, 0x00, // Sandwich5.UnionOfUnion.padding
0x28, 0x00, 0x00, 0x00, // Sandwich5.UnionOfUnion.env.num_bytes
0x00, 0x00, 0x00, 0x00, // Sandwich5.UnionOfUnion.env.num_handle
0xff, 0xff, 0xff, 0xff, // Sandwich5.UnionOfUnion.env.presence
0xff, 0xff, 0xff, 0xff, // Sandwich5.UnionOfUnion.env.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich5.after
0x00, 0x00, 0x00, 0x00, // Sandwich5.after (padding)
0x04, 0x00, 0x00, 0x00, // UnionOfUnion.UnionSize24Alignment8.ordinal
0x00, 0x00, 0x00, 0x00, // UnionOfUnion.UnionSize24Alignment8.padding
0x10, 0x00, 0x00, 0x00, // UnionOfUnion.UnionSize24Alignment8.env.num_bytes
0x00, 0x00, 0x00, 0x00, // UnionOfUnion.UnionSize24Alignment8.env.num_handle
0xff, 0xff, 0xff, 0xff, // UnionOfUnion.UnionSize24Alignment8.env.presence
0xff, 0xff, 0xff, 0xff, // UnionOfUnion.UnionSize24Alignment8.env.presence [cont.]
0xa0, 0xa1, 0xa2, 0xa3, // UnionOfUnion.UnionSize24Alignment8.data
0xa4, 0xa5, 0xa6, 0xa7, // UnionOfUnion.UnionSize24Alignment8.data [cont.]
0xa8, 0xa9, 0xaa, 0xab, // UnionOfUnion.UnionSize24Alignment8.data [cont.]
0xac, 0xad, 0xae, 0xaf, // UnionOfUnion.UnionSize24Alignment8.data [cont.]
};
uint8_t sandwich5_case2_with_hdr_old[] = {
0xf0, 0xf1, 0xf2, 0xf3, // Fake transaction header
0xf4, 0xf5, 0xf6, 0xf7, // [cont.]
0xf8, 0xf9, 0xfa, 0xfb, // [cont.]
0xfc, 0xfd, 0xfe, 0xff, // [cont.]
0x01, 0x02, 0x03, 0x04, // Sandwich5.before
0x00, 0x00, 0x00, 0x00, // Sandwich5.before (padding)
0x03, 0x00, 0x00, 0x00, // Sandwich5.UnionOfUnion.tag
0x00, 0x00, 0x00, 0x00, // Sandwich5.UnionOfUnion.tag (padding)
0x03, 0x00, 0x00, 0x00, // UnionSize24Alignment8.tag, i.e Sandwich5.UnionOfUnion.data
0x00, 0x00, 0x00, 0x00, // UnionSize24Alignment8.tag (padding)
0xa0, 0xa1, 0xa2, 0xa3, // UnionSize24Alignment8.data
0xa4, 0xa5, 0xa6, 0xa7, // UnionSize24Alignment8.data [cont.]
0xa8, 0xa9, 0xaa, 0xab, // UnionSize24Alignment8.data [cont.]
0xac, 0xad, 0xae, 0xaf, // UnionSize24Alignment8.data [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich5.after
0x00, 0x00, 0x00, 0x00, // Sandwich5.after (padding)
};
uint8_t sandwich6_case1_v1[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich6.before
0x00, 0x00, 0x00, 0x00, // Sandwich6.before (padding)
0x02, 0x00, 0x00, 0x00, // UnionWithVector.ordinal (start of Sandwich6.the_union)
0x00, 0x00, 0x00, 0x00, // UnionWithVector.ordinal (padding)
0x18, 0x00, 0x00, 0x00, // UnionWithVector.env.num_bytes
0x00, 0x00, 0x00, 0x00, // UnionWithVector.env.num_handle
0xff, 0xff, 0xff, 0xff, // UnionWithVector.env.presence
0xff, 0xff, 0xff, 0xff, // UnionWithVector.env.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich6.after
0x00, 0x00, 0x00, 0x00, // Sandwich6.after (padding)
0x06, 0x00, 0x00, 0x00, // vector<uint8>.size, i.e. Sandwich6.the_union.data
0x00, 0x00, 0x00, 0x00, // vector<uint8>.size [cont.]
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence [cont.]
0xa0, 0xa1, 0xa2, 0xa3, // vector<uint8>.data
0xa4, 0xa5, 0x00, 0x00, // vector<uint8>.data [cont.] + padding
};
uint8_t sandwich6_case1_old[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich6.before
0x00, 0x00, 0x00, 0x00, // Sandwich6.before (padding)
0x01, 0x00, 0x00, 0x00, // UnionWithVector.tag (start of Sandwich6.the_union)
0x00, 0x00, 0x00, 0x00, // UnionWithVector.tag (padding)
0x06, 0x00, 0x00, 0x00, // vector<uint8>.size (start of UnionWithVector.data)
0x00, 0x00, 0x00, 0x00, // vector<uint8>.size [cont.]
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich6.after
0x00, 0x00, 0x00, 0x00, // Sandwich6.after (padding)
0xa0, 0xa1, 0xa2, 0xa3, // vector<uint8>.data
0xa4, 0xa5, 0x00, 0x00, // vector<uint8>.data [cont.] + padding
};
uint8_t sandwich6_case1_absent_vector_v1[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich6.before
0x00, 0x00, 0x00, 0x00, // Sandwich6.before (padding)
0x02, 0x00, 0x00, 0x00, // UnionWithVector.ordinal (start of Sandwich6.the_union)
0x00, 0x00, 0x00, 0x00, // UnionWithVector.ordinal (padding)
0x10, 0x00, 0x00, 0x00, // UnionWithVector.env.num_bytes
0x00, 0x00, 0x00, 0x00, // UnionWithVector.env.num_handle
0xff, 0xff, 0xff, 0xff, // UnionWithVector.env.presence
0xff, 0xff, 0xff, 0xff, // UnionWithVector.env.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich6.after
0x00, 0x00, 0x00, 0x00, // Sandwich6.after (padding)
0x00, 0x00, 0x00, 0x00, // vector<uint8>.size, i.e. Sandwich6.the_union.data
0x00, 0x00, 0x00, 0x00, // vector<uint8>.size [cont.]
0x00, 0x00, 0x00, 0x00, // vector<uint8>.absence
0x00, 0x00, 0x00, 0x00, // vector<uint8>.absence [cont.]
};
uint8_t sandwich6_case1_absent_vector_old[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich6.before
0x00, 0x00, 0x00, 0x00, // Sandwich6.before (padding)
0x01, 0x00, 0x00, 0x00, // UnionWithVector.tag (start of Sandwich6.the_union)
0x00, 0x00, 0x00, 0x00, // UnionWithVector.tag (padding)
0x00, 0x00, 0x00, 0x00, // vector<uint8>.size (start of UnionWithVector.data)
0x00, 0x00, 0x00, 0x00, // vector<uint8>.size [cont.]
0x00, 0x00, 0x00, 0x00, // vector<uint8>.absence
0x00, 0x00, 0x00, 0x00, // vector<uint8>.absence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich6.after
0x00, 0x00, 0x00, 0x00, // Sandwich6.after (padding)
};
uint8_t sandwich6_case2_v1[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich6.before
0x00, 0x00, 0x00, 0x00, // Sandwich6.before (padding)
0x03, 0x00, 0x00, 0x00, // UnionWithVector.ordinal (start of Sandwich6.the_union)
0x00, 0x00, 0x00, 0x00, // UnionWithVector.ordinal (padding)
0x28, 0x00, 0x00, 0x00, // UnionWithVector.env.num_bytes
0x00, 0x00, 0x00, 0x00, // UnionWithVector.env.num_handle
0xff, 0xff, 0xff, 0xff, // UnionWithVector.env.presence
0xff, 0xff, 0xff, 0xff, // UnionWithVector.env.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich6.after
0x00, 0x00, 0x00, 0x00, // Sandwich6.after (padding)
0x15, 0x00, 0x00, 0x00, // vector<uint8>.size (21), i.e. Sandwich6.the_union.data
0x00, 0x00, 0x00, 0x00, // vector<uint8>.size [cont.]
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence [cont.]
0x73, 0x6f, 0x66, 0x74, // vector<uint8>.data
0x20, 0x6d, 0x69, 0x67, // vector<uint8>.data [cont.]
0x72, 0x61, 0x74, 0x69, // vector<uint8>.data [cont.]
0x6f, 0x6e, 0x73, 0x20, // vector<uint8>.data [cont.]
0x72, 0x6f, 0x63, 0x6b, // vector<uint8>.data [cont.]
0x21, 0x00, 0x00, 0x00, // vector<uint8>.data [cont.] + padding
};
uint8_t sandwich6_case2_old[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich6.before
0x00, 0x00, 0x00, 0x00, // Sandwich6.before (padding)
0x02, 0x00, 0x00, 0x00, // UnionWithVector.tag (start of Sandwich6.the_union)
0x00, 0x00, 0x00, 0x00, // UnionWithVector.tag (padding)
0x15, 0x00, 0x00, 0x00, // vector<uint8>.size (start of UnionWithVector.data)
0x00, 0x00, 0x00, 0x00, // vector<uint8>.size [cont.]
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich6.after
0x00, 0x00, 0x00, 0x00, // Sandwich6.after (padding)
0x73, 0x6f, 0x66, 0x74, // vector<uint8>.data ("soft migrations rock!")
0x20, 0x6d, 0x69, 0x67, // vector<uint8>.data [cont.]
0x72, 0x61, 0x74, 0x69, // vector<uint8>.data [cont.]
0x6f, 0x6e, 0x73, 0x20, // vector<uint8>.data [cont.]
0x72, 0x6f, 0x63, 0x6b, // vector<uint8>.data [cont.]
0x21, 0x00, 0x00, 0x00, // vector<uint8>.data [cont.] + padding
};
uint8_t sandwich6_case3_v1[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich6.before
0x00, 0x00, 0x00, 0x00, // Sandwich6.before (padding)
0x04, 0x00, 0x00, 0x00, // UnionWithVector.ordinal (start of Sandwich6.the_union)
0x00, 0x00, 0x00, 0x00, // UnionWithVector.ordinal (padding)
0x20, 0x00, 0x00, 0x00, // UnionWithVector.env.num_bytes
0x00, 0x00, 0x00, 0x00, // UnionWithVector.env.num_handle
0xff, 0xff, 0xff, 0xff, // UnionWithVector.env.presence
0xff, 0xff, 0xff, 0xff, // UnionWithVector.env.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich6.after
0x00, 0x00, 0x00, 0x00, // Sandwich6.after (padding)
0x03, 0x00, 0x00, 0x00, // vector<struct>.size (21), i.e. Sandwich6.the_union.data
0x00, 0x00, 0x00, 0x00, // vector<struct>.size [cont.]
0xff, 0xff, 0xff, 0xff, // vector<struct>.presence
0xff, 0xff, 0xff, 0xff, // vector<struct>.presence [cont.]
0x73, 0x6f, 0x66, 0x20, // StructSize3Alignment1 (element #1 & start of element #2)
0x6d, 0x69, 0x72, 0x61, // StructSize3Alignment1 (element #2 [cont.] & start of element #3)
0x74, 0x00, 0x00, 0x00, // StructSize3Alignment1 (element #3 [cont.d])
0x00, 0x00, 0x00, 0x00, // (padding)
};
uint8_t sandwich6_case3_old[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich6.before
0x00, 0x00, 0x00, 0x00, // Sandwich6.before (padding)
0x03, 0x00, 0x00, 0x00, // UnionWithVector.tag (start of Sandwich6.the_union)
0x00, 0x00, 0x00, 0x00, // UnionWithVector.tag (padding)
0x03, 0x00, 0x00, 0x00, // vector<uint8>.size (start of UnionWithVector.data)
0x00, 0x00, 0x00, 0x00, // vector<uint8>.size [cont.]
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich6.after
0x00, 0x00, 0x00, 0x00, // Sandwich6.after (padding)
0x73, 0x6f, 0x66, 0x20, // StructSize3Alignment1 (element #1 & start of element #2)
0x6d, 0x69, 0x72, 0x61, // StructSize3Alignment1 (element #2 [cont.] & start of element #3)
0x74, 0x00, 0x00, 0x00, // StructSize3Alignment1 (element #3 [cont.d])
0x00, 0x00, 0x00, 0x00, // (padding)
};
uint8_t sandwich6_case4_v1[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich6.before
0x00, 0x00, 0x00, 0x00, // Sandwich6.before (padding)
0x05, 0x00, 0x00, 0x00, // UnionWithVector.ordinal (start of Sandwich6.the_union)
0x00, 0x00, 0x00, 0x00, // UnionWithVector.ordinal (padding)
0x20, 0x00, 0x00, 0x00, // UnionWithVector.env.num_bytes
0x00, 0x00, 0x00, 0x00, // UnionWithVector.env.num_handle
0xff, 0xff, 0xff, 0xff, // UnionWithVector.env.presence
0xff, 0xff, 0xff, 0xff, // UnionWithVector.env.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich6.after
0x00, 0x00, 0x00, 0x00, // Sandwich6.after (padding)
0x03, 0x00, 0x00, 0x00, // vector<struct>.size (21), i.e. Sandwich6.the_union.data
0x00, 0x00, 0x00, 0x00, // vector<struct>.size [cont.]
0xff, 0xff, 0xff, 0xff, // vector<struct>.presence
0xff, 0xff, 0xff, 0xff, // vector<struct>.presence [cont.]
0x73, 0x6f, 0x66, 0x00, // StructSize3Alignment2 (start of vector<struct>.data)
0x20, 0x6d, 0x69, 0x00, // StructSize3Alignment2 (element #2)
0x72, 0x61, 0x74, 0x00, // StructSize3Alignment2 (element #3)
0x00, 0x00, 0x00, 0x00, // (padding)
};
uint8_t sandwich6_case4_old[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich6.before
0x00, 0x00, 0x00, 0x00, // Sandwich6.before (padding)
0x04, 0x00, 0x00, 0x00, // UnionWithVector.tag (start of Sandwich6.the_union)
0x00, 0x00, 0x00, 0x00, // UnionWithVector.tag (padding)
0x03, 0x00, 0x00, 0x00, // vector<uint8>.size (start of UnionWithVector.data)
0x00, 0x00, 0x00, 0x00, // vector<uint8>.size [cont.]
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich6.after
0x00, 0x00, 0x00, 0x00, // Sandwich6.after (padding)
0x73, 0x6f, 0x66, 0x00, // StructSize3Alignment2 (start of vector<struct>.data)
0x20, 0x6d, 0x69, 0x00, // StructSize3Alignment2 (element #2)
0x72, 0x61, 0x74, 0x00, // StructSize3Alignment2 (element #3)
0x00, 0x00, 0x00, 0x00, // (padding)
};
uint8_t sandwich6_case5_v1[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich6.before
0x00, 0x00, 0x00, 0x00, // Sandwich6.before (padding)
0x06, 0x00, 0x00, 0x00, // UnionWithVector.ordinal (start of Sandwich6.the_union)
0x00, 0x00, 0x00, 0x00, // UnionWithVector.ordinal (padding)
0x20, 0x00, 0x00, 0x00, // UnionWithVector.env.num_bytes
0x03, 0x00, 0x00, 0x00, // UnionWithVector.env.num_handle
0xff, 0xff, 0xff, 0xff, // UnionWithVector.env.presence
0xff, 0xff, 0xff, 0xff, // UnionWithVector.env.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich6.after
0x00, 0x00, 0x00, 0x00, // Sandwich6.after (padding)
0x03, 0x00, 0x00, 0x00, // vector<handle>.size, i.e. Sandwich6.the_union.data
0x00, 0x00, 0x00, 0x00, // vector<handle>.size [cont.]
0xff, 0xff, 0xff, 0xff, // vector<handle>.presence
0xff, 0xff, 0xff, 0xff, // vector<handle>.presence [cont.]
0xff, 0xff, 0xff, 0xff, // vector<handle>.data
0xff, 0xff, 0xff, 0xff, // vector<handle>.data
0xff, 0xff, 0xff, 0xff, // vector<handle>.data
0x00, 0x00, 0x00, 0x00, // vector<handle>.data (padding)
};
uint8_t sandwich6_case5_old[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich6.before
0x00, 0x00, 0x00, 0x00, // Sandwich6.before (padding)
0x05, 0x00, 0x00, 0x00, // UnionWithVector.tag (start of Sandwich6.the_union)
0x00, 0x00, 0x00, 0x00, // UnionWithVector.tag (padding)
0x03, 0x00, 0x00, 0x00, // vector<handle>.size, i.e. Sandwich6.the_union.data
0x00, 0x00, 0x00, 0x00, // vector<handle>.size [cont.]
0xff, 0xff, 0xff, 0xff, // vector<handle>.presence
0xff, 0xff, 0xff, 0xff, // vector<handle>.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich6.after
0x00, 0x00, 0x00, 0x00, // Sandwich6.after (padding)
0xff, 0xff, 0xff, 0xff, // vector<handle>.data
0xff, 0xff, 0xff, 0xff, // vector<handle>.data
0xff, 0xff, 0xff, 0xff, // vector<handle>.data
0x00, 0x00, 0x00, 0x00, // vector<handle>.data (padding)
};
uint8_t sandwich6_case6_v1[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich6.before
0x00, 0x00, 0x00, 0x00, // Sandwich6.before (padding)
0x07, 0x00, 0x00, 0x00, // UnionWithVector.ordinal (start of Sandwich6.the_union)
0x00, 0x00, 0x00, 0x00, // UnionWithVector.ordinal (padding)
0x08, 0x00, 0x00, 0x00, // UnionWithVector.env.num_bytes
0x00, 0x00, 0x00, 0x00, // UnionWithVector.env.num_handle
0xff, 0xff, 0xff, 0xff, // UnionWithVector.env.presence
0xff, 0xff, 0xff, 0xff, // UnionWithVector.env.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich6.after
0x00, 0x00, 0x00, 0x00, // Sandwich6.after (padding)
0xa1, 0xa2, 0xa3, 0xa4, // array<StructSize3Alignment1>:2, i.e. Sandwich6.the_union.data
0xa5, 0xa6, 0x00, 0x00, // array<StructSize3Alignment1>:2
};
uint8_t sandwich6_case6_old[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich6.before
0x00, 0x00, 0x00, 0x00, // Sandwich6.before (padding)
0x06, 0x00, 0x00, 0x00, // UnionWithVector.tag (start of Sandwich6.the_union)
0x00, 0x00, 0x00, 0x00, // UnionWithVector.tag (padding)
0xa1, 0xa2, 0xa3, 0xa4, // array<StructSize3Alignment1>:2, i.e. Sandwich6.the_union.data
0xa5, 0xa6, 0x00, 0x00, // array<StructSize3Alignment1>:2
0x00, 0x00, 0x00, 0x00, // Sandwich6.the_union.data (padding)
0x00, 0x00, 0x00, 0x00, // Sandwich6.the_union.data (padding)
0x05, 0x06, 0x07, 0x08, // Sandwich6.after
0x00, 0x00, 0x00, 0x00, // Sandwich6.after (padding)
};
uint8_t sandwich6_case7_v1[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich6.before
0x00, 0x00, 0x00, 0x00, // Sandwich6.before (padding)
0x08, 0x00, 0x00, 0x00, // UnionWithVector.ordinal (start of Sandwich6.the_union)
0x00, 0x00, 0x00, 0x00, // UnionWithVector.ordinal (padding)
0x08, 0x00, 0x00, 0x00, // UnionWithVector.env.num_bytes
0x00, 0x00, 0x00, 0x00, // UnionWithVector.env.num_handle
0xff, 0xff, 0xff, 0xff, // UnionWithVector.env.presence
0xff, 0xff, 0xff, 0xff, // UnionWithVector.env.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich6.after
0x00, 0x00, 0x00, 0x00, // Sandwich6.after (padding)
0xa1, 0xa2, 0xa3, 0x00, // array<StructSize3Alignment2>:2, i.e. Sandwich6.the_union.data
0xa4, 0xa5, 0xa6, 0x00, // array<StructSize3Alignment2>:2
};
uint8_t sandwich6_case7_old[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich6.before
0x00, 0x00, 0x00, 0x00, // Sandwich6.before (padding)
0x07, 0x00, 0x00, 0x00, // UnionWithVector.tag (start of Sandwich6.the_union)
0x00, 0x00, 0x00, 0x00, // UnionWithVector.tag (padding)
0xa1, 0xa2, 0xa3, 0x00, // array<StructSize3Alignment2>:2, i.e. Sandwich6.the_union.data
0xa4, 0xa5, 0xa6, 0x00, // array<StructSize3Alignment2>:2
0x00, 0x00, 0x00, 0x00, // Sandwich6.the_union.data (padding)
0x00, 0x00, 0x00, 0x00, // Sandwich6.the_union.data (padding)
0x05, 0x06, 0x07, 0x08, // Sandwich6.after
0x00, 0x00, 0x00, 0x00, // Sandwich6.after (padding)
};
uint8_t sandwich6_case8_v1[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich6.before
0x00, 0x00, 0x00, 0x00, // Sandwich6.before (padding)
0x09, 0x00, 0x00, 0x00, // UnionWithVector.ordinal (start of Sandwich6.the_union)
0x00, 0x00, 0x00, 0x00, // UnionWithVector.ordinal (padding)
0x30, 0x00, 0x00, 0x00, // UnionWithVector.env.num_bytes
0x00, 0x00, 0x00, 0x00, // UnionWithVector.env.num_handle
0xff, 0xff, 0xff, 0xff, // UnionWithVector.env.presence
0xff, 0xff, 0xff, 0xff, // UnionWithVector.env.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich6.after
0x00, 0x00, 0x00, 0x00, // Sandwich6.after (padding)
0x01, 0x00, 0x00, 0x00, // vector<UnionSize8Aligned4>.size (start of Sandwich6.the_union.data)
0x00, 0x00, 0x00, 0x00, // vector<UnionSize8Aligned4>.size [cont.]
0xff, 0xff, 0xff, 0xff, // vector<UnionSize8Aligned4>.presence
0xff, 0xff, 0xff, 0xff, // vector<UnionSize8Aligned4>.presence [cont.]
0x03, 0x00, 0x00, 0x00, // UnionSize8Aligned4.ordinal (first element, outer vector)
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.ordinal (padding)
0x08, 0x00, 0x00, 0x00, // UnionSize8Aligned4.env.num_bytes
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.env.num_handle
0xff, 0xff, 0xff, 0xff, // UnionSize8Aligned4.env.presence
0xff, 0xff, 0xff, 0xff, // UnionSize8Aligned4.env.presence [cont.]
0x09, 0x0a, 0x0b, 0x0c, // UnionSize8Aligned4.data, i.e. Sandwich1.the_union.data
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.data (padding)
};
uint8_t sandwich6_case8_old[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich6.before
0x00, 0x00, 0x00, 0x00, // Sandwich6.before (padding)
0x08, 0x00, 0x00, 0x00, // UnionWithVector.tag (start of Sandwich6.the_union)
0x00, 0x00, 0x00, 0x00, // UnionWithVector.tag (padding)
0x01, 0x00, 0x00, 0x00, // vector<UnionWithVector>.size (outer vector)
0x00, 0x00, 0x00, 0x00, // vector<UnionWithVector>.size [cont.]
0xff, 0xff, 0xff, 0xff, // UnionWithVector.env.presence
0xff, 0xff, 0xff, 0xff, // UnionWithVector.env.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich6.after
0x00, 0x00, 0x00, 0x00, // Sandwich6.after (padding)
0x02, 0x00, 0x00, 0x00, // UnionSize8Aligned4.tag, i.e. Sandwich1.the_union
0x09, 0x0a, 0x0b, 0x0c, // UnionSize8Aligned4.data
};
uint8_t sandwich7_case1_v1[] = {
0x11, 0x12, 0x13, 0x14, // Sandwich7.before
0x00, 0x00, 0x00, 0x00, // Sandwich7.before (padding)
0xff, 0xff, 0xff, 0xff, // Sandwich7.opt_sandwich1.presence
0xff, 0xff, 0xff, 0xff, // Sandwich7.opt_sandwich1.presence [cont.]
0x21, 0x22, 0x23, 0x24, // Sandwich7.after
0x00, 0x00, 0x00, 0x00, // Sandwich7.after (padding)
0x01, 0x02, 0x03, 0x04, // Sandwich1.before
0x00, 0x00, 0x00, 0x00, // Sandwich1.before (padding)
0x03, 0x00, 0x00, 0x00, // UnionSize8Aligned4.tag, i.e. Sandwich1.the_union
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.padding
0x08, 0x00, 0x00, 0x00, // UnionSize8Aligned4.env.num_bytes
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.env.num_handle
0xff, 0xff, 0xff, 0xff, // UnionSize8Aligned4.env.presence
0xff, 0xff, 0xff, 0xff, // UnionSize8Aligned4.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich1.after
0x00, 0x00, 0x00, 0x00, // Sandwich1.after (padding)
0x09, 0x0a, 0x0b, 0x0c, // UnionSize8Aligned4.data, i.e. Sandwich1.the_union.data
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.data (padding)
};
uint8_t sandwich7_case1_old[] = {
0x11, 0x12, 0x13, 0x14, // Sandwich7.before
0x00, 0x00, 0x00, 0x00, // Sandwich7.before (padding)
0xff, 0xff, 0xff, 0xff, // Sandwich7.opt_sandwich1.presence
0xff, 0xff, 0xff, 0xff, // Sandwich7.opt_sandwich1.presence [cont.]
0x21, 0x22, 0x23, 0x24, // Sandwich7.after
0x00, 0x00, 0x00, 0x00, // Sandwich7.after (padding)
0x01, 0x02, 0x03, 0x04, // Sandwich1.before
0x02, 0x00, 0x00, 0x00, // UnionSize8Aligned4.tag, i.e. Sandwich1.the_union
0x09, 0x0a, 0x0b, 0x0c, // UnionSize8Aligned4.data
0x05, 0x06, 0x07, 0x08, // Sandwich1.after
};
uint8_t sandwich7_case1_with_hdr_v1[] = {
0xf0, 0xf1, 0xf2, 0xf3, // Fake transaction header
0xf4, 0xf5, 0xf6, 0xf7, // [cont.]
0xf8, 0xf9, 0xfa, 0xfb, // [cont.]
0xfc, 0xfd, 0xfe, 0xff, // [cont.]
0x11, 0x12, 0x13, 0x14, // Sandwich7.before
0x00, 0x00, 0x00, 0x00, // Sandwich7.before (padding)
0xff, 0xff, 0xff, 0xff, // Sandwich7.opt_sandwich1.presence
0xff, 0xff, 0xff, 0xff, // Sandwich7.opt_sandwich1.presence [cont.]
0x21, 0x22, 0x23, 0x24, // Sandwich7.after
0x00, 0x00, 0x00, 0x00, // Sandwich7.after (padding)
0x01, 0x02, 0x03, 0x04, // Sandwich1.before
0x00, 0x00, 0x00, 0x00, // Sandwich1.before (padding)
0x03, 0x00, 0x00, 0x00, // UnionSize8Aligned4.tag, i.e. Sandwich1.the_union
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.padding
0x08, 0x00, 0x00, 0x00, // UnionSize8Aligned4.env.num_bytes
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.env.num_handle
0xff, 0xff, 0xff, 0xff, // UnionSize8Aligned4.env.presence
0xff, 0xff, 0xff, 0xff, // UnionSize8Aligned4.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich1.after
0x00, 0x00, 0x00, 0x00, // Sandwich1.after (padding)
0x09, 0x0a, 0x0b, 0x0c, // UnionSize8Aligned4.data, i.e. Sandwich1.the_union.data
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.data (padding)
};
uint8_t sandwich7_case1_with_hdr_old[] = {
0xf0, 0xf1, 0xf2, 0xf3, // Fake transaction header
0xf4, 0xf5, 0xf6, 0xf7, // [cont.]
0xf8, 0xf9, 0xfa, 0xfb, // [cont.]
0xfc, 0xfd, 0xfe, 0xff, // [cont.]
0x11, 0x12, 0x13, 0x14, // Sandwich7.before
0x00, 0x00, 0x00, 0x00, // Sandwich7.before (padding)
0xff, 0xff, 0xff, 0xff, // Sandwich7.opt_sandwich1.presence
0xff, 0xff, 0xff, 0xff, // Sandwich7.opt_sandwich1.presence [cont.]
0x21, 0x22, 0x23, 0x24, // Sandwich7.after
0x00, 0x00, 0x00, 0x00, // Sandwich7.after (padding)
0x01, 0x02, 0x03, 0x04, // Sandwich1.before
0x02, 0x00, 0x00, 0x00, // UnionSize8Aligned4.tag, i.e. Sandwich1.the_union
0x09, 0x0a, 0x0b, 0x0c, // UnionSize8Aligned4.data
0x05, 0x06, 0x07, 0x08, // Sandwich1.after
};
uint8_t sandwich7_case2_v1[] = {
0x11, 0x12, 0x13, 0x14, // Sandwich7.before
0x00, 0x00, 0x00, 0x00, // Sandwich7.before (padding)
0x00, 0x00, 0x00, 0x00, // Sandwich7.opt_sandwich1.preabsentsence
0x00, 0x00, 0x00, 0x00, // Sandwich7.opt_sandwich1.absence [cont.]
0x21, 0x22, 0x23, 0x24, // Sandwich7.after
0x00, 0x00, 0x00, 0x00, // Sandwich7.after (padding)
};
uint8_t sandwich7_case2_old[] = {
0x11, 0x12, 0x13, 0x14, // Sandwich7.before
0x00, 0x00, 0x00, 0x00, // Sandwich7.before (padding)
0x00, 0x00, 0x00, 0x00, // Sandwich7.opt_sandwich1.absence
0x00, 0x00, 0x00, 0x00, // Sandwich7.opt_sandwich1.absence [cont.]
0x21, 0x22, 0x23, 0x24, // Sandwich7.after
0x00, 0x00, 0x00, 0x00, // Sandwich7.after (padding)
};
uint8_t sandwich7_case2_with_hdr_v1[] = {
0xf0, 0xf1, 0xf2, 0xf3, // Fake transaction header
0xf4, 0xf5, 0xf6, 0xf7, // [cont.]
0xf8, 0xf9, 0xfa, 0xfb, // [cont.]
0xfc, 0xfd, 0xfe, 0xff, // [cont.]
0x11, 0x12, 0x13, 0x14, // Sandwich7.before
0x00, 0x00, 0x00, 0x00, // Sandwich7.before (padding)
0x00, 0x00, 0x00, 0x00, // Sandwich7.opt_sandwich1.preabsentsence
0x00, 0x00, 0x00, 0x00, // Sandwich7.opt_sandwich1.absence [cont.]
0x21, 0x22, 0x23, 0x24, // Sandwich7.after
0x00, 0x00, 0x00, 0x00, // Sandwich7.after (padding)
};
uint8_t sandwich7_case2_with_hdr_old[] = {
0xf0, 0xf1, 0xf2, 0xf3, // Fake transaction header
0xf4, 0xf5, 0xf6, 0xf7, // [cont.]
0xf8, 0xf9, 0xfa, 0xfb, // [cont.]
0xfc, 0xfd, 0xfe, 0xff, // [cont.]
0x11, 0x12, 0x13, 0x14, // Sandwich7.before
0x00, 0x00, 0x00, 0x00, // Sandwich7.before (padding)
0x00, 0x00, 0x00, 0x00, // Sandwich7.opt_sandwich1.absence
0x00, 0x00, 0x00, 0x00, // Sandwich7.opt_sandwich1.absence [cont.]
0x21, 0x22, 0x23, 0x24, // Sandwich7.after
0x00, 0x00, 0x00, 0x00, // Sandwich7.after (padding)
};
// This is the same bytes as sandwich5_case_v1, but will have a different coding table due to
// different field types.
uint8_t sandwich8_case1_v1[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich8.before
0x00, 0x00, 0x00, 0x00, // Sandwich8.before (padding)
0x02, 0x00, 0x00, 0x00, // Sandwich8.UnionOfUnion.ordinal
0x00, 0x00, 0x00, 0x00, // Sandwich8.UnionOfUnion.padding
0x20, 0x00, 0x00, 0x00, // Sandwich8.UnionOfUnion.env.num_bytes
0x00, 0x00, 0x00, 0x00, // Sandwich8.UnionOfUnion.env.num_handle
0xff, 0xff, 0xff, 0xff, // Sandwich8.UnionOfUnion.env.presence
0xff, 0xff, 0xff, 0xff, // Sandwich8.UnionOfUnion.env.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich8.after
0x00, 0x00, 0x00, 0x00, // Sandwich8.after (padding)
0x03, 0x00, 0x00, 0x00, // UnionOfUnion.UnionSize8Aligned4.ordinal
0x00, 0x00, 0x00, 0x00, // UnionOfUnion.UnionSize8Aligned4.padding
0x08, 0x00, 0x00, 0x00, // UnionOfUnion.UnionSize8Aligned4.env.num_bytes
0x00, 0x00, 0x00, 0x00, // UnionOfUnion.UnionSize8Aligned4.env.num_handle
0xff, 0xff, 0xff, 0xff, // UnionOfUnion.UnionSize8Aligned4.env.presence
0xff, 0xff, 0xff, 0xff, // UnionOfUnion.UnionSize8Aligned4.env.presence [cont.]
0x09, 0x0a, 0x0b, 0x0c, // UnionOfUnion.UnionSize8Aligned4.data
0x00, 0x00, 0x00, 0x00, // UnionOfUnion.UnionSize8Aligned4.data (padding)
};
// This is the same bytes as sandwich5_case_old, but will have a different coding table due to
// different field types.
uint8_t sandwich8_case1_old[] = {
0x01, 0x02, 0x03, 0x04, // Sandwich8.before
0x00, 0x00, 0x00, 0x00, // Sandwich8.before (padding)
0x01, 0x00, 0x00, 0x00, // Sandwich8.UnionOfUnion.tag
0x00, 0x00, 0x00, 0x00, // Sandwich8.UnionOfUnion.tag (padding)
0x02, 0x00, 0x00, 0x00, // UnionSize8Aligned4.tag, i.e Sandwich5.UnionOfUnion.data
0x09, 0x0a, 0x0b, 0x0c, // UnionSize8Aligned4.data
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.data (padding)
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.data (padding)
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.data (padding)
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.UnionSize8Aligned4.data (padding)
0x05, 0x06, 0x07, 0x08, // Sandwich8.after
0x00, 0x00, 0x00, 0x00, // Sandwich8.after (padding)
};
uint8_t sandwich9_v1[] = {
0x01, 0x02, 0x00, 0x00, // before
0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, // xunion tag
0x00, 0x00, 0x00, 0x00, //
0x40, 0x00, 0x00, 0x00, // xunion size
0x00, 0x00, 0x00, 0x00, //
0xFF, 0xFF, 0xFF, 0xFF, // xunion presence
0xFF, 0xFF, 0xFF, 0xFF, //
0x11, 0x12, 0x00, 0x00, // after
0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, // outer vector size
0x00, 0x00, 0x00, 0x00, //
0xFF, 0xFF, 0xFF, 0xFF, // outer vector presence
0xFF, 0xFF, 0xFF, 0xFF, //
0x02, 0x00, 0x00, 0x00, // inner vector size
0x00, 0x00, 0x00, 0x00, //
0xFF, 0xFF, 0xFF, 0xFF, // inner vector presence
0xFF, 0xFF, 0xFF, 0xFF, //
0xFF, 0xFF, 0xFF, 0xFF, // pointer 1 present
0xFF, 0xFF, 0xFF, 0xFF, //
0xFF, 0xFF, 0xFF, 0xFF, // pointer 2 present
0xFF, 0xFF, 0xFF, 0xFF, //
0x10, 0x11, 0x12, 0x00, // pointer 1 data
0x00, 0x00, 0x00, 0x00, //
0x13, 0x14, 0x15, 0x00, // pointer 2 data
0x00, 0x00, 0x00, 0x00, //
};
uint8_t sandwich9_old[] = {
0x01, 0x02, 0x00, 0x00, // before
0x00, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, // union tag
0x00, 0x00, 0x00, 0x00, //
0x01, 0x00, 0x00, 0x00, // outer vector size
0x00, 0x00, 0x00, 0x00, //
0xFF, 0xFF, 0xFF, 0xFF, // outer vetor presence
0xFF, 0xFF, 0xFF, 0xFF, //
0x11, 0x12, 0x00, 0x00, // after
0x00, 0x00, 0x00, 0x00, //
0x02, 0x00, 0x00, 0x00, // inner vector sizze
0x00, 0x00, 0x00, 0x00, //
0xFF, 0xFF, 0xFF, 0xFF, // inner vector presence
0xFF, 0xFF, 0xFF, 0xFF, //
0xFF, 0xFF, 0xFF, 0xFF, // pointer 1 presence
0xFF, 0xFF, 0xFF, 0xFF, //
0xFF, 0xFF, 0xFF, 0xFF, // pointer 2 presence
0xFF, 0xFF, 0xFF, 0xFF, //
0x10, 0x11, 0x12, 0x00, // pointer 1 data
0x00, 0x00, 0x00, 0x00, //
0x13, 0x14, 0x15, 0x00, // pointer 2 data
0x00, 0x00, 0x00, 0x00, //
};
uint8_t out_of_line_sandwich1_case1_v1[] = {
0x15, 0x00, 0x00, 0x00, // vector<uint8>.size (start of OutOfLineSandwich1.before)
0x00, 0x00, 0x00, 0x00, // vector<uint8>.size [cont.]
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence [cont.]
0x01, 0x00, 0x00, 0x00, // vector<Sandwich1>.size (start of OutOfLineSandwich1.v)
0x00, 0x00, 0x00, 0x00, // vector<Sandwich1>.size [cont.]
0xff, 0xff, 0xff, 0xff, // vector<Sandwich1>.presence
0xff, 0xff, 0xff, 0xff, // vector<Sandwich1>.presence [cont.]
0x16, 0x00, 0x00, 0x00, // vector<uint8>.size (start of OutOfLineSandwich1.after)
0x00, 0x00, 0x00, 0x00, // vector<uint8>.size [cont.]
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence [cont.]
0x73, 0x6f, 0x66, 0x74, // vector<uint8>.data ("soft migrations rock!")
0x20, 0x6d, 0x69, 0x67, // vector<uint8>.data [cont.]
0x72, 0x61, 0x74, 0x69, // vector<uint8>.data [cont.]
0x6f, 0x6e, 0x73, 0x20, // vector<uint8>.data [cont.]
0x72, 0x6f, 0x63, 0x6b, // vector<uint8>.data [cont.]
0x21, 0x00, 0x00, 0x00, // vector<uint8>.data [cont.] + padding
// vector<Sandwich1>[0]:
0x01, 0x02, 0x03, 0x04, // Sandwich1.before
0x00, 0x00, 0x00, 0x00, // Sandwich1.before (padding)
0x03, 0x00, 0x00, 0x00, // UnionSize8Aligned4.tag, i.e. Sandwich1.the_union
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.padding
0x08, 0x00, 0x00, 0x00, // UnionSize8Aligned4.env.num_bytes
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.env.num_handle
0xff, 0xff, 0xff, 0xff, // UnionSize8Aligned4.env.presence
0xff, 0xff, 0xff, 0xff, // UnionSize8Aligned4.presence [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich1.after
0x00, 0x00, 0x00, 0x00, // Sandwich1.after (padding)
0x09, 0x0a, 0x0b, 0x0c, // UnionSize8Aligned4.data, i.e. Sandwich1.the_union.data
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.data (padding)
0x68, 0x61, 0x72, 0x64, // vector<uint8>.data ("hard transitions suck!")
0x20, 0x74, 0x72, 0x61, // vector<uint8>.data [cont.]
0x6e, 0x73, 0x69, 0x74, // vector<uint8>.data [cont.]
0x69, 0x6f, 0x6e, 0x73, // vector<uint8>.data [cont.]
0x20, 0x73, 0x75, 0x63, // vector<uint8>.data [cont.]
0x6b, 0x21, 0x00, 0x00, // vector<uint8>.data [cont.] + padding
};
uint8_t out_of_line_sandwich1_case1_old[] = {
0x15, 0x00, 0x00, 0x00, // vector<uint8>.size (start of OutOfLineSandwich1.before)
0x00, 0x00, 0x00, 0x00, // vector<uint8>.size [cont.]
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence [cont.]
0x01, 0x00, 0x00, 0x00, // vector<Sandwich1>.size (start of OutOfLineSandwich1.v)
0x00, 0x00, 0x00, 0x00, // vector<Sandwich1>.size [cont.]
0xff, 0xff, 0xff, 0xff, // vector<Sandwich1>.presence
0xff, 0xff, 0xff, 0xff, // vector<Sandwich1>.presence [cont.]
0x16, 0x00, 0x00, 0x00, // vector<uint8>.size (start of OutOfLineSandwich1.after)
0x00, 0x00, 0x00, 0x00, // vector<uint8>.size [cont.]
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence [cont.]
0x73, 0x6f, 0x66, 0x74, // vector<uint8>.data ("soft migrations rock!")
0x20, 0x6d, 0x69, 0x67, // vector<uint8>.data [cont.]
0x72, 0x61, 0x74, 0x69, // vector<uint8>.data [cont.]
0x6f, 0x6e, 0x73, 0x20, // vector<uint8>.data [cont.]
0x72, 0x6f, 0x63, 0x6b, // vector<uint8>.data [cont.]
0x21, 0x00, 0x00, 0x00, // vector<uint8>.data [cont.] + padding
// vector<Sandwich1>[0]:
0x01, 0x02, 0x03, 0x04, // Sandwich1.before
0x02, 0x00, 0x00, 0x00, // UnionSize8Aligned4.tag, i.e. Sandwich1.the_union
0x09, 0x0a, 0x0b, 0x0c, // UnionSize8Aligned4.data
0x05, 0x06, 0x07, 0x08, // Sandwich1.after
0x68, 0x61, 0x72, 0x64, // vector<uint8>.data ("hard transitions suck!")
0x20, 0x74, 0x72, 0x61, // vector<uint8>.data [cont.]
0x6e, 0x73, 0x69, 0x74, // vector<uint8>.data [cont.]
0x69, 0x6f, 0x6e, 0x73, // vector<uint8>.data [cont.]
0x20, 0x73, 0x75, 0x63, // vector<uint8>.data [cont.]
0x6b, 0x21, 0x00, 0x00, // vector<uint8>.data [cont.] + padding
};
uint8_t out_of_line_sandwich1_with_opt_union_present_v1[] = {
0x15, 0x00, 0x00, 0x00, // vector<uint8>.size (start of OutOfLineSandwich1.before)
0x00, 0x00, 0x00, 0x00, // vector<uint8>.size [cont.]
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence [cont.]
0x01, 0x00, 0x00, 0x00, // vector<Sandwich1>.size (start of OutOfLineSandwich1.v)
0x00, 0x00, 0x00, 0x00, // vector<Sandwich1>.size [cont.]
0xff, 0xff, 0xff, 0xff, // vector<Sandwich1>.presence
0xff, 0xff, 0xff, 0xff, // vector<Sandwich1>.presence [cont.]
0x16, 0x00, 0x00, 0x00, // vector<uint8>.size (start of OutOfLineSandwich1.after)
0x00, 0x00, 0x00, 0x00, // vector<uint8>.size [cont.]
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence [cont.]
0x73, 0x6f, 0x66, 0x74, // vector<uint8>.data ("soft migrations rock!")
0x20, 0x6d, 0x69, 0x67, // vector<uint8>.data [cont.]
0x72, 0x61, 0x74, 0x69, // vector<uint8>.data [cont.]
0x6f, 0x6e, 0x73, 0x20, // vector<uint8>.data [cont.]
0x72, 0x6f, 0x63, 0x6b, // vector<uint8>.data [cont.]
0x21, 0x00, 0x00, 0x00, // vector<uint8>.data [cont.] + padding
// vector<Sandwich1>[0]:
0x01, 0x02, 0x03, 0x04, // Sandwich1WithOptUnion.before
0x00, 0x00, 0x00, 0x00, // Sandwich1WithOptUnion.before (padding)
0x03, 0x00, 0x00, 0x00, // UnionSize8Aligned4.tag, i.e. Sandwich1WithOptUnion.union
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.padding
0x08, 0x00, 0x00, 0x00, // UnionSize8Aligned4.env.num_bytes
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.env.num_handle
0xff, 0xff, 0xff, 0xff, // UnionSize8Aligned4.env.presence (present)
0xff, 0xff, 0xff, 0xff, // UnionSize8Aligned4.presence (present) [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich1WithOptUnion.after
0x00, 0x00, 0x00, 0x00, // Sandwich1WithOptUnion.after (padding)
0x09, 0x0a, 0x0b, 0x0c, // UnionSize8Aligned4.data, i.e. Sandwich1WithOptUnion.union.data
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.data (padding)
0x68, 0x61, 0x72, 0x64, // vector<uint8>.data ("hard transitions suck!")
0x20, 0x74, 0x72, 0x61, // vector<uint8>.data [cont.]
0x6e, 0x73, 0x69, 0x74, // vector<uint8>.data [cont.]
0x69, 0x6f, 0x6e, 0x73, // vector<uint8>.data [cont.]
0x20, 0x73, 0x75, 0x63, // vector<uint8>.data [cont.]
0x6b, 0x21, 0x00, 0x00, // vector<uint8>.data [cont.] + padding
};
uint8_t out_of_line_sandwich1_with_opt_union_present_old[] = {
0x15, 0x00, 0x00, 0x00, // vector<uint8>.size (start of OutOfLineSandwich1.before)
0x00, 0x00, 0x00, 0x00, // vector<uint8>.size [cont.]
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence [cont.]
0x01, 0x00, 0x00, 0x00, // vector<Sandwich1>.size (start of OutOfLineSandwich1.v)
0x00, 0x00, 0x00, 0x00, // vector<Sandwich1>.size [cont.]
0xff, 0xff, 0xff, 0xff, // vector<Sandwich1>.presence
0xff, 0xff, 0xff, 0xff, // vector<Sandwich1>.presence [cont.]
0x16, 0x00, 0x00, 0x00, // vector<uint8>.size (start of OutOfLineSandwich1.after)
0x00, 0x00, 0x00, 0x00, // vector<uint8>.size [cont.]
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence [cont.]
0x73, 0x6f, 0x66, 0x74, // vector<uint8>.data ("soft migrations rock!")
0x20, 0x6d, 0x69, 0x67, // vector<uint8>.data [cont.]
0x72, 0x61, 0x74, 0x69, // vector<uint8>.data [cont.]
0x6f, 0x6e, 0x73, 0x20, // vector<uint8>.data [cont.]
0x72, 0x6f, 0x63, 0x6b, // vector<uint8>.data [cont.]
0x21, 0x00, 0x00, 0x00, // vector<uint8>.data [cont.] + padding
// vector<Sandwich1>[0]:
0x01, 0x02, 0x03, 0x04, // Sandwich1WithOptUnion.before
0x00, 0x00, 0x00, 0x00, // Sandwich1WithOptUnion.before (padding)
0xff, 0xff, 0xff, 0xff, // Sandwich1WithOptUnion.opt_union (present)
0xff, 0xff, 0xff, 0xff, // Sandwich1WithOptUnion.opt_union (present) [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich1WithOptUnion.after
0x00, 0x00, 0x00, 0x00, // Sandwich1WithOptUnion.after (padding)
0x02, 0x00, 0x00, 0x00, // UnionSize8Aligned4.tag, i.e. Sandwich1WithOptUnion.opt_union
0x09, 0x0a, 0x0b, 0x0c, // UnionSize8Aligned4.data
0x68, 0x61, 0x72, 0x64, // vector<uint8>.data ("hard transitions suck!")
0x20, 0x74, 0x72, 0x61, // vector<uint8>.data [cont.]
0x6e, 0x73, 0x69, 0x74, // vector<uint8>.data [cont.]
0x69, 0x6f, 0x6e, 0x73, // vector<uint8>.data [cont.]
0x20, 0x73, 0x75, 0x63, // vector<uint8>.data [cont.]
0x6b, 0x21, 0x00, 0x00, // vector<uint8>.data [cont.] + padding
};
uint8_t out_of_line_sandwich1_with_opt_union_absent_v1[] = {
0x15, 0x00, 0x00, 0x00, // vector<uint8>.size (start of OutOfLineSandwich1.before)
0x00, 0x00, 0x00, 0x00, // vector<uint8>.size [cont.]
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence [cont.]
0x01, 0x00, 0x00, 0x00, // vector<Sandwich1>.size (start of OutOfLineSandwich1.v)
0x00, 0x00, 0x00, 0x00, // vector<Sandwich1>.size [cont.]
0xff, 0xff, 0xff, 0xff, // vector<Sandwich1>.presence
0xff, 0xff, 0xff, 0xff, // vector<Sandwich1>.presence [cont.]
0x16, 0x00, 0x00, 0x00, // vector<uint8>.size (start of OutOfLineSandwich1.after)
0x00, 0x00, 0x00, 0x00, // vector<uint8>.size [cont.]
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence [cont.]
0x73, 0x6f, 0x66, 0x74, // vector<uint8>.data ("soft migrations rock!")
0x20, 0x6d, 0x69, 0x67, // vector<uint8>.data [cont.]
0x72, 0x61, 0x74, 0x69, // vector<uint8>.data [cont.]
0x6f, 0x6e, 0x73, 0x20, // vector<uint8>.data [cont.]
0x72, 0x6f, 0x63, 0x6b, // vector<uint8>.data [cont.]
0x21, 0x00, 0x00, 0x00, // vector<uint8>.data [cont.] + padding
// vector<Sandwich1>[0]:
0x01, 0x02, 0x03, 0x04, // Sandwich1WithOptUnion.before
0x00, 0x00, 0x00, 0x00, // Sandwich1WithOptUnion.before (padding)
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.tag, i.e. Sandwich1WithOptUnion.opt_union
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.padding
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.env.num_bytes
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.env.num_handle
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.env.presence (absent)
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.env.presence (preabsentsent) [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich1WithOptUnion.after
0x00, 0x00, 0x00, 0x00, // Sandwich1WithOptUnion.after (padding)
0x68, 0x61, 0x72, 0x64, // vector<uint8>.data ("hard transitions suck!")
0x20, 0x74, 0x72, 0x61, // vector<uint8>.data [cont.]
0x6e, 0x73, 0x69, 0x74, // vector<uint8>.data [cont.]
0x69, 0x6f, 0x6e, 0x73, // vector<uint8>.data [cont.]
0x20, 0x73, 0x75, 0x63, // vector<uint8>.data [cont.]
0x6b, 0x21, 0x00, 0x00, // vector<uint8>.data [cont.] + padding
};
uint8_t out_of_line_sandwich1_with_opt_union_absent_old[] = {
0x15, 0x00, 0x00, 0x00, // vector<uint8>.size (start of OutOfLineSandwich1.before)
0x00, 0x00, 0x00, 0x00, // vector<uint8>.size [cont.]
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence [cont.]
0x01, 0x00, 0x00, 0x00, // vector<Sandwich1>.size (start of OutOfLineSandwich1.v)
0x00, 0x00, 0x00, 0x00, // vector<Sandwich1>.size [cont.]
0xff, 0xff, 0xff, 0xff, // vector<Sandwich1>.presence
0xff, 0xff, 0xff, 0xff, // vector<Sandwich1>.presence [cont.]
0x16, 0x00, 0x00, 0x00, // vector<uint8>.size (start of OutOfLineSandwich1.after)
0x00, 0x00, 0x00, 0x00, // vector<uint8>.size [cont.]
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence
0xff, 0xff, 0xff, 0xff, // vector<uint8>.presence [cont.]
0x73, 0x6f, 0x66, 0x74, // vector<uint8>.data ("soft migrations rock!")
0x20, 0x6d, 0x69, 0x67, // vector<uint8>.data [cont.]
0x72, 0x61, 0x74, 0x69, // vector<uint8>.data [cont.]
0x6f, 0x6e, 0x73, 0x20, // vector<uint8>.data [cont.]
0x72, 0x6f, 0x63, 0x6b, // vector<uint8>.data [cont.]
0x21, 0x00, 0x00, 0x00, // vector<uint8>.data [cont.] + padding
// vector<Sandwich1>[0]:
0x01, 0x02, 0x03, 0x04, // Sandwich1WithOptUnion.before
0x00, 0x00, 0x00, 0x00, // Sandwich1WithOptUnion.before (padding)
0x00, 0x00, 0x00, 0x00, // Sandwich1WithOptUnion.opt_union (absent)
0x00, 0x00, 0x00, 0x00, // Sandwich1WithOptUnion.opt_union (absent) [cont.]
0x05, 0x06, 0x07, 0x08, // Sandwich1WithOptUnion.after
0x00, 0x00, 0x00, 0x00, // Sandwich1WithOptUnion.after (padding)
0x68, 0x61, 0x72, 0x64, // vector<uint8>.data ("hard transitions suck!")
0x20, 0x74, 0x72, 0x61, // vector<uint8>.data [cont.]
0x6e, 0x73, 0x69, 0x74, // vector<uint8>.data [cont.]
0x69, 0x6f, 0x6e, 0x73, // vector<uint8>.data [cont.]
0x20, 0x73, 0x75, 0x63, // vector<uint8>.data [cont.]
0x6b, 0x21, 0x00, 0x00, // vector<uint8>.data [cont.] + padding
};
uint8_t regression1_old_and_v1[] = {
0x01, 0x00, 0x00, 0x00, // f1 and padding
0x02, 0x00, 0x00, 0x00, // f2 and padding
0x03, 0x00, 0x04, 0x00, // f3, f3 padding and f4
0x00, 0x00, 0x00, 0x00, // f4 padding
0x05, 0x00, 0x00, 0x00, // f5
0x00, 0x00, 0x00, 0x00, // f5
0x06, 0x00, 0x00, 0x00, // f6 and padding
0x00, 0x00, 0x00, 0x00, // f6 padding
};
uint8_t regression2_old_and_v1[] = {
0x01, 0x00, 0x00, 0x00, // f1 and padding
0x02, 0x00, 0x00, 0x00, // f2 and padding
0x03, 0x00, 0x04, 0x00, // f3, f3 padding and f4
0x00, 0x00, 0x00, 0x00, // f4 padding
0x05, 0x00, 0x00, 0x00, // f5
0x00, 0x00, 0x00, 0x00, // f5
0x06, 0x00, 0x00, 0x00, // f6 and padding
0x00, 0x00, 0x00, 0x00, // f6 padding
0x07, 0x00, 0x00, 0x00, // f7 and padding
0x00, 0x00, 0x00, 0x00, // f7 padding
};
uint8_t regression3_absent_old_and_v1[] = {
0x00, 0x00, 0x00, 0x00, // opt_value.absence
0x00, 0x00, 0x00, 0x00, // opt_value.absence [cont.]
};
uint8_t regression3_present_old_and_v1[] = {
0xFF, 0xFF, 0xFF, 0xFF, // opt_value.presence
0xFF, 0xFF, 0xFF, 0xFF, // opt_value.presence [cont.]
0x01, 0x00, 0x00, 0x00, // f1 and padding
0x02, 0x00, 0x00, 0x00, // f2 and padding
0x03, 0x00, 0x04, 0x00, // f3, f3 padding and f4
0x00, 0x00, 0x00, 0x00, // f4 padding
0x05, 0x00, 0x00, 0x00, // f5
0x00, 0x00, 0x00, 0x00, // f5
0x06, 0x00, 0x00, 0x00, // f6 and padding
0x00, 0x00, 0x00, 0x00, // f6 padding
0x07, 0x00, 0x00, 0x00, // f7 and padding
0x00, 0x00, 0x00, 0x00, // f7 padding
};
uint8_t regression4_old_and_v1[] = {
0x01, 0x00, 0x00, 0x00, // f1 (uint8) and padding
0x02, 0x00, 0x00, 0x00, // f2 (uint32)
0x09, 0x0A, 0x0B, 0x03, // StructSize3Alignment1 data (3 bytes) + f3 (uint8)
0x04, 0x00, 0x00, 0x00, // f4 (uint16), f4 padding
0x05, 0x00, 0x00, 0x00, // f5 (uint64)
0x00, 0x00, 0x00, 0x00, // f5
0x06, 0x00, 0x00, 0x00, // f6 (uint8) and padding
0x00, 0x00, 0x00, 0x00, // f6 padding
};
uint8_t regression5_old_and_v1[] = {
0x01, 0x00, 0x00, 0x00, // f1 (uint8) + padding
0x2F, 0x30, 0x31, 0x32, // f2 (uint32 enum)
0x08, 0x00, 0x15, 0x16, // f3 (uint8 enum) + padding + f4 (uint16)
0x00, 0x00, 0x00, 0x00, // padding
0x5D, 0x5E, 0x5F, 0x60, // f5 (uint64)
0x61, 0x62, 0x63, 0x64, // f5 (uint64) [cont.]
0x08, 0x00, 0x00, 0x00, // f6 (uint8) + padding
0x00, 0x00, 0x00, 0x00, // padding
};
uint8_t regression6_old_and_v1[] = {
0x01, 0x00, 0x00, 0x00, // f1 (uint8) + padding
0x30, 0x00, 0x00, 0x03, // f2 (uint32 enum)
0x08, 0x00, 0x15, 0x16, // f3 (uint8 enum) + padding + f4 (uint16)
0x00, 0x00, 0x00, 0x00, // padding
0x5D, 0x5E, 0x5F, 0x60, // f5 (uint64)
0x61, 0x62, 0x63, 0x64, // f5 (uint64) [cont.]
0x08, 0x00, 0x00, 0x00, // f6 (uint8) + padding
0x00, 0x00, 0x00, 0x00, // padding
};
uint8_t size5alignment1array_old_and_v1[] = {
0x01, 0x02, 0x03, 0x04, // a.data[0]
0x05, 0x06, 0x07, 0x08, // a.data[0] & a.data[1]
0x09, 0x0a, 0x0b, 0x0c, // a.data[1] & a.data[2]
0x0d, 0x0e, 0x0f, 0x00, // a.data[2] & padding
};
uint8_t size5alignment4array_old_and_v1[] = {
0x01, 0x02, 0x03, 0x04, // a[0].four
0x05, 0x00, 0x00, 0x00, // a[0].one + padding
0x06, 0x07, 0x08, 0x09, // a[1].four
0x0a, 0x00, 0x00, 0x00, // a[1].one + padding
0x0b, 0x0c, 0x0d, 0x0e, // a[2].four
0x0f, 0x00, 0x00, 0x00, // a[2].one + padding
};
uint8_t size5alignment1vector_old_and_v1[] = {
0x02, 0x00, 0x00, 0x00, // v.size
0x00, 0x00, 0x00, 0x00, // v.size [cont.]
0xFF, 0xFF, 0xFF, 0xFF, // v.presence
0xFF, 0xFF, 0xFF, 0xFF, // v.presence [cont.]
0x01, 0x02, 0x03, 0x04, // v[0].a.data
0x05, 0x06, 0x07, 0x08, // v[0].a.data [cont.] & v[1].a.data
0x09, 0x0a, 0x00, 0x00, // v[1].a.data [cont.] & padding
0x00, 0x00, 0x00, 0x00, // padding for top-level struct
};
uint8_t size5alignment4vector_old_and_v1[] = {
0x02, 0x00, 0x00, 0x00, // v.size
0x00, 0x00, 0x00, 0x00, // v.size [cont.]
0xFF, 0xFF, 0xFF, 0xFF, // v.presence
0xFF, 0xFF, 0xFF, 0xFF, // v.presence [cont.]
0x01, 0x02, 0x03, 0x04, // a[0].four
0x05, 0x00, 0x00, 0x00, // a[0].one + padding
0x06, 0x07, 0x08, 0x09, // a[1].four
0x0a, 0x00, 0x00, 0x00, // a[1].one + padding
};
uint8_t table_nofields_v1_and_old[] = {
0x00, 0x00, 0x00, 0x00, // Table_NoFields.vector<envelope>.size
0x00, 0x00, 0x00, 0x00, // [cont.]
0xFF, 0xFF, 0xFF, 0xFF, // Table_NoFields.vector<envelope>.presence
0xFF, 0xFF, 0xFF, 0xFF, // [cont.]
};
uint8_t table_tworeservedfields_v1_and_old[] = {
0x00, 0x00, 0x00, 0x00, // Table_TwoReservedFields.vector<envelope>.size
0x00, 0x00, 0x00, 0x00, // [cont.]
0xFF, 0xFF, 0xFF, 0xFF, // Table_TwoReservedFields.vector<envelope>.presence
0xFF, 0xFF, 0xFF, 0xFF, // [cont.]
};
uint8_t table_structwithreservedsandwich_v1_and_old[] = {
0x03, 0x00, 0x00, 0x00, // Table_StructWithReservedSandwich.vector<envelope>.size
0x00, 0x00, 0x00, 0x00, // [cont.]
0xFF, 0xFF, 0xFF, 0xFF, // Table_StructWithReservedSandwich.vector<envelope>.presence
0xFF, 0xFF, 0xFF, 0xFF, // [cont.]
0x00, 0x00, 0x00, 0x00, // vector<envelope>[0].num_bytes 0x10
0x00, 0x00, 0x00, 0x00, // vector<envelope>[0].num_handles
0x00, 0x00, 0x00, 0x00, // vector<envelope>[0].presence
0x00, 0x00, 0x00, 0x00, // vector<envelope>[0].presence [cont.]
0x08, 0x00, 0x00, 0x00, // vector<envelope>[1].num_bytes 0x20
0x00, 0x00, 0x00, 0x00, // vector<envelope>[1].num_handles
0xFF, 0xFF, 0xFF, 0xFF, // vector<envelope>[1].presence
0xFF, 0xFF, 0xFF, 0xFF, // vector<envelope>[1].presence [cont.]
0x08, 0x00, 0x00, 0x00, // vector<envelope>[2].num_bytes 0x30
0x00, 0x00, 0x00, 0x00, // vector<envelope>[2].num_handles
0xFF, 0xFF, 0xFF, 0xFF, // vector<envelope>[2].presence
0xFF, 0xFF, 0xFF, 0xFF, // vector<envelope>[2].presence [cont.]
0x09, 0x0A, 0x0B, 0x00, // StructSize3Alignment1 data (3 bytes) + padding (1 byte) 0x40
0x00, 0x00, 0x00, 0x00, // StructSize3Alignment1 padding [cont.]
0x19, 0x1A, 0x1B, 0x00, // StructSize3Alignment1 data (3 bytes) + padding (1 byte)
0x00, 0x00, 0x00, 0x00, // StructSize3Alignment1 padding [cont.]
};
uint8_t table_structwithuint32sandwich_v1_and_old[] = {
0x04, 0x00, 0x00, 0x00, // Table_StructWithUint32Sandwich.vector<envelope>.size
0x00, 0x00, 0x00, 0x00, // [cont.]
0xFF, 0xFF, 0xFF, 0xFF, // Table_StructWithUint32Sandwich.vector<envelope>.presence
0xFF, 0xFF, 0xFF, 0xFF, // [cont.]
0x08, 0x00, 0x00, 0x00, // vector<envelope>[0].num_bytes 0x10
0x00, 0x00, 0x00, 0x00, // vector<envelope>[0].num_handles
0xFF, 0xFF, 0xFF, 0xFF, // vector<envelope>[0].presence
0xFF, 0xFF, 0xFF, 0xFF, // vector<envelope>[0].presence [cont.]
0x08, 0x00, 0x00, 0x00, // vector<envelope>[1].num_bytes 0x20
0x00, 0x00, 0x00, 0x00, // vector<envelope>[1].num_handles
0xFF, 0xFF, 0xFF, 0xFF, // vector<envelope>[1].presence
0xFF, 0xFF, 0xFF, 0xFF, // vector<envelope>[1].presence [cont.]
0x08, 0x00, 0x00, 0x00, // vector<envelope>[2].num_bytes 0x30
0x00, 0x00, 0x00, 0x00, // vector<envelope>[2].num_handles
0xFF, 0xFF, 0xFF, 0xFF, // vector<envelope>[2].presence
0xFF, 0xFF, 0xFF, 0xFF, // vector<envelope>[2].presence [cont.]
0x08, 0x00, 0x00, 0x00, // vector<envelope>[3].num_bytes 0x40
0x00, 0x00, 0x00, 0x00, // vector<envelope>[3].num_handles
0xFF, 0xFF, 0xFF, 0xFF, // vector<envelope>[3].presence
0xFF, 0xFF, 0xFF, 0xFF, // vector<envelope>[3].presence [cont.]
0x01, 0x02, 0x03, 0x04, // i 0x50
0x00, 0x00, 0x00, 0x00, // i padding
0x09, 0x0A, 0x0B, 0x00, // StructSize3Alignment1 data (3 bytes) + padding (1 byte)
0x00, 0x00, 0x00, 0x00, // StructSize3Alignment1 padding [cont.]
0x19, 0x1A, 0x1B, 0x00, // StructSize3Alignment1 data (3 bytes) + padding (1 byte) 0x60
0x00, 0x00, 0x00, 0x00, // StructSize3Alignment1 padding [cont.]
0x0A, 0x0B, 0x0C, 0x0D, // i2
0x00, 0x00, 0x00, 0x00, // i2 padding
};
uint8_t table_unionwithvector_reservedsandwich_v1[] = {
0x02, 0x00, 0x00, 0x00, // Table_UnionWithVector_ReservedSandwich.vector<envelope>.size
0x00, 0x00, 0x00, 0x00, // [cont.]
0xFF, 0xFF, 0xFF, 0xFF, // Table_UnionWithVector_ReservedSandwich.vector<envelope>.presence
0xFF, 0xFF, 0xFF, 0xFF, // [cont.]
0x00, 0x00, 0x00, 0x00, // vector<envelope>[0].num_bytes 0x10
0x00, 0x00, 0x00, 0x00, // vector<envelope>[0].num_handles
0x00, 0x00, 0x00, 0x00, // vector<envelope>[0].presence
0x00, 0x00, 0x00, 0x00, // vector<envelope>[0].presence [cont.]
0x30, 0x00, 0x00, 0x00, // vector<envelope>[1].num_bytes 0x20
0x00, 0x00, 0x00, 0x00, // vector<envelope>[1].num_handles
0xFF, 0xFF, 0xFF, 0xFF, // vector<envelope>[1].presence
0xFF, 0xFF, 0xFF, 0xFF, // vector<envelope>[1].presence [cont.]
0x03, 0x00, 0x00, 0x00, // UnionWithVector.xunion.ordinal (string) 0x30
0x00, 0x00, 0x00, 0x00, // UnionWithVector.xunion.padding
0x18, 0x00, 0x00, 0x00, // UnionWithVector.xunion.envelope.size
0x00, 0x00, 0x00, 0x00, // UnionWithVector.xunion.envelope.size [cont.]
0xFF, 0xFF, 0xFF, 0xFF, // UnionWithVector.xunion.envelope.presence 0x40
0xFF, 0xFF, 0xFF, 0xFF, // UnionWithVector.xunion.envelope.presence [cont.]
0x05, 0x00, 0x00, 0x00, // string.size
0x00, 0x00, 0x00, 0x00, // string.size [cont.]
0xFF, 0xFF, 0xFF, 0xFF, // string.presence 0x50
0xFF, 0xFF, 0xFF, 0xFF, // string.presence [cont.]
0x68, 0x65, 0x6c, 0x6c, // "hello"
0x6f, 0x00, 0x00, 0x00, // "hello" [cont.] and padding
};
uint8_t table_unionwithvector_reservedsandwich_old[] = {
0x02, 0x00, 0x00, 0x00, // Table_UnionWithVector_ReservedSandwich.vector<envelope>.size
0x00, 0x00, 0x00, 0x00, // [cont.]
0xFF, 0xFF, 0xFF, 0xFF, // Table_UnionWithVector_ReservedSandwich.vector<envelope>.presence
0xFF, 0xFF, 0xFF, 0xFF, // [cont.]
0x00, 0x00, 0x00, 0x00, // vector<envelope>[0].num_bytes 0x10
0x00, 0x00, 0x00, 0x00, // vector<envelope>[0].num_handles
0x00, 0x00, 0x00, 0x00, // vector<envelope>[0].presence
0x00, 0x00, 0x00, 0x00, // vector<envelope>[0].presence [cont.]
0x20, 0x00, 0x00, 0x00, // vector<envelope>[1].num_bytes 0x20
0x00, 0x00, 0x00, 0x00, // vector<envelope>[1].num_handles
0xFF, 0xFF, 0xFF, 0xFF, // vector<envelope>[1].presence
0xFF, 0xFF, 0xFF, 0xFF, // vector<envelope>[1].presence [cont.]
0x02, 0x00, 0x00, 0x00, // UnionWithVector.tag (string) 0x30
0x00, 0x00, 0x00, 0x00, // UnionWithVector.tag padding
0x05, 0x00, 0x00, 0x00, // string.size
0x00, 0x00, 0x00, 0x00, // string.size [cont.]
0xFF, 0xFF, 0xFF, 0xFF, // string.presence 0x40
0xFF, 0xFF, 0xFF, 0xFF, // string.presence [cont.]
0x68, 0x65, 0x6c, 0x6c, // "hello" 0x50
0x6f, 0x00, 0x00, 0x00, // "hello" [cont.] and padding
};
uint8_t table_unionwithvector_structsandwich_v1[] = {
0x03, 0x00, 0x00, 0x00, // Table_UnionWithVector_StructSandwich.vector<envelope>.size
0x00, 0x00, 0x00, 0x00, // [cont.]
0xFF, 0xFF, 0xFF, 0xFF, // Table_UnionWithVector_StructSandwich.vector<envelope>.presence
0xFF, 0xFF, 0xFF, 0xFF, // [cont.]
0x08, 0x00, 0x00, 0x00, // vector<envelope>[0].num_bytes 0x10
0x00, 0x00, 0x00, 0x00, // vector<envelope>[0].num_handles
0xFF, 0xFF, 0xFF, 0xFF, // vector<envelope>[0].presence
0xFF, 0xFF, 0xFF, 0xFF, // vector<envelope>[0].presence [cont.]
0x30, 0x00, 0x00, 0x00, // vector<envelope>[1].num_bytes 0x20
0x00, 0x00, 0x00, 0x00, // vector<envelope>[1].num_handles
0xFF, 0xFF, 0xFF, 0xFF, // vector<envelope>[1].presence
0xFF, 0xFF, 0xFF, 0xFF, // vector<envelope>[1].presence [cont.]
0x08, 0x00, 0x00, 0x00, // vector<envelope>[2].num_bytes 0x30
0x00, 0x00, 0x00, 0x00, // vector<envelope>[2].num_handles
0xFF, 0xFF, 0xFF, 0xFF, // vector<envelope>[2].presence
0xFF, 0xFF, 0xFF, 0xFF, // vector<envelope>[2].presence [cont.]
0x01, 0x02, 0x03, 0x00, // s1.three_bytes and padding 0x40
0x00, 0x00, 0x00, 0x00, // s1 padding
0x03, 0x00, 0x00, 0x00, // UnionWithVector.xunion.ordinal (string)
0x00, 0x00, 0x00, 0x00, // UnionWithVector.xunion.padding
0x18, 0x00, 0x00, 0x00, // UnionWithVector.xunion.envelope.size 0x50
0x00, 0x00, 0x00, 0x00, // UnionWithVector.xunion.envelope.size [cont.]
0xFF, 0xFF, 0xFF, 0xFF, // UnionWithVector.xunion.envelope.presence
0xFF, 0xFF, 0xFF, 0xFF, // UnionWithVector.xunion.envelope.presence [cont.]
0x05, 0x00, 0x00, 0x00, // string.size 0x60
0x00, 0x00, 0x00, 0x00, // string.size [cont.]
0xFF, 0xFF, 0xFF, 0xFF, // string.presence
0xFF, 0xFF, 0xFF, 0xFF, // string.presence [cont.]
0x68, 0x65, 0x6c, 0x6c, // "hello" 0x70
0x6f, 0x00, 0x00, 0x00, // "hello" [cont.] and padding
0x04, 0x05, 0x06, 0x00, // s2.three_bytes and padding 0x80
0x00, 0x00, 0x00, 0x00, // s2 padding
};
uint8_t table_unionwithvector_structsandwich_old[] = {
0x03, 0x00, 0x00, 0x00, // Table_UnionWithVector_StructSandwich.vector<envelope>.size
0x00, 0x00, 0x00, 0x00, // [cont.]
0xFF, 0xFF, 0xFF, 0xFF, // Table_UnionWithVector_StructSandwich.vector<envelope>.presence
0xFF, 0xFF, 0xFF, 0xFF, // [cont.]
0x08, 0x00, 0x00, 0x00, // vector<envelope>[0].num_bytes 0x10
0x00, 0x00, 0x00, 0x00, // vector<envelope>[0].num_handles
0xFF, 0xFF, 0xFF, 0xFF, // vector<envelope>[0].presence
0xFF, 0xFF, 0xFF, 0xFF, // vector<envelope>[0].presence [cont.]
0x20, 0x00, 0x00, 0x00, // vector<envelope>[1].num_bytes 0x20
0x00, 0x00, 0x00, 0x00, // vector<envelope>[1].num_handles
0xFF, 0xFF, 0xFF, 0xFF, // vector<envelope>[1].presence
0xFF, 0xFF, 0xFF, 0xFF, // vector<envelope>[1].presence [cont.]
0x08, 0x00, 0x00, 0x00, // vector<envelope>[2].num_bytes 0x30
0x00, 0x00, 0x00, 0x00, // vector<envelope>[2].num_handles
0xFF, 0xFF, 0xFF, 0xFF, // vector<envelope>[2].presence
0xFF, 0xFF, 0xFF, 0xFF, // vector<envelope>[2].presence [cont.]
0x01, 0x02, 0x03, 0x00, // s1.three_bytes and padding 0x40
0x00, 0x00, 0x00, 0x00, // s1 padding
0x02, 0x00, 0x00, 0x00, // UnionWithVector.tag (string)
0x00, 0x00, 0x00, 0x00, // UnionWithVector.tag padding
0x05, 0x00, 0x00, 0x00, // string.size 0x50
0x00, 0x00, 0x00, 0x00, // string.size [cont.]
0xFF, 0xFF, 0xFF, 0xFF, // string.presence
0xFF, 0xFF, 0xFF, 0xFF, // string.presence [cont.]
0x68, 0x65, 0x6c, 0x6c, // "hello" 0x60
0x6f, 0x00, 0x00, 0x00, // "hello" [cont.] and padding
0x04, 0x05, 0x06, 0x00, // s2.three_bytes and padding 0x70
0x00, 0x00, 0x00, 0x00, // s2 padding
};
uint8_t xunionwithstruct_old_and_v1[] = {
0x0B, 0xC4, 0xB0, 0x04, // XUnionWithStruct.xunion.ordinal
0x00, 0x00, 0x00, 0x00, // XUnionWithStruct.xunion.ordinal padding
0x08, 0x00, 0x00, 0x00, // XUnionWithStruct.xunion.envelope.num_bytes
0x00, 0x00, 0x00, 0x00, // XUnionWithStruct.xunion.envelope.num_handles
0xFF, 0xFF, 0xFF, 0xFF, // XUnionWithStruct.xunion.envelope.presence 0x10
0xFF, 0xFF, 0xFF, 0xFF, // XUnionWithStruct.xunion.envelope.presence [cont.]
0x01, 0x02, 0x03, 0x00, // s and padding
0x00, 0x00, 0x00, 0x00, // padding [cont.]
};
uint8_t xunionwithunknownordinal_old_and_v1[] = {
0xBA, 0x5E, 0xBA, 0x11, // XUnionWithStruct.xunion.ordinal
0x00, 0x00, 0x00, 0x00, // XUnionWithStruct.xunion.ordinal padding
0x10, 0x00, 0x00, 0x00, // XUnionWithStruct.xunion.envelope.num_bytes
0x00, 0x00, 0x00, 0x00, // XUnionWithStruct.xunion.envelope.num_handles
0xFF, 0xFF, 0xFF, 0xFF, // XUnionWithStruct.xunion.envelope.presence 0x10
0xFF, 0xFF, 0xFF, 0xFF, // XUnionWithStruct.xunion.envelope.presence [cont.]
0x01, 0x02, 0x03, 0x04, // random data
0x05, 0x06, 0x07, 0x08, // random data [cont.]
0x09, 0x0A, 0x0B, 0x0C, // random data 0x20
0x0D, 0x0E, 0x0F, 0x10, // random data [cont.]
};
uint8_t arraystruct_v1[] = {
0x01, 0x00, 0x00, 0x00, // unions[0].tag 0x00
0x00, 0x00, 0x00, 0x00, // unions[0].tag (padding)
0x18, 0x00, 0x00, 0x00, // unions[0].envelope.num_bytes
0x00, 0x00, 0x00, 0x00, // unions[0].envelope.num_handles
0xFF, 0xFF, 0xFF, 0xFF, // unions[0].presence 0x10
0xFF, 0xFF, 0xFF, 0xFF, // unions[0].presence [cont.]
0x01, 0x00, 0x00, 0x00, // unions[1].tag
0x00, 0x00, 0x00, 0x00, // unions[1].tag (padding)
0x18, 0x00, 0x00, 0x00, // unions[1].envelope.num_bytes 0x20
0x00, 0x00, 0x00, 0x00, // unions[1].envelope.num_handles
0xFF, 0xFF, 0xFF, 0xFF, // unions[1].presence
0xFF, 0xFF, 0xFF, 0xFF, // unions[1].presence [cont.]
0x01, 0x00, 0x00, 0x00, // unions[2].tag 0x30
0x00, 0x00, 0x00, 0x00, // unions[2].tag (padding)
0x18, 0x00, 0x00, 0x00, // unions[2].envelope.num_bytes
0x00, 0x00, 0x00, 0x00, // unions[2].envelope.num_handles
0xFF, 0xFF, 0xFF, 0xFF, // unions[2].presence 0x40
0xFF, 0xFF, 0xFF, 0xFF, // unions[2].presence [cont.]
0x01, 0x00, 0x00, 0x00, // unions[3].tag
0x00, 0x00, 0x00, 0x00, // unions[3].tag (padding)
0x18, 0x00, 0x00, 0x00, // unions[3].envelope.num_bytes 0x50
0x00, 0x00, 0x00, 0x00, // unions[3].envelope.num_handles
0xFF, 0xFF, 0xFF, 0xFF, // unions[3].presence
0xFF, 0xFF, 0xFF, 0xFF, // unions[3].presence [cont.]
0x01, 0x00, 0x00, 0x00, // unions[4].tag 0x60
0x00, 0x00, 0x00, 0x00, // unions[4].tag (padding)
0x18, 0x00, 0x00, 0x00, // unions[4].envelope.num_bytes
0x00, 0x00, 0x00, 0x00, // unions[4].envelope.num_handles
0xFF, 0xFF, 0xFF, 0xFF, // unions[4].presence 0x70
0xFF, 0xFF, 0xFF, 0xFF, // unions[4].presence [cont.]
0x01, 0x00, 0x00, 0x00, // unions[5].tag
0x00, 0x00, 0x00, 0x00, // unions[5].tag (padding)
0x18, 0x00, 0x00, 0x00, // unions[5].envelope.num_bytes 0x80
0x00, 0x00, 0x00, 0x00, // unions[5].envelope.num_handles
0xFF, 0xFF, 0xFF, 0xFF, // unions[5].presence
0xFF, 0xFF, 0xFF, 0xFF, // unions[5].presence [cont.]
0x03, 0x00, 0x00, 0x00, // unions[0] data: StringUnion.s.size 0x90
0x00, 0x00, 0x00, 0x00, // unions[0] data: StringUnion.s.size [cont.]
0xFF, 0xFF, 0xFF, 0xFF, // unions[0] data: StringUnion.s.presence
0xFF, 0xFF, 0xFF, 0xFF, // unions[0] data: StringUnion.s.presence [cont.]
0x6F, 0x6E, 0x65, 0x00, // unions[0] data: StringUnion.s data ("one") 0xa0
0x00, 0x00, 0x00, 0x00, // unions[0] data: StringUnion.s data padding
0x03, 0x00, 0x00, 0x00, // unions[1] data: StringUnion.s.size
0x00, 0x00, 0x00, 0x00, // unions[1] data: StringUnion.s.size [cont.]
0xFF, 0xFF, 0xFF, 0xFF, // unions[1] data: StringUnion.s.presence 0xb0
0xFF, 0xFF, 0xFF, 0xFF, // unions[1] data: StringUnion.s.presence [cont.]
0x74, 0x77, 0x6F, 0x00, // unions[1].s data ("two")
0x00, 0x00, 0x00, 0x00, // unions[1] data: StringUnion.s data padding
0x05, 0x00, 0x00, 0x00, // unions[2] data: StringUnion.s.size 0xc0
0x00, 0x00, 0x00, 0x00, // unions[2] data: StringUnion.s.size [cont.]
0xFF, 0xFF, 0xFF, 0xFF, // unions[2] data: StringUnion.s.presence
0xFF, 0xFF, 0xFF, 0xFF, // unions[2] data: StringUnion.s.presence [cont.]
0x74, 0x68, 0x72, 0x65, // unions[2].s data ("three") 0xd0
0x65, 0x00, 0x00, 0x00, // padding
0x04, 0x00, 0x00, 0x00, // unions[3] data: StringUnion.s.size
0x00, 0x00, 0x00, 0x00, // unions[3] data: StringUnion.s.size [cont.]
0xFF, 0xFF, 0xFF, 0xFF, // unions[3] data: StringUnion.s.presence 0xe0
0xFF, 0xFF, 0xFF, 0xFF, // unions[3] data: StringUnion.s.presence [cont.]
0x66, 0x6F, 0x75, 0x72, // optional_unions[0].s data ("four")
0x00, 0x00, 0x00, 0x00, // optional_unions[0].s data padding
0x04, 0x00, 0x00, 0x00, // unions[4] data: StringUnion.s.size 0xf0
0x00, 0x00, 0x00, 0x00, // unions[4] data: StringUnion.s.size [cont.]
0xFF, 0xFF, 0xFF, 0xFF, // unions[4] data: StringUnion.s.presence
0xFF, 0xFF, 0xFF, 0xFF, // unions[4] data: StringUnion.s.presence [cont.]
0x66, 0x69, 0x76, 0x65, // optional_unions[1].s data ("five")
0x00, 0x00, 0x00, 0x00, // optional_unions[1].s data padding
0x03, 0x00, 0x00, 0x00, // unions[5] data: StringUnion.s.size
0x00, 0x00, 0x00, 0x00, // unions[5] data: StringUnion.s.size [cont.]
0xFF, 0xFF, 0xFF, 0xFF, // unions[5] data: StringUnion.s.presence
0xFF, 0xFF, 0xFF, 0xFF, // unions[5] data: StringUnion.s.presence [cont.]
0x73, 0x69, 0x78, 0x00, // optional_unions[2].s data ("six")
0x00, 0x00, 0x00, 0x00, // optional_unions[2].s data padding
};
uint8_t arraystruct_old[] = {
0x00, 0x00, 0x00, 0x00, // unions[0].tag 0x00
0x00, 0x00, 0x00, 0x00, // unions[0].tag (padding)
0x03, 0x00, 0x00, 0x00, // unions[0].s.length
0x00, 0x00, 0x00, 0x00, // unions[0].s.length [cont.]
0xFF, 0xFF, 0xFF, 0xFF, // unions[0].s.presence 0x10
0xFF, 0xFF, 0xFF, 0xFF, // unions[0].s.presence [cont.]
0x00, 0x00, 0x00, 0x00, // unions[1].tag
0x00, 0x00, 0x00, 0x00, // unions[1].tag (padding)
0x03, 0x00, 0x00, 0x00, // unions[1].s.length 0x20
0x00, 0x00, 0x00, 0x00, // unions[1].s.length [cont.]
0xFF, 0xFF, 0xFF, 0xFF, // unions[1].s.presence
0xFF, 0xFF, 0xFF, 0xFF, // unions[1].s.presence [cont.]
0x00, 0x00, 0x00, 0x00, // unions[2].tag 0x30
0x00, 0x00, 0x00, 0x00, // unions[2].tag (padding)
0x05, 0x00, 0x00, 0x00, // unions[2].s.length
0x00, 0x00, 0x00, 0x00, // unions[2].s.length [cont.]
0xFF, 0xFF, 0xFF, 0xFF, // unions[2].s.presence 0x40
0xFF, 0xFF, 0xFF, 0xFF, // unions[2].s.presence [cont.]
0xFF, 0xFF, 0xFF, 0xFF, // optional_unions[0] presence
0xFF, 0xFF, 0xFF, 0xFF, // optional_unions[0] presence
0xFF, 0xFF, 0xFF, 0xFF, // optional_unions[1] presence 0x50
0xFF, 0xFF, 0xFF, 0xFF, // optional_unions[1] presence
0xFF, 0xFF, 0xFF, 0xFF, // optional_unions[2] presence
0xFF, 0xFF, 0xFF, 0xFF, // optional_unions[2] presence
0x6F, 0x6E, 0x65, 0x00, // unions[0].s data ("one") 0x60
0x00, 0x00, 0x00, 0x00, // padding
0x74, 0x77, 0x6F, 0x00, // unions[1].s data ("two")
0x00, 0x00, 0x00, 0x00, // padding
0x74, 0x68, 0x72, 0x65, // unions[2].s data ("three") 0x70
0x65, 0x00, 0x00, 0x00, // padding
0x00, 0x00, 0x00, 0x00, // optional_unions[0].tag
0x00, 0x00, 0x00, 0x00, // optional_unions[0].tag (padding)
0x04, 0x00, 0x00, 0x00, // optional_unions[0].s.length 0x80
0x00, 0x00, 0x00, 0x00, // optional_unions[0].s.length [cont.]
0xFF, 0xFF, 0xFF, 0xFF, // optional_unions[0].s.presence
0xFF, 0xFF, 0xFF, 0xFF, // optional_unions[0].s.presence [cont.]
0x66, 0x6F, 0x75, 0x72, // optional_unions[0].s data ("four") 0x90
0x00, 0x00, 0x00, 0x00, // optional_unions[0].s data padding
0x00, 0x00, 0x00, 0x00, // optional_unions[1].tag
0x00, 0x00, 0x00, 0x00, // optional_unions[1].tag (padding)
0x04, 0x00, 0x00, 0x00, // optional_unions[1].s.length
0x00, 0x00, 0x00, 0x00, // optional_unions[1].s.length [cont.]
0xFF, 0xFF, 0xFF, 0xFF, // optional_unions[1].s.presence
0xFF, 0xFF, 0xFF, 0xFF, // optional_unions[1].s.presence [cont.]
0x66, 0x69, 0x76, 0x65, // optional_unions[1].s data ("five")
0x00, 0x00, 0x00, 0x00, // optional_unions[1].s data padding
0x00, 0x00, 0x00, 0x00, // optional_unions[2].tag
0x00, 0x00, 0x00, 0x00, // optional_unions[2].tag (padding)
0x03, 0x00, 0x00, 0x00, // optional_unions[2].s.length
0x00, 0x00, 0x00, 0x00, // optional_unions[2].s.length [cont.]
0xFF, 0xFF, 0xFF, 0xFF, // optional_unions[2].s.presence
0xFF, 0xFF, 0xFF, 0xFF, // optional_unions[2].s.presence [cont.]
0x73, 0x69, 0x78, 0x00, // optional_unions[2].s data ("six")
0x00, 0x00, 0x00, 0x00, // optional_unions[2].s data padding
};
uint8_t mixed_fields_v1[] = {
0xf0, 0xf1, 0xf2, 0xf3, // Fake transaction header
0xf4, 0xf5, 0xf6, 0xf7, // [cont.]
0xf8, 0xf9, 0xfa, 0xfb, // [cont.]
0xfc, 0xfd, 0xfe, 0xff, // [cont.]
0x01, 0x02, 0x03, 0x04, // before
0x00, 0x00, 0x00, 0x00, // before (padding)
0x03, 0x00, 0x00, 0x00, // UnionSize8Aligned4.tag
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.padding
0x08, 0x00, 0x00, 0x00, // UnionSize8Aligned4.env.num_bytes
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.env.num_handle
0xff, 0xff, 0xff, 0xff, // UnionSize8Aligned4.env.presence
0xff, 0xff, 0xff, 0xff, // UnionSize8Aligned4.presence [cont.]
0x0a, 0x0b, 0x00, 0x00, // middle_start
0x00, 0x00, 0x00, 0x00, // middle_start (padding)
0x08, 0x07, 0x06, 0x05, // middle_end
0x04, 0x03, 0x02, 0x01, // middle_end
0x03, 0x00, 0x00, 0x00, // UnionSize8Aligned4.tag
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.padding
0x08, 0x00, 0x00, 0x00, // UnionSize8Aligned4.env.num_bytes
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.env.num_handle
0xff, 0xff, 0xff, 0xff, // UnionSize8Aligned4.env.presence
0xff, 0xff, 0xff, 0xff, // UnionSize8Aligned4.presence [cont.]
0x05, 0x06, 0x07, 0x08, // after
0x00, 0x00, 0x00, 0x00, // after (padding)
0x09, 0x0a, 0x0b, 0x0c, // UnionSize8Aligned4.data, i.e. Sandwich1.the_union.data
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.data (padding)
0x90, 0xa0, 0xb0, 0xc0, // UnionSize8Aligned4.data, i.e. Sandwich1.the_union.data
0x00, 0x00, 0x00, 0x00, // UnionSize8Aligned4.data (padding)
};
uint8_t mixed_fields_old[] = {
0xf0, 0xf1, 0xf2, 0xf3, // Fake transaction header
0xf4, 0xf5, 0xf6, 0xf7, // [cont.]
0xf8, 0xf9, 0xfa, 0xfb, // [cont.]
0xfc, 0xfd, 0xfe, 0xff, // [cont.]
0x01, 0x02, 0x03, 0x04, // before
0x02, 0x00, 0x00, 0x00, // UnionSize8Aligned4.tag
0x09, 0x0a, 0x0b, 0x0c, // UnionSize8Aligned4.data, i.e. Sandwich1.the_union.data
0x0a, 0x0b, 0x00, 0x00, // middle_start
0x08, 0x07, 0x06, 0x05, // middle_end
0x04, 0x03, 0x02, 0x01, // middle_end
0x02, 0x00, 0x00, 0x00, // UnionSize8Aligned4.tag
0x90, 0xa0, 0xb0, 0xc0, // UnionSize8Aligned4.data, i.e. Sandwich1.the_union.data
0x05, 0x06, 0x07, 0x08, // after
0x00, 0x00, 0x00, 0x00, // after (padding)
};
const uint8_t nocodingtablesstressor_v1[] = {
0x11, 0x11, 0x11, 0x11, // 0x00
0x11, 0x11, 0x11, 0x11, //
0x22, 0x22, 0x22, 0x22, //
0x22, 0x22, 0x22, 0x22, //
0x04, 0x00, 0x00, 0x00, // 0x10
0x00, 0x00, 0x00, 0x00, //
0x20, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, // 0x20
0xff, 0xff, 0xff, 0xff, //
0x44, 0x44, 0x44, 0x44, //
0x44, 0x44, 0x44, 0x44, //
0x55, 0x55, 0x55, 0x55, // 0x30
0x55, 0x55, 0x55, 0x55, //
0x04, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, //
0x20, 0x00, 0x00, 0x00, // 0x40
0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, //
0xff, 0xff, 0xff, 0xff, //
0x77, 0x77, 0x77, 0x77, // 0x50
0x77, 0x77, 0x77, 0x77, //
0x88, 0x88, 0x88, 0x88, //
0x88, 0x88, 0x88, 0x88, //
0x04, 0x00, 0x00, 0x00, // 0x60
0x00, 0x00, 0x00, 0x00, //
0x20, 0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, 0x00, //
0xff, 0xff, 0xff, 0xff, // 0x70
0xff, 0xff, 0xff, 0xff, //
0xaa, 0xaa, 0xaa, 0xaa, //
0xaa, 0xaa, 0xaa, 0xaa, //
0xff, 0xff, 0xff, 0xff, // 0x80
0xff, 0xff, 0xff, 0xff, //
0xbb, 0xbb, 0xbb, 0xbb, //
0xbb, 0xbb, 0xbb, 0xbb, //
0xff, 0xff, 0xff, 0xff, // 0x90
0xff, 0xff, 0xff, 0xff, //
0xdd, 0xdd, 0xdd, 0xdd, //
0xdd, 0xdd, 0xdd, 0xdd, //
// out-of-line
0x33, 0x33, 0x33, 0x33, // 0xa0
0x33, 0x33, 0x33, 0x33, //
0x33, 0x33, 0x33, 0x33, //
0x33, 0x33, 0x33, 0x33, //
0x33, 0x33, 0x33, 0x33, // 0xb0
0x33, 0x33, 0x33, 0x33, //
0x33, 0x33, 0x33, 0x33, //
0x33, 0x33, 0x33, 0x33, //
0x66, 0x66, 0x66, 0x66, // 0xc0
0x66, 0x66, 0x66, 0x66, //
0x66, 0x66, 0x66, 0x66, //
0x66, 0x66, 0x66, 0x66, //
0x66, 0x66, 0x66, 0x66, // 0xd0
0x66, 0x66, 0x66, 0x66, //
0x66, 0x66, 0x66, 0x66, //
0x66, 0x66, 0x66, 0x66, //
0x99, 0x99, 0x99, 0x99, // 0xe0
0x99, 0x99, 0x99, 0x99, //
0x99, 0x99, 0x99, 0x99, //
0x99, 0x99, 0x99, 0x99, //
0x99, 0x99, 0x99, 0x99, // 0xf0
0x99, 0x99, 0x99, 0x99, //
0x99, 0x99, 0x99, 0x99, //
0x99, 0x99, 0x99, 0x99, //
0xee, 0xee, 0xee, 0xee, // 0x100
0xee, 0xee, 0xee, 0xee, //
0xee, 0xee, 0xee, 0xee, //
0xee, 0xee, 0xee, 0xee, //
};
uint8_t nocodingtablesstressor_old[] = {
0x11, 0x11, 0x11,