public void FibFromLoop_IndexLargeNumber() { ulong input = 10000000;// 1000000; //100000;//40000; Stopwatch sw = new Stopwatch(); sw.Start(); // 10000 gives 1 msecond as does 12500 ulong answer = FibonacciCalculations.JustOneFibSimpleLoop(input); sw.Stop(); Console.WriteLine($"Test took {sw.ElapsedMilliseconds} milliseconds. Input was {input} and answer was {answer}"); Console.WriteLine($"Test took {sw.ElapsedTicks} ticks"); Assert.IsTrue(sw.ElapsedTicks > 0); }
public void FibFromLoop_Index4() { ulong answer = FibonacciCalculations.JustOneFibSimpleLoop(4); Assert.IsTrue(answer == 3); }