Mock net.Conn needs updating for interface changes.

This commit is contained in:
Alex Bramley 2012-02-04 01:16:19 +00:00
parent 1c62354cb8
commit eb87e56f96
1 changed files with 8 additions and 8 deletions

View File

@ -24,7 +24,7 @@ type mockNetConn struct {
rc chan bool rc chan bool
closed bool closed bool
rt, wt int64 rt, wt time.Time
} }
func MockNetConn(t *testing.T) *mockNetConn { func MockNetConn(t *testing.T) *mockNetConn {
@ -143,18 +143,18 @@ func (m *mockNetConn) RemoteAddr() net.Addr {
return &net.IPAddr{net.IPv4(127, 0, 0, 1)} return &net.IPAddr{net.IPv4(127, 0, 0, 1)}
} }
func (m *mockNetConn) SetTimeout(ns int64) error { func (m *mockNetConn) SetDeadline(t time.Time) error {
m.rt = ns m.rt = t
m.wt = ns m.wt = t
return nil return nil
} }
func (m *mockNetConn) SetReadTimeout(ns int64) error { func (m *mockNetConn) SetReadDeadline(t time.Time) error {
m.rt = ns m.rt = t
return nil return nil
} }
func (m *mockNetConn) SetWriteTimeout(ns int64) error { func (m *mockNetConn) SetWriteDeadline(t time.Time) error {
m.wt = ns m.wt = t
return nil return nil
} }