(t *testing.T)
| 2031 | } |
| 2032 | |
| 2033 | func TestCopyFromWrappedConnectionToWrappedConnection(t *testing.T) { |
| 2034 | innerConn1 := &testConn{reads: 1} |
| 2035 | wrappedConn1 := NewConn(innerConn1) |
| 2036 | innerConn2 := &testConn{} |
| 2037 | wrappedConn2 := NewConn(innerConn2) |
| 2038 | |
| 2039 | if _, err := io.Copy(wrappedConn1, wrappedConn2); err != nil { |
| 2040 | t.Fatalf("err: %v", err) |
| 2041 | } |
| 2042 | if innerConn1.readFromCalledWith != innerConn2 { |
| 2043 | t.Errorf("Expected io.Copy to pass inner source connection to ReadFrom of inner destination connection") |
| 2044 | } |
| 2045 | } |
| 2046 | |
| 2047 | func TestDeadlineWrappersDelegate(t *testing.T) { |
| 2048 | conn := &deadlineConn{} |
nothing calls this directly
no test coverage detected
searching dependent graphs…