Ejemplo n.º 1
0
        public void Prepare(ITestCase testCase)
        {
            SortCase sortCase = (SortCase)testCase;

            sortArray = new int[sortCase.sourceArray.Length];
            Array.Copy(sortCase.sourceArray, sortArray, sortCase.sourceArray.Length);
        }
Ejemplo n.º 2
0
        public bool Compare(ITestCase testCase)
        {
            SortCase sortCase = (SortCase)testCase;

            if (sortCase.expectArray.Length != sortArray.Length)
            {
                return(false);
            }
            for (int index = 0; index < sortCase.expectArray.Length; ++index)
            {
                if (sortCase.expectArray[index] != sortArray[index])
                {
                    return(false);
                }
            }
            return(true);
        }