Documentation ¶
Overview ¶
Package codectest provides a test suite for testing functionality related to IDs.
Index ¶
- Variables
- func RunAllAlias(t *testing.T, ctor func() (ids.AliaserReader, ids.AliaserWriter))
- func TestAliaserAliasClash(tb testing.TB, _ ids.AliaserReader, w ids.AliaserWriter)
- func TestAliaserAliases(tb testing.TB, r ids.AliaserReader, w ids.AliaserWriter)
- func TestAliaserAliasesEmpty(tb testing.TB, r ids.AliaserReader, _ ids.AliaserWriter)
- func TestAliaserLookup(tb testing.TB, r ids.AliaserReader, w ids.AliaserWriter)
- func TestAliaserLookupError(tb testing.TB, r ids.AliaserReader, _ ids.AliaserWriter)
- func TestAliaserPrimaryAlias(tb testing.TB, r ids.AliaserReader, w ids.AliaserWriter)
- func TestAliaserRemoveAlias(tb testing.TB, r ids.AliaserReader, w ids.AliaserWriter)
- type AliasTest
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.
Click to show internal directories.
Click to hide internal directories.