Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

A little more testing of the merge sort.

  • Loading branch information...
commit fc41e575f2fbff848900feca3b3a6967f64bb66a 1 parent 08aeb2d
Zed A. Shaw authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 tests/list_algos_tests.c
6 tests/list_algos_tests.c
View
@@ -65,7 +65,11 @@ char *test_merge_sort()
List *res = List_merge_sort(words, (List_compare)strcmp);
mu_assert(is_sorted(res), "Words are not sorted after merge sort.");
- List_destroy(res);
+ List *res2 = List_merge_sort(res, (List_compare)strcmp);
+ mu_assert(is_sorted(res), "Should still be sorted after merge sort.");
+ List_destroy(res2);
+ List_destroy(res);
+
List_destroy(words);
return NULL;
}
Please sign in to comment.
Something went wrong with that request. Please try again.