pub fn hash_set<A: Strategy + 'static>(
    element: A,
    size: Range<usize>
) -> BoxedStrategy<HashSet<<A::Tree as ValueTree>::Value>> where
    <A::Tree as ValueTree>::Value: Hash + Eq + Clone
Expand description

A strategy for a HashSet of a given size.

Examples

proptest! {
    #[test]
    fn proptest_a_set(ref s in hash_set(".*", 10..100)) {
        assert!(s.len() < 100);
        assert!(s.len() >= 10);
    }
}