blob: 27c46182297a3dca4aa8731caaf74d290acbcf18 [file] [log] [blame] [edit]
# 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.
[$default byte_order: "LittleEndian"]
[(cpp) namespace: "emboss::test"]
struct Constants:
let sprocket = 1
let geegaw = 2
enum Kind:
WIDGET = 0
SPROCKET = Constants.sprocket
GEEGAW = Constants.geegaw
COMPUTED = Constants.geegaw+Constants.sprocket
LARGE_VALUE = 2000
DUPLICATE_LARGE_VALUE = LARGE_VALUE
MAX32BIT = 4294967295
MAX64BIT = 0x1_0000_0000_0000_0000-1
enum Signed:
MIN64BIT = -0x8000_0000_0000_0000
MAX64BIT = 0x8000_0000_0000_0000-1
struct ManifestEntry:
0 [+1] Kind kind
1 [+4] UInt count
5 [+4] Kind wide_kind
9 [+5] bits:
4 [+32] Kind wide_kind_in_bits
struct StructContainingEnum:
enum Status:
OK = 0x00
FAILURE = 0x01
0 [+1] UInt bar