equal
deleted
inserted
replaced
326 assert!(-n2_25 < n1_5); |
326 assert!(-n2_25 < n1_5); |
327 assert!(-n2_25 < -n1_5); |
327 assert!(-n2_25 < -n1_5); |
328 } |
328 } |
329 |
329 |
330 #[test] |
330 #[test] |
|
331 fn ord() { |
|
332 let z = FPNum::from(0);; |
|
333 let n1_5 = FPNum::new(3, 2); |
|
334 let n2_25 = FPNum::new(9, 4); |
|
335 |
|
336 assert!(!(z > z)); |
|
337 assert!(!(z < z)); |
|
338 assert!(n2_25 > n1_5); |
|
339 assert!(-n2_25 < n1_5); |
|
340 assert!(-n2_25 < -n1_5); |
|
341 } |
|
342 |
|
343 #[test] |
331 fn arith() { |
344 fn arith() { |
332 let n1_5 = fp!(3/2); |
345 let n1_5 = fp!(3/2); |
333 let n2_25 = fp!(9/4); |
346 let n2_25 = fp!(9/4); |
334 let n_0_15 = fp!(-15/100); |
347 let n_0_15 = fp!(-15/100); |
335 |
348 |