diff --git a/tests/mod.rs b/tests/mod.rs index 5fad232..78aa932 100644 --- a/tests/mod.rs +++ b/tests/mod.rs @@ -553,6 +553,15 @@ mod allocating { } } +#[cfg(feature = "arbitrary")] +#[test] +fn arbitrary() { + use arbitrary::{Arbitrary, Unstructured}; + let mut unstructured = Unstructured::new(EXAMPLE_SLICE); + let array = Array::::arbitrary(&mut unstructured).unwrap(); + assert_eq!(array.as_slice(), &[1, 2, 3, 4]); +} + #[cfg(feature = "zerocopy")] #[test] #[allow(unused)]