pubgrub-rs / pubgrub

PubGrub version solving algorithm implemented in Rust
https://pubgrub-rs.github.io/pubgrub/pubgrub/
Mozilla Public License 2.0
337 stars 30 forks source link

test: check for unsorted iteration #183

Closed Eh2406 closed 5 months ago

Eh2406 commented 5 months ago

I had a very difficult day debugging why contains_many did not match contains, turns out my input was not correctly sorted. Similarly, when debugging problems with simplify it would have been nice to easily reject "incorrectly sorted input". (Although that did not turn out to be relevant to the underlying issue.)

This should hopefully be an easy step in the right direction.

Eh2406 commented 5 months ago

Rebased and cargo fmt.