v.io: v.io/v23/vom/vomtest Index | Files

package vomtest

import "v.io/v23/vom/vomtest"

Package vomtest provides protocol conformance tests for the Vanadium Object Marshaller (VOM).

nolint:golint

Index

Package Files

all.go entry.go vomtest.vdl.go

type Entry Uses

type Entry struct {
    Label      string        // Label describes the entry
    ValueLabel string        // ValueLabel describes the Value
    Value      reflect.Value // Value for vom test
    Version    vom.Version   // Version of encoding
    HexType    string        // Hex bytes representing the type message(s).
    HexValue   string        // Hex bytes representing the value message.
}

Entry represents a test entry, which contains a value and hex bytes. The hex bytes represent the golden vom encoding of the value. Encoding tests encode the value and expect to get the hex bytes, while decoding tests decode the hex bytes and expect to get the value.

func AllFail Uses

func AllFail() []Entry

AllFail returns all entries that fail encoding and decoding tests.

The -vomtest flag may be used to filter the returned entries.

func AllFailFunc Uses

func AllFailFunc(fn func(e Entry) bool) []Entry

AllFailFunc returns the entries in AllFail where fn(e) returns true for each returned entry.

func AllPass Uses

func AllPass() []Entry

AllPass returns all entries that pass encoding and decoding tests.

The -vomtest flag may be used to filter the returned entries.

func AllPassFunc Uses

func AllPassFunc(fn func(e Entry) bool) []Entry

AllPassFunc returns the entries in AllPass where fn(e) returns true for each returned entry.

func (Entry) Bytes Uses

func (e Entry) Bytes() []byte

Bytes returns the full binary bytes, including the version, types and value.

func (Entry) Hex Uses

func (e Entry) Hex() string

Hex returns the full hex bytes, including the version, types and value.

func (Entry) HexVersion Uses

func (e Entry) HexVersion() string

HexVersion returns the version as hex bytes.

func (Entry) Name Uses

func (e Entry) Name() string

Name returns the name of the entry, which combines the entry and value labels.

func (Entry) TypeBytes Uses

func (e Entry) TypeBytes() []byte

TypeBytes returns the binary bytes including the version and types. Returns a nil slice if no type messages are encoded.

func (Entry) ValueBytes Uses

func (e Entry) ValueBytes() []byte

ValueBytes returns the binary bytes including the version and value.

Package vomtest imports 8 packages (graph). Updated 2020-10-17. Refresh now. Tools for package owners.