[gtk/matthiasc/for-master] testsuite: Improve coverage for GtkMultiFilter
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master] testsuite: Improve coverage for GtkMultiFilter
- Date: Sat, 31 Oct 2020 13:24:00 +0000 (UTC)
commit 59dd7d8900402d33e360327a7d960fc1c8d3cf65
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Oct 30 22:27:15 2020 -0400
testsuite: Improve coverage for GtkMultiFilter
testsuite/gtk/filter.c | 7 +++++++
1 file changed, 7 insertions(+)
---
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");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]