Skip to content

Commit 0972c42

Browse files
committed
Exclude slice length tests with non 32 bit system compatibility
1 parent 995815c commit 0972c42

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

etherparse/src/transport/icmpv6_header.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ mod test {
214214
}
215215

216216
proptest! {
217-
#[cfg(not(target_pointer_width = "32"))]
217+
#[cfg(not(any(target_pointer_width = "16", target_pointer_width = "32")))]
218218
#[test]
219219
fn with_checksum(
220220
ip_header in ipv6_any(),
@@ -391,7 +391,7 @@ mod test {
391391

392392
proptest! {
393393
#[test]
394-
#[cfg(not(target_pointer_width = "32"))]
394+
#[cfg(not(any(target_pointer_width = "16", target_pointer_width = "32")))]
395395
fn update_checksum(
396396
ip_header in ipv6_any(),
397397
icmp_type in icmpv6_type_any(),

etherparse/src/transport/tcp_slice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ impl<'a> TcpSlice<'a> {
380380
destination: [u8; 16],
381381
) -> Result<u16, ValueTooBigError<usize>> {
382382
// check that the total length fits into the field
383-
#[cfg(not(target_pointer_width = "32"))]
383+
#[cfg(not(any(target_pointer_width = "16", target_pointer_width = "32")))]
384384
if (core::u32::MAX as usize) < self.slice.len() {
385385
return Err(ValueTooBigError {
386386
actual: self.slice.len(),

etherparse/src/transport/udp_header.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,7 @@ mod test {
718718

719719
proptest! {
720720
#[test]
721+
#[cfg(not(any(target_pointer_width = "16", target_pointer_width = "32")))]
721722
fn calc_checksum_ipv6(
722723
source_port in any::<u16>(),
723724
destination_port in any::<u16>(),
@@ -821,6 +822,7 @@ mod test {
821822

822823
proptest! {
823824
#[test]
825+
#[cfg(not(any(target_pointer_width = "16", target_pointer_width = "32")))]
824826
fn calc_checksum_ipv6_raw(
825827
source_port in any::<u16>(),
826828
destination_port in any::<u16>(),

0 commit comments

Comments
 (0)