Skip to content

Commit

Permalink
move zerocopy test into Primes module
Browse files Browse the repository at this point in the history
  • Loading branch information
JSorngard committed Sep 12, 2024
1 parent 3d85f0d commit 108b6e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 8 additions & 0 deletions src/cache/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -911,4 +911,12 @@ mod test {
}
}
}

#[cfg(feature = "zerocopy")]
#[test]
fn test_as_bytes() {
use zerocopy::AsBytes;
const P: Primes<3> = Primes::new();
assert_eq!(P.as_bytes(), &[2, 0, 0, 0, 3, 0, 0, 0, 5, 0, 0, 0]);
}
}
8 changes: 0 additions & 8 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,14 +324,6 @@ mod test {
}
}

#[cfg(feature = "zerocopy")]
#[test]
fn test_as_bytes() {
use zerocopy::AsBytes;
const P: Primes<3> = Primes::new();
assert_eq!(P.as_bytes(), &[2, 0, 0, 0, 3, 0, 0, 0, 5, 0, 0, 0]);
}

// region: test data

#[rustfmt::skip]
Expand Down

0 comments on commit 108b6e0

Please sign in to comment.