]>
git.proxmox.com Git - rustc.git/blob - src/test/run-pass/issue-15523-big.rs
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 test is checking corner cases that arise when you have
15 // 64-bit values in the variants.
17 #[derive(PartialEq, PartialOrd)]
25 #[derive(PartialEq, PartialOrd)]
36 assert
!(Eu64
::Pos2
> Eu64
::Pos1
);
37 assert
!(Eu64
::Pos2
< Eu64
::PosMax
);
38 assert
!(Eu64
::Pos1
< Eu64
::PosMax
);
41 assert
!(Ei64
::Pos2
> Ei64
::Pos1
);
42 assert
!(Ei64
::Pos2
> Ei64
::Neg1
);
43 assert
!(Ei64
::Pos1
> Ei64
::Neg1
);
44 assert
!(Ei64
::Pos2
> Ei64
::NegMin
);
45 assert
!(Ei64
::Pos1
> Ei64
::NegMin
);
46 assert
!(Ei64
::Pos2
< Ei64
::PosMax
);
47 assert
!(Ei64
::Pos1
< Ei64
::PosMax
);