Skip to content

Commit

Permalink
updated quickcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars Fischer committed Dec 13, 2024
1 parent 3265f40 commit cae12ee
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/quick.rs
Original file line number Diff line number Diff line change
Expand Up @@ -750,11 +750,10 @@ quickcheck! {
vec.append(&mut vec![1; n2]);
vec.append(&mut vec![2; n3]);
vec.append(&mut vec![3; n4]);
let mut perm1 = vec.clone().into_iter().permutations(vec.len()).unique().collect_vec();
perm1.sort();
let mut perm2 = vec.into_iter().multiset_permutations().collect_vec();
perm2.sort();
assert_eq!(perm1, perm2);
let n = vec.len();
let unique_permutations = vec.iter().permutations(n).unique().sorted().collect_vec();
let multiset_permutations = vec.iter().multiset_permutations().sorted().collect_vec();
assert_eq!(unique_permutations, multiset_permutations);
}

}
Expand Down

0 comments on commit cae12ee

Please sign in to comment.