-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: pull in basic container tests to cover uint8 (#11)
- Loading branch information
Showing
4 changed files
with
200 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
tests/testtypes/consensus-spec-tests/gen_bits_struct_ssz.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
tests/testtypes/consensus-spec-tests/gen_single_field_test_struct_ssz.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// ssz: Go Simple Serialize (SSZ) codec library | ||
// Copyright 2024 ssz Authors | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
|
||
package consensus_spec_tests | ||
|
||
import "github.com/prysmaticlabs/go-bitfield" | ||
|
||
//go:generate go run ../../../cmd/sszgen -type SingleFieldTestStruct -out gen_single_field_test_struct_ssz.go | ||
//go:generate go run ../../../cmd/sszgen -type BitsStruct -out gen_bits_struct_ssz.go | ||
|
||
type SingleFieldTestStruct struct { | ||
A byte | ||
} | ||
|
||
type BitsStruct struct { | ||
A bitfield.Bitlist `ssz-max:"5"` | ||
B [1]byte `ssz-size:"2" ssz:"bits"` | ||
C [1]byte `ssz-size:"1" ssz:"bits"` | ||
D bitfield.Bitlist `ssz-max:"6"` | ||
E [1]byte `ssz-size:"8" ssz:"bits"` | ||
} |