testpkg

package
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package testpkg is a fixture for dynssz-gen coverage tests.

It intentionally contains types and patterns that only exist to exercise code paths in dynssz-gen's AST scanning and tag parsing — specifically:

  • An SSZ type whose Annotate tag fails to parse (InvalidAnnotated).
  • An init() function with a non-ExprStmt (tests the "skip" branch in findAnnotateCallInDecl).
  • An unrelated sszutils call in init() (tests the "not Annotate" branch in matchAnnotateCall).

None of these types are meant for real use. The file is kept outside codegen/tests so their presence doesn't contaminate that package's generated code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AliasedAnnotated

type AliasedAnnotated []byte

AliasedAnnotated is a byte list whose Annotate call is routed through an aliased sszutils import in this file's imports.

type InvalidAnnotated

type InvalidAnnotated []byte

InvalidAnnotated carries a syntactically valid ssz-size tag that fails numeric parsing — lets tests trigger the Annotate-tag error path in dynssz-gen's run().

type NonExprInitMarker

type NonExprInitMarker []byte

NonExprInitMarker exists solely so there's a type whose name can be searched for — the init() below contains a non-ExprStmt that the scanner must skip over.

Directories

Path Synopsis
Package viewfix is a dynssz-gen coverage fixture for external view-type loading.
Package viewfix is a dynssz-gen coverage fixture for external view-type loading.
sub
Package sub holds view types for the viewfix.Base fixture.
Package sub holds view types for the viewfix.Base fixture.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL