modes:pair:tests: remove ordering test
Literally just makes my ordering frigid. It's just testing the EXACT same condition as how ordering is impl'd anyway. What a useless test.
This commit is contained in:
@@ -203,28 +203,6 @@ mod tests {
|
|||||||
.filter_map(|(c1, c2)| Pair::new(c1, c2))
|
.filter_map(|(c1, c2)| Pair::new(c1, c2))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn ordering() {
|
|
||||||
fn expected_ordering_relation(p1: &Pair, p2: &Pair) -> bool {
|
|
||||||
match (p1.cmp(p2), p1.1.cmp(&p2.1), p1.0.cmp(&p2.0)) {
|
|
||||||
// For any two pairs, we expect the high cards to dictate the
|
|
||||||
// ordering of the pairs first. The low card only matters if
|
|
||||||
// the high cards are equivalent.
|
|
||||||
(x, Ordering::Equal, z) if x == z => true,
|
|
||||||
(x, y, _) if x == y => true,
|
|
||||||
_ => false,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exhaustive_pairs_deck()
|
|
||||||
.zip_cartesian(exhaustive_pairs_deck())
|
|
||||||
.for_each(|(p1, p2)| {
|
|
||||||
// TEST: For any two valid pairs we expect them to have the
|
|
||||||
// `expected_ordering_relation`.
|
|
||||||
assert!(expected_ordering_relation(&p1, &p2));
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn footstool() {
|
fn footstool() {
|
||||||
exhaustive_pairs_deck()
|
exhaustive_pairs_deck()
|
||||||
|
|||||||
Reference in New Issue
Block a user