From 068637d3b2d98178675cb2c81217993023cdfef7 Mon Sep 17 00:00:00 2001 From: Christopher Swenson Date: Mon, 12 Feb 2024 17:24:23 -0800 Subject: [PATCH] All stable tests --- .github/workflows/test.yml | 2 +- stresstest.c | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e71c04e..a7f9983 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,4 +32,4 @@ jobs: run: ls - shell: bash name: stresstest - run: gdb -batch -ex "run" -ex "bt" ./stresstest.exe 2>&1 | grep -v ^"No stack."$ + run: ./stresstest.exe diff --git a/stresstest.c b/stresstest.c index dab9207..0774433 100644 --- a/stresstest.c +++ b/stresstest.c @@ -397,22 +397,22 @@ void stable_tests(void) { int size = 100000; int num_values = 1000; check_stable("binary insertion sort", stable_binary_insertion_sort, size, num_values); -// #ifdef SET_SORT_EXTRA -// check_stable("selection sort", stable_selection_sort, size, num_values); -// check_stable("bubble sort", stable_bubble_sort, size, num_values); -// #endif -// check_stable("quick sort", stable_quick_sort, size, num_values); -// check_stable("merge sort", stable_merge_sort, size, num_values); -// check_stable("heap sort", stable_heap_sort, size, num_values); -// check_stable("shell sort", stable_shell_sort, size, num_values); -// check_stable("tim sort", stable_tim_sort, size, num_values); -// check_stable("merge (in-place) sort", stable_merge_sort_in_place, size, num_values); -// #ifdef SET_SORT_EXTRA -// check_stable("grail sort", stable_grail_sort, size, num_values); -// check_stable("sqrt sort", stable_sqrt_sort, size, num_values); -// check_stable("rec stable sort", stable_rec_stable_sort, size, num_values); -// check_stable("grail sort dyn byffer", stable_grail_sort_dyn_buffer, size, num_values); -// #endif +#ifdef SET_SORT_EXTRA + check_stable("selection sort", stable_selection_sort, size, num_values); + check_stable("bubble sort", stable_bubble_sort, size, num_values); +#endif + check_stable("quick sort", stable_quick_sort, size, num_values); + check_stable("merge sort", stable_merge_sort, size, num_values); + check_stable("heap sort", stable_heap_sort, size, num_values); + check_stable("shell sort", stable_shell_sort, size, num_values); + check_stable("tim sort", stable_tim_sort, size, num_values); + check_stable("merge (in-place) sort", stable_merge_sort_in_place, size, num_values); +#ifdef SET_SORT_EXTRA + check_stable("grail sort", stable_grail_sort, size, num_values); + check_stable("sqrt sort", stable_sqrt_sort, size, num_values); + check_stable("rec stable sort", stable_rec_stable_sort, size, num_values); + check_stable("grail sort dyn byffer", stable_grail_sort_dyn_buffer, size, num_values); +#endif } int main(void) {