public void GivenGetEuclidGcd_ForThreeNumWhenOneOfNumbersIsZeroOutIsPositive() { Assert.AreEqual(17, AlgorithmGcd.GetEuclidGcd(0, -17, 34, out double elapsedMs)); Assert.AreEqual(50, AlgorithmGcd.GetEuclidGcd(-340000, 0, 50, out elapsedMs)); }
public void GivenGetEuclidGcd_ForFourNumWhenNumbersIsPositiveOutIsPositive() { Assert.AreEqual(1, AlgorithmGcd.GetEuclidGcd(34, 17, 3700, 170, out double elapsedMs)); Assert.AreEqual(1, AlgorithmGcd.GetEuclidGcd(340000, 170, 17, 1900, out elapsedMs)); }
public void GivenGetEuclidGcd_ForThreeNumWhenNumbersIsNegativeAndPositiveOutIsPositive() { Assert.AreEqual(17, AlgorithmGcd.GetEuclidGcd(34, -17, 34, out double elapsedMs)); Assert.AreEqual(34, AlgorithmGcd.GetEuclidGcd(-340000, 170, 34, out elapsedMs)); }