Skip to content

Commit

Permalink
Exclude slice length tests with non 32 bit system compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianSchmid committed Feb 11, 2024
1 parent 995815c commit 0972c42
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions etherparse/src/transport/icmpv6_header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ mod test {
}

proptest! {
#[cfg(not(target_pointer_width = "32"))]
#[cfg(not(any(target_pointer_width = "16", target_pointer_width = "32")))]
#[test]
fn with_checksum(
ip_header in ipv6_any(),
Expand Down Expand Up @@ -391,7 +391,7 @@ mod test {

proptest! {
#[test]
#[cfg(not(target_pointer_width = "32"))]
#[cfg(not(any(target_pointer_width = "16", target_pointer_width = "32")))]
fn update_checksum(
ip_header in ipv6_any(),
icmp_type in icmpv6_type_any(),
Expand Down
2 changes: 1 addition & 1 deletion etherparse/src/transport/tcp_slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ impl<'a> TcpSlice<'a> {
destination: [u8; 16],
) -> Result<u16, ValueTooBigError<usize>> {
// check that the total length fits into the field
#[cfg(not(target_pointer_width = "32"))]
#[cfg(not(any(target_pointer_width = "16", target_pointer_width = "32")))]
if (core::u32::MAX as usize) < self.slice.len() {
return Err(ValueTooBigError {
actual: self.slice.len(),
Expand Down
2 changes: 2 additions & 0 deletions etherparse/src/transport/udp_header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,7 @@ mod test {

proptest! {
#[test]
#[cfg(not(any(target_pointer_width = "16", target_pointer_width = "32")))]
fn calc_checksum_ipv6(
source_port in any::<u16>(),
destination_port in any::<u16>(),
Expand Down Expand Up @@ -821,6 +822,7 @@ mod test {

proptest! {
#[test]
#[cfg(not(any(target_pointer_width = "16", target_pointer_width = "32")))]
fn calc_checksum_ipv6_raw(
source_port in any::<u16>(),
destination_port in any::<u16>(),
Expand Down

0 comments on commit 0972c42

Please sign in to comment.