idstest

package
v0.0.0-...-bc03976 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package codectest provides a test suite for testing functionality related to IDs.

Index

Constants

This section is empty.

Variables

View Source
var AliasTests = []AliasTest{
	{"Lookup Error}", TestAliaserLookupError},
	{"Lookup}", TestAliaserLookup},
	{"Aliases Empty}", TestAliaserAliasesEmpty},
	{"Aliases}", TestAliaserAliases},
	{"Primary Alias}", TestAliaserPrimaryAlias},
	{"Alias Clash}", TestAliaserAliasClash},
	{"Remove Alias}", TestAliaserRemoveAlias},
}

Functions

func RunAllAlias

func RunAllAlias(t *testing.T, ctor func() (ids.AliaserReader, ids.AliaserWriter))

RunAll runs all AliasTests, constructing a new GeneralCodec for each.

func TestAliaserAliasClash

func TestAliaserAliasClash(tb testing.TB, _ ids.AliaserReader, w ids.AliaserWriter)

func TestAliaserAliases

func TestAliaserAliases(tb testing.TB, r ids.AliaserReader, w ids.AliaserWriter)

func TestAliaserAliasesEmpty

func TestAliaserAliasesEmpty(tb testing.TB, r ids.AliaserReader, _ ids.AliaserWriter)

func TestAliaserLookup

func TestAliaserLookup(tb testing.TB, r ids.AliaserReader, w ids.AliaserWriter)

func TestAliaserLookupError

func TestAliaserLookupError(tb testing.TB, r ids.AliaserReader, _ ids.AliaserWriter)

func TestAliaserPrimaryAlias

func TestAliaserPrimaryAlias(tb testing.TB, r ids.AliaserReader, w ids.AliaserWriter)

func TestAliaserRemoveAlias

func TestAliaserRemoveAlias(tb testing.TB, r ids.AliaserReader, w ids.AliaserWriter)

Types

type AliasTest

type AliasTest struct {
	Name string
	Test func(testing.TB, ids.AliaserReader, ids.AliaserWriter)
}

An AliasTest couples a test in the Aliaser suite with a human-readable name.

func (*AliasTest) Run

func (tt *AliasTest) Run(t *testing.T, r ids.AliaserReader, w ids.AliaserWriter)

Run runs the test on the Aliaser{Reader+Writer} pair.

Jump to

Keyboard shortcuts

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