diff options
author | Matthias Clasen <mclasen@redhat.com> | 2023-05-16 13:45:38 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2023-05-16 20:13:57 -0400 |
commit | 188677724ce27287caa80143f15207ed68347f2d (patch) | |
tree | 9182cdf2fde182e97f37a4b0e8f07d051fc3cf89 | |
parent | 1b885cc317156f215d79c415828f42db1ef143af (diff) | |
download | gtk+-188677724ce27287caa80143f15207ed68347f2d.tar.gz |
Improve test coverage for property lookup models
-rw-r--r-- | testsuite/gtk/propertylookuplistmodel.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/testsuite/gtk/propertylookuplistmodel.c b/testsuite/gtk/propertylookuplistmodel.c index a2e87d1fde..1970868306 100644 --- a/testsuite/gtk/propertylookuplistmodel.c +++ b/testsuite/gtk/propertylookuplistmodel.c @@ -165,6 +165,7 @@ test_create_empty (void) GType type; guint n_items; char *property; + GObject *object; model = new_model (FALSE); assert_model (model, ""); @@ -173,10 +174,12 @@ test_create_empty (void) g_assert_true (g_list_model_get_item_type (G_LIST_MODEL (model)) == GTK_TYPE_WIDGET); g_object_get (model, "item-type", &type, + "object", &object, "n-items", &n_items, "property", &property, NULL); g_assert_true (type == GTK_TYPE_WIDGET); + g_assert_null (object); g_assert_true (n_items == 0); g_assert_cmpstr (property, ==, "parent"); @@ -217,8 +220,12 @@ test_set_object (void) gtk_property_lookup_list_model_set_object (model, widget); assert_model (model, "GtkLabel GtkGrid GtkBox GtkWindow"); assert_changes (model, "0+4*"); - g_object_unref (model); + g_object_set (model, "object", NULL, NULL); + assert_model (model, ""); + assert_changes (model, "0-4*"); + + g_object_unref (model); destroy_widgets (); } |