bool const test_insert_sort() { bool result = true; // section 2.1 -- insertion sort result &= TestInsertionSort(); // problem 2.1-1 result &= Problem2p1p1(); // problem 2.1-2 result &= Problem2p1p2(); return result; }
int main(int argc, char **argv) { int arraySize = MAX_SIZE; //arbitrary large array for extenuating if(argc == 2) arraySize = atoi(argv[1]); //let user easily change the size of test arrays printf("Testing sorting algorithms with arrays of SIZE: '%s'\n", argv[1]); TestMergeSort( arraySize ); printf("\n"); //formatting TestInsertionSort( arraySize ); printf("\n"); //formatting TestQuickSort( arraySize ); printf("\n"); //formatting return SUCCESS; }