diff options
Diffstat (limited to 'tests/src/com/android/calculator2/BRTest.java')
-rw-r--r-- | tests/src/com/android/calculator2/BRTest.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/src/com/android/calculator2/BRTest.java b/tests/src/com/android/calculator2/BRTest.java index 77d4bf0..89906ca 100644 --- a/tests/src/com/android/calculator2/BRTest.java +++ b/tests/src/com/android/calculator2/BRTest.java @@ -145,6 +145,10 @@ public class BRTest extends TestCase { "digitsRequired(-1/2)"); check(BoundedRational.digitsRequired(new BoundedRational(1,-2)) == 1, "digitsRequired(1/-2)"); + check(BoundedRational.fact(BoundedRational.ZERO).equals(BoundedRational.ONE), "0!"); + check(BoundedRational.fact(BoundedRational.ONE).equals(BoundedRational.ONE), "1!"); + check(BoundedRational.fact(BoundedRational.TWO).equals(BoundedRational.TWO), "2!"); + check(BoundedRational.fact(BR_15).equals(new BoundedRational(1307674368000L)), "15!"); // We check values that include all interesting degree values. BoundedRational r = BR_M390; while (!r.equals(BR_390)) { |