(t *testing.T, conn *Conn)
| 460 | } |
| 461 | |
| 462 | func testConnSeekRandomOffset(t *testing.T, conn *Conn) { |
| 463 | for i := 0; i != 10; i++ { |
| 464 | if _, err := conn.Write([]byte(strconv.Itoa(i))); err != nil { |
| 465 | t.Fatal(err) |
| 466 | } |
| 467 | } |
| 468 | |
| 469 | offset, err := conn.Seek(3, SeekAbsolute) |
| 470 | if err != nil { |
| 471 | t.Error(err) |
| 472 | } |
| 473 | |
| 474 | if offset != 3 { |
| 475 | t.Error("bad offset:", offset) |
| 476 | } |
| 477 | } |
| 478 | |
| 479 | func testConnSeekDontCheck(t *testing.T, conn *Conn) { |
| 480 | for i := 0; i != 10; i++ { |