rust/fpnum/src/lib.rs
changeset 13947 2717a5289d88
parent 13946 2ee07e751171
child 13948 cf28d7a2b7fe
equal deleted inserted replaced
13946:2ee07e751171 13947:2717a5289d88
   437     assert!(z.is_zero());
   437     assert!(z.is_zero());
   438     assert!(z.is_positive());
   438     assert!(z.is_positive());
   439     assert!((-z).is_negative);
   439     assert!((-z).is_negative);
   440     assert_eq!(n - n, z);
   440     assert_eq!(n - n, z);
   441     assert_eq!(-n + n, z);
   441     assert_eq!(-n + n, z);
   442     assert_eq!(z.with_sign_as(-n), -z);
   442     assert_eq!(n.with_sign_as(-n), -n);
   443 }
   443 }
   444 
   444 
   445 #[test]
   445 #[test]
   446 fn ord() {
   446 fn ord() {
   447     let z = fp!(0);
   447     let z = fp!(0);