func TestStream(t *testing.T) { … } func TestStreamPing(t *testing.T) { … } func TestStreamBase64(t *testing.T) { … } func TestStreamVersionedBase64(t *testing.T) { … } func TestStreamVersionedCopy(t *testing.T) { … } func TestStreamError(t *testing.T) { … } func TestStreamSurvivesPanic(t *testing.T) { … } func TestStreamClosedDuringRead(t *testing.T) { … } type errorReader … func (r *errorReader) Read(p []byte) (int, error) { … } func readWebSocket(r *Reader, t *testing.T, fn func(*websocket.Conn), protocols ...string) ([]byte, error) { … } func expectWebSocketFrames(r *Reader, t *testing.T, fn func(*websocket.Conn), frames [][]byte, protocols ...string) error { … }