+67
−79
Loading
This tests our implementation of sampling to ensure the behavior is as-expected. It also updates the implementation so that the tests pass (It was broken when updating to rand 0.10; see #1907 (comment 3426398)). This removes the direct testing of `rand::IndexedRandom::sample_weighted`, since this is now an impplementation detail of `pick_n_filtered_weighted`, which is itself tested. Verified that this fixes the case of sometimes not being able to select a Guard in integration tests. <chutney#40057 (comment 3426299)> <#1907 (comment 3408157)> <#2209>