Is your feature request related to a problem or challenge? Please describe what you are trying to do.
The Variant encoding uses different sizes for offsets in nested types to optimize the encoding size
Specifically
Describe the solution you'd like
I would like tests that use the VariantBuilder API and cover the following cases:
-
VariantObject with between 2^8 and 2^16 elements ( field_id_size_minus_1 = 1, 2 byte field ids)
-
VariantObject with between 2^16 and 2^24 elements ( field_id_size_minus_1 = 2, 3 byte field ids)
-
VariantObject with between 2^24 and 2^32 elements ( field_id_size_minus_1 = 3, 4 byte field ids)
-
VariantObject with total child data length between 2^8 and 2^16 elements ( field_offset_size_minus_1 = 1, 2 byte field offsets)
-
VariantObject with total child data length between 2^16 and 2^24 elements ( field_offset_size_minus_1 = 2, 3 byte field offsets)
-
VariantObject with total child data length between 2^24 and 2^32 elements ( field_offset_size_minus_1 = 3, 4 byte field offsets)
The "total child data length" can be made by adding some large strings as children (for example, by adding 1KB - 1MB Varaint::Strings via ArrayBuilder::append)
Describe alternatives you've considered
Additional context
The tests may not pass until this ticket is implemented:
If they dont' pass, we can mark them #[ignored] until it is
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
The Variant encoding uses different sizes for offsets in nested types to optimize the encoding size
Specifically
Describe the solution you'd like
I would like tests that use the
VariantBuilderAPI and cover the following cases:VariantObjectwith between 2^8 and 2^16 elements (field_id_size_minus_1= 1, 2 byte field ids)VariantObjectwith between 2^16 and 2^24 elements (field_id_size_minus_1= 2, 3 byte field ids)VariantObjectwith between 2^24 and 2^32 elements (field_id_size_minus_1= 3, 4 byte field ids)VariantObjectwith total child data length between 2^8 and 2^16 elements (field_offset_size_minus_1= 1, 2 byte field offsets)VariantObjectwith total child data length between 2^16 and 2^24 elements (field_offset_size_minus_1= 2, 3 byte field offsets)VariantObjectwith total child data length between 2^24 and 2^32 elements (field_offset_size_minus_1= 3, 4 byte field offsets)The "total child data length" can be made by adding some large strings as children (for example, by adding 1KB - 1MB
Varaint::Strings viaArrayBuilder::append)Describe alternatives you've considered
Additional context
The tests may not pass until this ticket is implemented:
If they dont' pass, we can mark them
#[ignored]until it is