Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestReader ¶
func TestReader(t *TestRunner, factory ReaderFactory)
TestReader tests Reader returns correct file metadata.
Types ¶
type ReaderFactory ¶
type ReaderFactory func(sr *io.SectionReader, opts ...metadata.Option) (r TestableReader, err error)
type Runner ¶ added in v0.18.0
Runner allows running subtests of TestingT. This exists instead of adding a Run method to TestingT interface because the Run implementation of testing.T would not satisfy the interface.
type TestRunner ¶ added in v0.18.0
func (*TestRunner) Run ¶ added in v0.18.0
func (r *TestRunner) Run(name string, run func(*TestRunner))
type TestableReader ¶
type TestingT ¶ added in v0.18.0
type TestingT interface {
Errorf(format string, args ...any)
Fatal(args ...any)
Fatalf(format string, args ...any)
Logf(format string, args ...any)
}
TestingT is the minimal set of testing.T required to run the tests defined in TestReader. This interface exists to prevent leaking the testing package from being exposed outside tests.
Click to show internal directories.
Click to hide internal directories.