diff options
author | Matthias Clasen <mclasen@redhat.com> | 2023-05-16 11:55:40 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2023-05-16 12:33:12 -0400 |
commit | c2676ad7856fd7f5b851ed12337ca6c48abbc370 (patch) | |
tree | 39f16cf3719c6ff4b3811724f5eb28a2a88f8ca9 | |
parent | 4a1598dc2a316eb27046467a33c68ff1babb55fa (diff) | |
download | gtk+-c2676ad7856fd7f5b851ed12337ca6c48abbc370.tar.gz |
Improve test coverage for GtkPropertyLookupListModel
-rw-r--r-- | testsuite/gtk/propertylookuplistmodel.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/gtk/propertylookuplistmodel.c b/testsuite/gtk/propertylookuplistmodel.c index ea83357bf8..a2e87d1fde 100644 --- a/testsuite/gtk/propertylookuplistmodel.c +++ b/testsuite/gtk/propertylookuplistmodel.c @@ -162,11 +162,24 @@ static void test_create_empty (void) { GtkPropertyLookupListModel *model; + GType type; + guint n_items; + char *property; model = new_model (FALSE); assert_model (model, ""); assert_changes (model, ""); + g_assert_true (g_list_model_get_item_type (G_LIST_MODEL (model)) == GTK_TYPE_WIDGET); + g_object_get (model, + "item-type", &type, + "n-items", &n_items, + "property", &property, + NULL); + g_assert_true (type == GTK_TYPE_WIDGET); + g_assert_true (n_items == 0); + g_assert_cmpstr (property, ==, "parent"); + g_object_unref (model); } @@ -193,6 +206,8 @@ test_set_object (void) model = new_model (FALSE); gtk_property_lookup_list_model_set_object (model, widget); + g_assert_true (gtk_property_lookup_list_model_get_object (model) == widget); + assert_model (model, "GtkLabel GtkGrid GtkBox GtkWindow"); assert_changes (model, "+0*"); g_object_unref (model); |