(t *testing.T, conn *Conn)
| 417 | } |
| 418 | |
| 419 | func testConnSeekLastOffset(t *testing.T, conn *Conn) { |
| 420 | for i := 0; i != 10; i++ { |
| 421 | if _, err := conn.Write([]byte(strconv.Itoa(i))); err != nil { |
| 422 | t.Fatal(err) |
| 423 | } |
| 424 | } |
| 425 | |
| 426 | offset, err := conn.Seek(0, SeekEnd) |
| 427 | if err != nil { |
| 428 | t.Error(err) |
| 429 | } |
| 430 | |
| 431 | if offset != 10 { |
| 432 | t.Error("bad offset:", offset) |
| 433 | } |
| 434 | } |
| 435 | |
| 436 | func testConnSeekCurrentOffset(t *testing.T, conn *Conn) { |
| 437 | for i := 0; i != 10; i++ { |