assert_eq!(THEN, Greater);
}
+#[test]
+fn ordering_structural_eq() {
+ // test that consts of type `Ordering` are usable in patterns
+
+ const ORDERING: Ordering = Greater;
+
+ const REVERSE: Ordering = ORDERING.reverse();
+ match Ordering::Less {
+ REVERSE => {}
+ _ => unreachable!(),
+ };
+}
+
#[test]
fn cmp_default() {
// Test default methods in PartialOrd and PartialEq