Permalink
Browse files

A little more testing of the merge sort.

  • Loading branch information...
1 parent 08aeb2d commit fc41e575f2fbff848900feca3b3a6967f64bb66a @zedshaw committed Apr 10, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 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;
}

0 comments on commit fc41e57

Please sign in to comment.