diff --git a/agb-fixnum/src/lib.rs b/agb-fixnum/src/lib.rs index 355b6007..1d3013d1 100644 --- a/agb-fixnum/src/lib.rs +++ b/agb-fixnum/src/lib.rs @@ -1033,15 +1033,17 @@ mod tests { #[test] fn formats_fractions_correctly() { let a = Num::::new(5); - let two = Num::::new(4); + let four = Num::::new(4); let minus_one = Num::::new(-1); - let b: Num = a / two; + let b: Num = a / four; let c: Num = b * minus_one; + let d: Num = minus_one / four; assert_eq!(b + c, 0.into()); assert_eq!(format!("{}", b), "1.25"); assert_eq!(format!("{}", c), "-1.25"); + assert_eq!(format!("{}", d), "-0.25"); } #[test]