(t *testing.T, conn *Conn)
| 477 | } |
| 478 | |
| 479 | func testConnSeekDontCheck(t *testing.T, conn *Conn) { |
| 480 | for i := 0; i != 10; i++ { |
| 481 | if _, err := conn.Write([]byte(strconv.Itoa(i))); err != nil { |
| 482 | t.Fatal(err) |
| 483 | } |
| 484 | } |
| 485 | |
| 486 | offset, err := conn.Seek(42, SeekAbsolute|SeekDontCheck) |
| 487 | if err != nil { |
| 488 | t.Error(err) |
| 489 | } |
| 490 | |
| 491 | if offset != 42 { |
| 492 | t.Error("bad offset:", offset) |
| 493 | } |
| 494 | |
| 495 | if _, err := conn.ReadMessage(1024); !errors.Is(err, OffsetOutOfRange) { |
| 496 | t.Error("unexpected error:", err) |
| 497 | } |
| 498 | } |
| 499 | |
| 500 | func testConnWriteReadSequentially(t *testing.T, conn *Conn) { |
| 501 | for i := 0; i != 10; i++ { |
nothing calls this directly
no test coverage detected