use proptest::{arbitrary::any, collection::vec, prelude::*}; use super::*; impl Arbitrary for EncryptedNote { type Parameters = (); fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy { (vec(any::(), 580)) .prop_map(|v| { let mut bytes = [0; 580]; bytes.copy_from_slice(v.as_slice()); Self(bytes) }) .boxed() } type Strategy = BoxedStrategy; } impl Arbitrary for WrappedNoteKey { type Parameters = (); fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy { (vec(any::(), 80)) .prop_map(|v| { let mut bytes = [0; 80]; bytes.copy_from_slice(v.as_slice()); Self(bytes) }) .boxed() } type Strategy = BoxedStrategy; }