func testSeekAndReadByte(t *testing.T, s *stream.Stream, off int64, whence int, want_err error, want rune) { var ( err error msg string b byte c rune ) msg = fmt.Sprintf("Seek(%d, %d),", off, whence) _, err = s.Seek(off, whence) if err != want_err { t.Errorf("%s want error `%v`, but got `%v`\n", msg, want_err, err) return } b, _ = s.ReadByte() c = rune(b) if c != want { t.Errorf("%s ReadByte() is `%c`, want `%c`\n", msg, c, want) } }