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) } }
func assertReadEOF(t *testing.T, reader lexer.LineReader) { _, err := reader.ReadLine() if err != io.EOF { t.Errorf("got %v, want %v", err, io.EOF) } }