public void GivenGetBinaryGcd_ForFourNumWhenOneOfNumbersIsZeroOutIsPositive() { Assert.AreEqual(1, AlgorithmGcd.GetBinaryGcd(0, -17, 34, 30, out double elapsedMs)); Assert.AreEqual(5, AlgorithmGcd.GetBinaryGcd(-340000, 0, 50, 100005, out elapsedMs)); }
public void GivenGetBinaryGcd_ForFourNumWhenNumbersIsNegativeAndPositiveOutIsPositive() { Assert.AreEqual(1, AlgorithmGcd.GetBinaryGcd(34, -17, 34, -50, out double elapsedMs)); Assert.AreEqual(2, AlgorithmGcd.GetBinaryGcd(-340000, 170, 34, -100, out elapsedMs)); }
public void GivenGetBinaryGcd_ForThreeNumWhenNumbersIsNegativeOutIsPositive() { Assert.AreEqual(1, AlgorithmGcd.GetBinaryGcd(-34, -17, -3700, out double elapsedMs)); Assert.AreEqual(17, AlgorithmGcd.GetBinaryGcd(-340000, -170, -17, out elapsedMs)); }
public void GivenGetBinaryGcd_ForFourNumWhenNumbersIsPositiveOutIsPositive() { Assert.AreEqual(1, AlgorithmGcd.GetBinaryGcd(34, 17, 3700, 170, out double elapsedMs)); Assert.AreEqual(1, AlgorithmGcd.GetBinaryGcd(340000, 170, 17, 1900, out elapsedMs)); }
public void GivenGetBinaryGcd_ForTwoNumWhenOneOfNumbersIsZeroOutIsPositive() { Assert.AreEqual(17, AlgorithmGcd.GetBinaryGcd(0, -17, out double elapsedMs)); Assert.AreEqual(340000, AlgorithmGcd.GetBinaryGcd(-340000, 0, out elapsedMs)); }