public void Test30() { BigInteger res = ExtraLongFactorials.CalcExtraLongFactorial(30); BigInteger ans = BigInteger.Parse("265252859812191058636308480000000"); Assert.AreEqual(ans, res); }
public void Test50() { BigInteger res = ExtraLongFactorials.CalcExtraLongFactorial(50); BigInteger ans = BigInteger.Parse("30414093201713378043612608166064768844377641568960512000000000000"); Assert.AreEqual(ans, res); }
public void Test25() { BigInteger res = ExtraLongFactorials.CalcExtraLongFactorial(25); BigInteger ans = BigInteger.Parse("15511210043330985984000000"); Assert.AreEqual(ans, res); }
public void MultiplyByAdd_WhenDataIsBig_ReturnsRightData(int input1, int input2, string mult) { var result = ExtraLongFactorials.MultiplyByAdd(input1, input2); var stringResult = String.Join("", result); Assert.AreEqual(mult, stringResult); }
public void Run_IfNumberIsTooBig_StillCalculate() { var result = ExtraLongFactorials.Run(25); var expected = "15511210043330985984000000"; var happened = String.Join("", result); Assert.IsTrue(string.Equals(expected, happened, StringComparison.OrdinalIgnoreCase)); }
public void BaseCase(int n) { BigInteger res = ExtraLongFactorials.CalcExtraLongFactorial(n); Assert.AreEqual(new BigInteger(1), res); }
public void Add_WhenDataIsNormal_ReturnsRightData(string input1, string input2, string added) { var result = ExtraLongFactorials.Add(input1, input2); Assert.AreEqual(added, result); }
public ExtraLongFactorialsTest() { elF = new ExtraLongFactorials(); }