(t *testing.T, r io.Reader, w io.Closer)
| 306 | } |
| 307 | |
| 308 | func ensureEOFOnClose(t *testing.T, r io.Reader, w io.Closer) { |
| 309 | b := make([]byte, 10) |
| 310 | w.Close() |
| 311 | n, err := r.Read(b) |
| 312 | if n > 0 { |
| 313 | t.Errorf("unexpected byte count %d", n) |
| 314 | } |
| 315 | if err != io.EOF { |
| 316 | t.Errorf("expected EOF: %v", err) |
| 317 | } |
| 318 | } |
| 319 | |
| 320 | func TestCloseClientEOFServer(t *testing.T) { |
| 321 | c, s, err := getConnection(nil) |
no test coverage detected