source: src/test/java/negotiator/utility/ComTest.java

Last change on this file was 1, checked in by Wouter Pasman, 6 years ago

Initial import : Genius 9.0.0

File size: 746 bytes
Line 
1package negotiator.utility;
2
3import static org.junit.Assert.assertEquals;
4
5import java.math.BigInteger;
6
7import org.junit.Test;
8
9import genius.core.list.MathTools;
10
11public class ComTest {
12 @Test
13 public void testFac() {
14 assertEquals(
15 new BigInteger(
16 "9426890448883247745626185743057242473809693764078951663494238777294707070023223798882976159207729119823605850588608460429412647567360000000000000000000000"),
17 MathTools.factorial(98));
18 }
19
20 @Test
21 public void testOver() {
22 assertEquals(new BigInteger("56"), MathTools.over(8, 3));
23 assertEquals(new BigInteger("144773075114710515"), MathTools.over(88, 72));
24 assertEquals(new BigInteger("129742056422108851102647209362723718764764760333207650"), MathTools.over(188, 72));
25 }
26}
Note: See TracBrowser for help on using the repository browser.