mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
* Add vectorInfo * Add 2D bytes field for test * Add tag_parser for parsing SSZ tags * Integrate tag parser with analyzer * Add ByteList test case * Changelog * Better printing feature with Stringer implementation * Return error for non-determined case without printing other values * Update tag_parser.go: handle Vector and List mutually exclusive (inspired by OffchainLabs/fastssz) * Make linter happy --------- Co-authored-by: Radosław Kapka <rkapka@wp.pl>
18 lines
486 B
Go
18 lines
486 B
Go
package query_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/OffchainLabs/prysm/v6/encoding/ssz/query"
|
|
sszquerypb "github.com/OffchainLabs/prysm/v6/proto/ssz_query"
|
|
"github.com/OffchainLabs/prysm/v6/testing/require"
|
|
)
|
|
|
|
func TestAnalyzeSSZInfo(t *testing.T) {
|
|
info, err := query.AnalyzeObject(&sszquerypb.FixedTestContainer{})
|
|
require.NoError(t, err)
|
|
|
|
require.NotNil(t, info, "Expected non-nil SSZ info")
|
|
require.Equal(t, uint64(493), info.FixedSize(), "Expected fixed size to be 333")
|
|
}
|