public void CollatzFilterT()
        {
            int[] input    = { 3, 2, 8, 9, 10, 105 };
            int[] output   = CollatzFilter.collatz(input); //CubeFilter.cubes(input);
            int[] expected = { 10, 1, 4, 28, 5, 316 };

            CollectionAssert.AreEqual(expected, output);
        }
예제 #2
0
        public void CollatzSimple()
        {
            int[] input     = { 1, 2, 5, 8, 0, -2 };
            int[] output    = CollatzFilter.collatz(input);
            int[] expected  = { 4, 1, 16, 4, 0, -1 };
            int[] incorrect = { 2, 4, 0, -1, 1000, 0 };

            CollectionAssert.AreNotEqual(incorrect, output);

            CollectionAssert.AreEqual(expected, output);
        }