コード例 #1
0
        public void BinaryGCDCalculationMethod_ArrayOgIntegers_CalculationTimeNotNull()
        {
            double time      = 0;
            int    resultGCD = GCD.BinaryGCDCalculation(out time, new int[] { 0, 1, 0, 1, 0 });

            Assert.NotNull(time);
        }
コード例 #2
0
        public void BinaryGCDCalculationMethod_TwoIntegers_CalculationTimeNotNull()
        {
            double time      = 0;
            int    resultGCD = GCD.BinaryGCDCalculation(5, 0, out time);

            Assert.NotNull(time);
        }
コード例 #3
0
 public void BinaryGCDCalculationMethod_EmptyArray_ThrowArgumentException()
 {
     Assert.Throws <ArgumentException>(() => GCD.BinaryGCDCalculation(new int[] { }));
 }
コード例 #4
0
 public int BinaryGCDCalculationTests(int[] numbers)
 => GCD.BinaryGCDCalculation(numbers);
コード例 #5
0
 public void BinaryGCDCalculationMethod_InvalidValues_ThrowArgumentException()
 {
     Assert.Throws <ArgumentException>(() => GCD.BinaryGCDCalculation(0, 0));
 }
コード例 #6
0
 public int BinaryGCDCalculationTests(int first, int second)
 => GCD.BinaryGCDCalculation(first, second);