Ejemplo n.º 1
0
        public void Null_multiSteinGCD()
        {
            // arrange
            long SteintimeElapsed;

            int[] arr = null;
            // assert
            Assert.ThrowsException <ArgumentNullException>(() => CalcGCD.Calc(CalcGCD.multiSteinGCD, out SteintimeElapsed, arr));
        }
Ejemplo n.º 2
0
        public void Null_multiSteinGCD()
        {
            // arrange
            int[] arr = null;
            long  SteintimeElapsed;

            // act
            int result = CalcGCD.multiSteinGCD(out SteintimeElapsed, arr);

            // assert
            //Assert.IsTrue(expected, result);
        }
Ejemplo n.º 3
0
        public void ZeroValue_multiSteinGCD()
        {
            // arrange
            int[] arr      = { 0, 8, 12, 16, 20, 24, 2, 6, 10 };
            int   expected = 0;
            long  SteintimeElapsed;

            // act
            int result = CalcGCD.Calc(CalcGCD.multiSteinGCD, out SteintimeElapsed, arr);

            // assert
            Assert.AreEqual(expected, result);
        }
Ejemplo n.º 4
0
        public void Negative_multiEuclidGCD()
        {
            // arrange
            int[] arr      = { -4, -8, 12, 16, 20, 24, 2, 6, 10 };
            int   expected = 2;
            long  EuclidtimeElapsed;

            // act
            int result = CalcGCD.Calc(CalcGCD.multiEuclidGCD, out EuclidtimeElapsed, arr);

            // assert
            Assert.AreEqual(expected, result);
        }
Ejemplo n.º 5
0
        public void Normal_multiSteinGCD()
        {
            // arrange
            int[] arr      = { 4, 8, 12, 16, 20, 24, 2, 6, 10 };
            int   expected = 2;
            long  SteintimeElapsed;

            // act
            int result = CalcGCD.multiSteinGCD(out SteintimeElapsed, arr);

            // assert
            Assert.AreEqual(expected, result);
        }
Ejemplo n.º 6
0
 public int CheckGCDBinaryMultiple(int[] a)
 {
     return(CalcGCD.GCDBinary(a));
 }
Ejemplo n.º 7
0
 public int CheckGCDBinary(int a, int b)
 {
     return(CalcGCD.GCDBinary(a, b));
 }
Ejemplo n.º 8
0
 public int CheckGCDEuclidMultiple(int[] a)
 {
     return(CalcGCD.GCDEuclid(a));
 }
Ejemplo n.º 9
0
 public int CheckGCDEuclid(int a, int b)
 {
     return(CalcGCD.GCDEuclid(a, b));
 }