diff -r 353c999b1558 -r ac1801fe51d9 rust/fpnum/src/lib.rs --- a/rust/fpnum/src/lib.rs Sun Oct 14 09:42:26 2018 -0400 +++ b/rust/fpnum/src/lib.rs Sun Oct 14 09:43:42 2018 -0400 @@ -328,6 +328,19 @@ } #[test] +fn ord() { + let z = FPNum::from(0);; + let n1_5 = FPNum::new(3, 2); + let n2_25 = FPNum::new(9, 4); + + assert!(!(z > z)); + assert!(!(z < z)); + assert!(n2_25 > n1_5); + assert!(-n2_25 < n1_5); + assert!(-n2_25 < -n1_5); +} + +#[test] fn arith() { let n1_5 = fp!(3/2); let n2_25 = fp!(9/4);