testserdes

package
v0.106.3 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(data []byte, a encodable) error

Decode deserializes a from a byte slice.

func DecodeBinary

func DecodeBinary(data []byte, a io.Serializable) error

DecodeBinary deserializes a from a byte slice.

func Encode

func Encode(a encodable) ([]byte, error)

Encode serializes a to a byte slice.

func EncodeBinary

func EncodeBinary(a io.Serializable) ([]byte, error)

EncodeBinary serializes a to a byte slice.

func EncodeDecode

func EncodeDecode(t *testing.T, expected, actual encodable)

EncodeDecode checks if the expected stays the same after serializing/deserializing via encodable methods.

func EncodeDecodeBinary

func EncodeDecodeBinary(t *testing.T, expected, actual io.Serializable)

EncodeDecodeBinary checks if the expected stays the same after serializing/deserializing via io.Serializable methods.

func MarshalUnmarshalJSON

func MarshalUnmarshalJSON(t *testing.T, expected, actual any)

MarshalUnmarshalJSON checks if the expected stays the same after marshal/unmarshal via JSON.

func MarshalUnmarshalYAML added in v0.100.0

func MarshalUnmarshalYAML(t *testing.T, expected, actual any)

MarshalUnmarshalYAML checks if the expected stays the same after marshal/unmarshal via YAML.

func ToFromStackItem added in v0.96.0

func ToFromStackItem(t *testing.T, expected, actual stackitem.Convertible)

ToFromStackItem checks if the expected stays the same after converting to/from StackItem.

Types

This section is empty.

Jump to

Keyboard shortcuts

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