encodingtest

package
v0.0.0-...-6044bb4 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunM

func RunM(t *testing.T, tests []M)

RunM validates, that each passed marshaler produces exact sequence of bytes, as specified.

func RunMU

func RunMU(t *testing.T, tests []MU)

RunMU executes the marshaling and unmarshaling test for the given sequence of tests.

func RunU

func RunU(t *testing.T, tests []U)

RunU validates each passed reader produces exact objects, as expected.

Types

type M

type M struct {
	Writer io.WriterTo
	Bytes  []byte
}

M defines the marshaling testing type.

type MU

type MU struct {
	ReadWriter interface {
		io.ReaderFrom
		io.WriterTo
	}

	Bytes []byte
}

MU defines the marshaling/unmarshaling testing type.

type U

type U struct {
	Reader io.ReaderFrom
	Bytes  []byte
}

U defines the unmarshaling testing type.

Jump to

Keyboard shortcuts

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