Skip to content

Commit bf259a8

Browse files
committed
Only stable tests
1 parent 16755ca commit bf259a8

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

stresstest.c

+27-27
Original file line numberDiff line numberDiff line change
@@ -397,44 +397,44 @@ void stable_tests(void) {
397397
int size = 100000;
398398
int num_values = 1000;
399399
check_stable("binary insertion sort", stable_binary_insertion_sort, size, num_values);
400-
#ifdef SET_SORT_EXTRA
401-
check_stable("selection sort", stable_selection_sort, size, num_values);
402-
check_stable("bubble sort", stable_bubble_sort, size, num_values);
403-
#endif
404-
check_stable("quick sort", stable_quick_sort, size, num_values);
405-
check_stable("merge sort", stable_merge_sort, size, num_values);
406-
check_stable("heap sort", stable_heap_sort, size, num_values);
407-
check_stable("shell sort", stable_shell_sort, size, num_values);
408-
check_stable("tim sort", stable_tim_sort, size, num_values);
409-
check_stable("merge (in-place) sort", stable_merge_sort_in_place, size, num_values);
410-
#ifdef SET_SORT_EXTRA
411-
check_stable("grail sort", stable_grail_sort, size, num_values);
412-
check_stable("sqrt sort", stable_sqrt_sort, size, num_values);
413-
check_stable("rec stable sort", stable_rec_stable_sort, size, num_values);
414-
check_stable("grail sort dyn byffer", stable_grail_sort_dyn_buffer, size, num_values);
415-
#endif
400+
// #ifdef SET_SORT_EXTRA
401+
// check_stable("selection sort", stable_selection_sort, size, num_values);
402+
// check_stable("bubble sort", stable_bubble_sort, size, num_values);
403+
// #endif
404+
// check_stable("quick sort", stable_quick_sort, size, num_values);
405+
// check_stable("merge sort", stable_merge_sort, size, num_values);
406+
// check_stable("heap sort", stable_heap_sort, size, num_values);
407+
// check_stable("shell sort", stable_shell_sort, size, num_values);
408+
// check_stable("tim sort", stable_tim_sort, size, num_values);
409+
// check_stable("merge (in-place) sort", stable_merge_sort_in_place, size, num_values);
410+
// #ifdef SET_SORT_EXTRA
411+
// check_stable("grail sort", stable_grail_sort, size, num_values);
412+
// check_stable("sqrt sort", stable_sqrt_sort, size, num_values);
413+
// check_stable("rec stable sort", stable_rec_stable_sort, size, num_values);
414+
// check_stable("grail sort dyn byffer", stable_grail_sort_dyn_buffer, size, num_values);
415+
// #endif
416416
}
417417

418418
int main(void) {
419419
int i = 0;
420420
int64_t sizes[TESTS];
421421
srand48(SEED);
422422
stable_tests();
423-
fill_random(sizes, TESTS);
423+
// fill_random(sizes, TESTS);
424424

425-
for (i = 0; i < TESTS; i++) {
426-
RAND_RANGE(sizes[i], 1, MAXSIZE);
427-
}
425+
// for (i = 0; i < TESTS; i++) {
426+
// RAND_RANGE(sizes[i], 1, MAXSIZE);
427+
// }
428428

429-
sizes[TESTS - 1] = MAXSIZE;
429+
// sizes[TESTS - 1] = MAXSIZE;
430430

431-
for (i = 0; i < FILL_LAST_ELEMENT; i++) {
432-
int result = run_tests(sizes, TESTS, i);
431+
// for (i = 0; i < FILL_LAST_ELEMENT; i++) {
432+
// int result = run_tests(sizes, TESTS, i);
433433

434-
if (result) {
435-
return 1;
436-
}
437-
}
434+
// if (result) {
435+
// return 1;
436+
// }
437+
// }
438438

439439
return 0;
440440
}

0 commit comments

Comments
 (0)