diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-10-30 22:27:15 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-10-30 22:27:40 -0400 |
commit | 59dd7d8900402d33e360327a7d960fc1c8d3cf65 (patch) | |
tree | d293494af8b16c8c94dea5584ec98e18fdd63c4d | |
parent | c279bdaa81023e77f4ae18a21d509a87164045ba (diff) | |
download | gtk+-59dd7d8900402d33e360327a7d960fc1c8d3cf65.tar.gz |
testsuite: Improve coverage for GtkMultiFilter
-rw-r--r-- | testsuite/gtk/filter.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/testsuite/gtk/filter.c b/testsuite/gtk/filter.c index 2ddd0f3ebc..d6fb3fdb0e 100644 --- a/testsuite/gtk/filter.c +++ b/testsuite/gtk/filter.c @@ -219,6 +219,7 @@ test_any_simple (void) { GtkFilterListModel *model; GtkFilter *any, *filter1, *filter2; + gpointer item; any = GTK_FILTER (gtk_any_filter_new ()); filter1 = GTK_FILTER (gtk_custom_filter_new (divisible_by, GUINT_TO_POINTER (3), NULL)); @@ -233,6 +234,12 @@ test_any_simple (void) gtk_multi_filter_append (GTK_MULTI_FILTER (any), filter2); assert_model (model, "3 5 6 9 10 12 15 18 20"); + g_assert_true (g_list_model_get_item_type (G_LIST_MODEL (any)) == GTK_TYPE_FILTER); + g_assert_cmpuint (2, ==, g_list_model_get_n_items (G_LIST_MODEL (any))); + item = g_list_model_get_item (G_LIST_MODEL (any), 1); + g_assert_true (GTK_FILTER (item) == filter2); + g_object_unref (item); + gtk_multi_filter_remove (GTK_MULTI_FILTER (any), 0); assert_model (model, "5 10 15 20"); |