diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-10-30 23:33:34 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-10-30 23:33:34 -0400 |
commit | 875452b4764ade614641bf50edd3de7c26f45beb (patch) | |
tree | 955d3aa36aa049c62153ebd49bb243552cb56b2d | |
parent | 1c4c5e3b80178007dae260359ffb8ef1ea035b98 (diff) | |
download | gtk+-875452b4764ade614641bf50edd3de7c26f45beb.tar.gz |
testsuite: Improve coverage for GtkMultiSorter
-rw-r--r-- | testsuite/gtk/sorter.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/testsuite/gtk/sorter.c b/testsuite/gtk/sorter.c index ad6d94ebbb..6822c9ad08 100644 --- a/testsuite/gtk/sorter.c +++ b/testsuite/gtk/sorter.c @@ -405,6 +405,7 @@ test_multi (void) GtkSorter *sorter1; GtkSorter *sorter2; GtkExpression *expression; + gpointer item; model = new_model (20, NULL); assert_not_model (model, "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20"); @@ -424,6 +425,12 @@ test_multi (void) gtk_multi_sorter_append (GTK_MULTI_SORTER (sorter), sorter1); gtk_multi_sorter_append (GTK_MULTI_SORTER (sorter), sorter2); + g_assert_true (GTK_TYPE_SORTER == g_list_model_get_item_type (G_LIST_MODEL (sorter))); + g_assert_cmpuint (2, ==, g_list_model_get_n_items (G_LIST_MODEL (sorter))); + item = g_list_model_get_item (G_LIST_MODEL (sorter), 1); + g_assert_true (item == sorter2); + g_object_unref (item); + assert_model (model, "2 4 6 8 10 12 14 16 18 20 1 3 5 7 9 11 13 15 17 19"); /* This doesn't do anything */ |