(t *testing.T)
| 121 | } |
| 122 | |
| 123 | func TestWriteFrameDataSize(t *testing.T) { |
| 124 | t.Parallel() |
| 125 | |
| 126 | var buf bytes.Buffer |
| 127 | data := make([]byte, codec.MaxMessageSizeV1) |
| 128 | err := codec.WriteFrame(&buf, codec.TagV1, data) |
| 129 | require.NoError(t, err) |
| 130 | |
| 131 | //nolint: makezero // This intentionally increases the slice length. |
| 132 | data = append(data, 0) // One byte over the maximum |
| 133 | err = codec.WriteFrame(&buf, codec.TagV1, data) |
| 134 | require.ErrorIs(t, err, codec.ErrMessageTooLarge) |
| 135 | } |
| 136 | |
| 137 | func TestWriteFrameInvalidTag(t *testing.T) { |
| 138 | t.Parallel() |
nothing calls this directly
no test coverage detected