1 // Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 // Issue 15523: derive(PartialOrd) should use the provided
12 // discriminant values for the derived ordering.
14 // This is checking the basic functionality.
16 #[derive(PartialEq, PartialOrd)]
23 #[derive(PartialEq, PartialOrd)]
31 #[derive(PartialEq, PartialOrd)]
40 assert!(E1::Pos2 > E1::Pos1);
41 assert!(E1::Pos1 > E1::Neg1);
42 assert!(E1::Pos2 > E1::Neg1);
44 assert!(E2::Pos2 > E2::Pos1);
45 assert!(E2::Pos1 < E2::PosMax);
46 assert!(E2::Pos2 < E2::PosMax);
48 assert!(E3::Pos2 > E3::Pos1);
49 assert!(E3::Pos1 > E3::Neg1);
50 assert!(E3::Pos2 > E3::Neg1);