public void ComputeRecursiveTest() { BigInteger answer = 0; fibClassOnTest = new ComputeFibNumRecursively(); answer = fibClassOnTest.ComputeFib(25); Assert.AreEqual((UInt64)75025, answer); }
public void IterativeMinTest() { BigInteger answer = 0; fibClassOnTest = new ComputeFibNumIteratively(); answer = fibClassOnTest.ComputeFib(0); Assert.AreEqual((UInt64)0, answer); }
public void IterativeMaxTest() { BigInteger answer = 0; fibClassOnTest = new ComputeFibNumIteratively(); answer = fibClassOnTest.ComputeFib(1476); //Actual 1.3069892237633987E+308 //Displayed 1.3069892237634E+308 Assert.AreEqual(1.3069892237633987E+308, answer); }
/// <summary> /// Public constructor for TimedComp class /// </summary> /// <param name="comp">IComputeFib instance to compute seq with</param> /// <param name="seqNum">Number in Sequence to find</param> public TimedComp(IComputeFib comp, int seqNum) { timedCompute = comp; sequenceNum = seqNum; }
public void InstanciateIterTest() { fibClassOnTest = new ComputeFibNumIteratively(); Assert.IsNotNull(fibClassOnTest); }