Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2667: Add property test for `UTxOIndex.selectRandomWithPriority`. r=jonathanknowles a=jonathanknowles # Issue Number ADP-890 # Overview This PR adds a property test for `UTxOIndex.selectRandomWithPriority`. The `selectRandomWithPriority` function is designed to: - select an entry at random from a UTxO index according to a specified list of filter conditions; - traverse the specified list of filter conditions in order of priority **_from left to right_**. The test added in this PR provides a basic sanity check to verify that priority order is respected. # Sample Output ```hs Cardano.Wallet.Primitive.Types.UTxOIndex Indexed UTxO set properties Index Selection prop_selectRandomWithPriority +++ OK, passed 1600 tests: 59.69% have match for neither asset 1 nor asset 2 17.12% have match for asset 1 but not for asset 2 16.31% have match for asset 2 but not for asset 1 6.88% have match for both asset 1 and asset 2 Finished in 1.0870 seconds 1 example, 0 failures ``` # QA Due Diligence I ran this test 500 times to increase confidence that it will not fail spuriously. No failures were encountered. Co-authored-by: Jonathan Knowles <jonathan.knowles@iohk.io>
- Loading branch information