(t *testing.T)
| 52 | } |
| 53 | |
| 54 | func TestReadUTF16LE_SingleByte(t *testing.T) { |
| 55 | // Test edge case: single byte (no complete UTF-16 code units) |
| 56 | data := []byte{0x48} |
| 57 | buf := NewByteBuffer(data) |
| 58 | err := &Error{} |
| 59 | |
| 60 | result := readUTF16LE(buf, 1, err) |
| 61 | |
| 62 | require.True(t, err.HasError()) |
| 63 | require.Equal(t, ErrKindInvalidUTF16String, err.Kind()) |
| 64 | require.Equal(t, "", result) |
| 65 | } |
| 66 | |
| 67 | func TestReadUTF16LE_EmptyBuffer(t *testing.T) { |
| 68 | // Test edge case: zero bytes |
nothing calls this directly
no test coverage detected