testhelper

package
v0.0.0-...-fd0b456 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

This package ever stays unstable.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestDecode

func TestDecode[T option.Equality[T]](t *testing.T, input string, expected T) bool

func TestEncode

func TestEncode[T any](t *testing.T, intern T, expected string) bool

func TestSerde

func TestSerde[T option.Equality[T]](t *testing.T, sets []SerdeTestSet[T]) bool

func TestSerdeError

func TestSerdeError[T any](t *testing.T, inputs []string) bool

Types

type SerdeTestSet

type SerdeTestSet[T option.Equality[T]] struct {
	Intern      T        // internal representation
	Possible    []string // possible representations
	EncodedInto string   // intern encoded into
}

A set of internal, possible input and encode output representations.

Jump to

Keyboard shortcuts

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