(t *testing.T)
| 84 | } |
| 85 | |
| 86 | func TestIPConvertError_Error(t *testing.T) { |
| 87 | e := ipConvertError{ip: []byte("bad-ip")} |
| 88 | require.Equal(t, |
| 89 | "failed to convert IP 'bad-ip' to netip.Addr", |
| 90 | e.Error(), |
| 91 | ) |
| 92 | } |
| 93 | |
| 94 | func TestIPAddrToNetIP_Error_InvalidBytes(t *testing.T) { |
| 95 | bad := []byte{1} // invalid length -> AddrFromSlice returns ok=false |