Beispiel #1
0
        public static void SmallestInteger_FindSmallestInt_RandomTest([Random(0, 10, 50)] int min)
        {
            Random     r    = new Random();
            List <int> list = new List <int>();

            for (int i = 0; i < 99; i++)
            {
                list.Add(r.Next(90) + 10);
            }
            list.Add(min);
            int[] args = list.ToArray();
            Assert.AreEqual(Solution(args), SmallestInteger.FindSmallestInt(args));
        }
Beispiel #2
0
 public static void SmallestInteger_FindSmallestInt_FixedTest2()
 {
     Assert.AreEqual(-33, SmallestInteger.FindSmallestInt(new int[] { 78, 56, -2, 12, 8, -33 }));
 }
Beispiel #3
0
 public static void SmallestInteger_FindSmallestInt_FixedTest1()
 {
     Assert.AreEqual(11, SmallestInteger.FindSmallestInt(new int[] { 78, 56, 232, 12, 11, 43 }));
 }