blob: 096fccf305b1e1b5a865b1077e93354e2516b623 [file] [log] [blame]
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-- Test structs for arrays of Ints, UInts, and enums.
# TODO(bolms): Arrays of bit-level entities directly in structs.
[$default byte_order: "LittleEndian"]
[(cpp) namespace: "emboss::test"]
bits SizedUIntArrays:
0 [+8] UInt:4[2] one_nibble
8 [+16] UInt:8[2] two_nibble
24 [+32] UInt:16[2] four_nibble
bits SizedIntArrays:
0 [+8] Int:4[2] one_nibble
8 [+16] Int:8[2] two_nibble
24 [+32] Int:16[2] four_nibble
bits SizedEnumArrays:
0 [+8] Enum:4[2] one_nibble
8 [+16] Enum:8[2] two_nibble
24 [+32] Enum:16[2] four_nibble
struct BitArrayContainer:
0 [+7] SizedUIntArrays uint_arrays
enum Enum:
VALUE1 = 1
VALUE10 = 10
VALUE100 = 100
VALUE1000 = 1000
VALUE10000 = 10000
VALUE100000 = 100000
VALUE1000000 = 1000000
VALUE10000000 = 10000000