im_rc::proptestFunction hash_map
Source pub fn hash_map<K: Strategy + 'static, V: Strategy + 'static>(
key: K,
value: V,
size: Range<usize>,
) -> BoxedStrategy<HashMap<<K::Tree as ValueTree>::Value, <V::Tree as ValueTree>::Value>>
Expand description
A strategy for a HashMap
of a given size.
ยงExamples
proptest! {
#[test]
fn proptest_works(ref m in hash_map(0..9999, ".*", 10..100)) {
assert!(m.len() < 100);
assert!(m.len() >= 10);
}
}