accumulate

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Tests = func() *TestSuite {
	var s TestSuite
	err := stdjson.Unmarshal(testData, &s)
	if err != nil {
		panic(err)
	}
	return &s
}()

Functions

func RunTests

func RunTests[
	EnvTypePtr recordPtr[EnvTypePtr, EnvType],
	EnvType any,
	TxTypePtr txnType[TxType],
	AcctType any,
	TxType comparable,
	Testing testingT[Testing],
](
	t Testing,
	typ TxTypePtr,
	union *schema.UnionType,
	account Methods[AcctType],
)

Types

type BigInt

type BigInt big.Int

func (*BigInt) Copy

func (u *BigInt) Copy() *BigInt

func (*BigInt) Equal

func (u *BigInt) Equal(v *BigInt) bool

func (*BigInt) MarshalBinaryV2

func (u *BigInt) MarshalBinaryV2(e *binary.Encoder) error

func (*BigInt) MarshalJSONV2

func (u *BigInt) MarshalJSONV2(e *json.Encoder) error

func (*BigInt) UnmarshalBinaryV2

func (u *BigInt) UnmarshalBinaryV2(d *binary.Decoder) error

func (*BigInt) UnmarshalJSONV2

func (u *BigInt) UnmarshalJSONV2(d *json.Decoder) error

type Methods

type Methods[T any] struct {
	Equal           func(a, b T) bool
	Copy            func(T) T
	UnmarshalJSON   func([]byte) (T, error)
	UnmarshalBinary func([]byte) (T, error)
}

type TestCase

type TestCase struct {
	Binary []byte             `json:"binary,omitempty"`
	JSON   stdjson.RawMessage `json:"json,omitempty"`
}

type TestCaseGroup

type TestCaseGroup struct {
	Name  string      `json:"name,omitempty"`
	Cases []*TestCase `json:"cases,omitempty"`
}

type TestSuite

type TestSuite struct {
	Transactions []*TestCaseGroup `json:"transactions,omitempty"`
	Accounts     []*TestCaseGroup `json:"accounts,omitempty"`
}

type Time

type Time time.Time

func (*Time) Copy

func (u *Time) Copy() *Time

func (*Time) Equal

func (u *Time) Equal(v *Time) bool

func (*Time) MarshalBinaryV2

func (u *Time) MarshalBinaryV2(e *binary.Encoder) error

func (*Time) MarshalJSONV2

func (u *Time) MarshalJSONV2(e *json.Encoder) error

func (*Time) String

func (u *Time) String() string

func (*Time) UnmarshalBinaryV2

func (u *Time) UnmarshalBinaryV2(d *binary.Decoder) error

func (*Time) UnmarshalJSONV2

func (u *Time) UnmarshalJSONV2(d *json.Decoder) error

type URL

type URL url.URL

func MustParseURL

func MustParseURL(s string) *URL

func ParseURL

func ParseURL(s string) (*URL, error)

func (*URL) Copy

func (u *URL) Copy() *URL

func (*URL) Equal

func (u *URL) Equal(v *URL) bool

func (*URL) MarshalBinaryV2

func (u *URL) MarshalBinaryV2(e *binary.Encoder) error

func (*URL) MarshalJSONV2

func (u *URL) MarshalJSONV2(e *json.Encoder) error

func (*URL) String

func (u *URL) String() string

func (*URL) UnmarshalBinaryV2

func (u *URL) UnmarshalBinaryV2(d *binary.Decoder) error

func (*URL) UnmarshalJSONV2

func (u *URL) UnmarshalJSONV2(d *json.Decoder) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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