ioxtest

package
v0.0.0-...-c51c3df Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2018 License: ISC Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tester

type Tester struct {
	F1, F2     interface{}
	T          *testing.T
	Rand       *rand.Rand
	MaxSize    int
	NumEvents  int
	Invariants func()
	// contains filtered or unexported fields
}

Tester compares the I/O behavior of F1 and F2.

The field F1 is tested, using F2 as a baseline. Tester checks F1 to see if it implements the following interfaces:

io.Reader
io.Writer
io.Seeker
io.ReaderAt
interface{ Truncate(size int64) error }

Each interface that matches is added to a pool of potential operations, that are executed at random. All the operations are expected to match semantically on F1 and F2.

If F1 implements io.Closer, then the object will be closed at the end and the resulting error compared to F2.

func (*Tester) Run

func (ft *Tester) Run()

Jump to

Keyboard shortcuts

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