summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2002-05-07 15:32:08 +0000
committerOwen Taylor <otaylor@src.gnome.org>2002-05-07 15:32:08 +0000
commit053a1ce434558dc03dbfa980fc2de8fd9484ba3e (patch)
tree98ce5d28cb63fa867dc26b7dc080309f617d5a5c /tests
parent0522bb588bc406ee83eb9c1a1ff5b13edba776bc (diff)
downloadglib-053a1ce434558dc03dbfa980fc2de8fd9484ba3e.tar.gz
glib-053a1ce434558dc03dbfa980fc2de8fd9484ba3e.tar.bz2
glib-053a1ce434558dc03dbfa980fc2de8fd9484ba3e.zip
Fixes for #79347, Ron Arts.
Tue May 7 11:24:22 2002 Owen Taylor <otaylor@redhat.com> Fixes for #79347, Ron Arts. * glib/gqsort.c (g_qsort_with_data): Handle 0 elements, don't g_return_if_fail(). * tests/qsort-test.c (main): Add a 0 element test. * glib/garray.c (g_[ptr_]array_sort_with[_data]): Remove invalid assertions that array->pdata != NULL .. it's NULL for 0 elements which is a valid case.
Diffstat (limited to 'tests')
-rw-r--r--tests/qsort-test.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/qsort-test.c b/tests/qsort-test.c
index 4e1194360..9a1bc330b 100644
--- a/tests/qsort-test.c
+++ b/tests/qsort-test.c
@@ -23,5 +23,8 @@ main ()
for (i = 0; i < SIZE - 1; i++)
g_assert (array[i] <= array[i+1]);
+ /* 0 elemenents is a valid case */
+ g_qsort_with_data (array, 0, sizeof (guint32), sort, NULL);
+
return 0;
}