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.
Click to show internal directories.
Click to hide internal directories.