예제 #1
0
        public void DiffFilterMinus()
        {
            int[] input    = { 4, 2, 8, -3, 9, 4, 10, 5, 11, 6 };
            int[] output   = DiffFilter.numbersDiff(input);
            int[] expected = { 4, 2, 6, 11, 12, 5, 6, 5, 6, 5 };  // 11 and 12 difference from (-3 -> 8), (9 -> -3)

            foreach (var o in output)
            {
                Debug.Log(o);
            }
            CollectionAssert.AreEqual(expected, output);
        }
예제 #2
0
        public void DiffFilterSimple()
        {
            int[] input    = { 4, 2, 8, 3, 9, 4, 10, 5, 11, 6 };
            int[] output   = DiffFilter.numbersDiff(input);
            int[] expected = { 4, 2, 6, 5, 6, 5, 6, 5, 6, 5 };

            foreach (var o in output)
            {
                Debug.Log(o);
            }
            CollectionAssert.AreEqual(expected, output);
        }