Skip to content

Commit

Permalink
added test for SmallTestStruct && FixedTestStruct
Browse files Browse the repository at this point in the history
  • Loading branch information
Lavishq committed Jul 26, 2024
1 parent ca92f0f commit 69790ba
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/testtypes/consensus-spec-tests/gen_fixed_test_struct_ssz.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions tests/testtypes/consensus-spec-tests/gen_small_test_struct_ssz.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions tests/testtypes/consensus-spec-tests/types_basics.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,25 @@ package consensus_spec_tests
import "github.com/prysmaticlabs/go-bitfield"

//go:generate go run -cover ../../../cmd/sszgen -type SingleFieldTestStruct -out gen_single_field_test_struct_ssz.go
//go:generate go run -cover ../../../cmd/sszgen -type SmallTestStruct -out gen_small_test_struct_ssz.go
//go:generate go run -cover ../../../cmd/sszgen -type FixedTestStruct -out gen_fixed_test_struct_ssz.go
//go:generate go run -cover ../../../cmd/sszgen -type BitsStruct -out gen_bits_struct_ssz.go

type SingleFieldTestStruct struct {
A byte
}

type SmallTestStruct struct {
A uint16
B uint16
}

type FixedTestStruct struct {
A uint8
B uint64
C uint32
}

type BitsStruct struct {
A bitfield.Bitlist `ssz-max:"5"`
B [1]byte `ssz-size:"2" ssz:"bits"`
Expand Down

0 comments on commit 69790ba

Please sign in to comment.