Esempio n. 1
0
func assertReadLine(t *testing.T, reader lexer.LineReader, want string) {
	got, err := reader.ReadLine()
	if err != nil {
		t.Errorf("got error %v", err)
		return
	}
	if got != want {
		t.Errorf("got %q, want %q", got, want)
	}
}
Esempio n. 2
0
func assertReadEOF(t *testing.T, reader lexer.LineReader) {
	_, err := reader.ReadLine()
	if err != io.EOF {
		t.Errorf("got %v, want %v", err, io.EOF)
	}
}