Documentation
¶
Overview ¶
Package indextest helps a reader's tests hold that it says the same of a transcript whether it reads the file itself or takes the lines from the shared read: two copies of one made-up transcript grow by the same writes, one of them followed by the index as a live conversation's transcript is.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Pair ¶
type Pair struct {
Plain, Followed string
Index *transcriptindex.Index
// contains filtered or unexported fields
}
Pair is two copies of one transcript: Plain is read by a reader on its own, Followed is followed by the index, as the transcript of a live conversation, and read by a reader that takes its lines from there.
func New ¶
New makes the two copies with their first lines written, the index following the second from its end.
func (*Pair) Grow ¶
Grow writes lines first..first+count-1 to both copies, every other one in two writes, and calls same after every write: there the test holds that its two readers agree.
func (*Pair) ReaderOpens ¶
ReaderOpens is how many times the readers opened a file in f: every open but the index's own, which are the live conversation's.