3 #![allow(non_camel_case_types)]
6 #[derive(Copy, Clone, Debug)]
7 enum foo { large, small, }
9 impl PartialEq for foo {
10 fn eq(&self, other: &foo) -> bool {
11 ((*self) as usize) == ((*other) as usize)
13 fn ne(&self, other: &foo) -> bool { !(*self).eq(other) }
20 assert!((a != (1, 2, 4)));
21 assert!((a < (1, 2, 4)));
22 assert!((a <= (1, 2, 4)));
23 assert!(((1, 2, 4) > a));
24 assert!(((1, 2, 4) >= a));
28 assert_eq!(x, foo::large);
29 assert!((x != foo::small));