// TestFrameReaderReadError tests that the frame reader does not resume after encountering a // well-formedness error in the input stream. According to RFC 8742 Section 2.8: "[...] if any data // item in the sequence is not well formed, it is not possible to reliably decode the rest of the // sequence." func TestFrameReaderReadError(t *testing.T) { … } func TestFrameReaderRead(t *testing.T) { … } type fakeReadCloser … func (rc fakeReadCloser) Read(_ []byte) (int, error) { … } func (rc fakeReadCloser) Close() error { … } func TestFrameReaderClose(t *testing.T) { … }