From 1c4c5e3b80178007dae260359ffb8ef1ea035b98 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 30 Oct 2020 23:33:15 -0400 Subject: [PATCH] testsuite: Improve coverage for GtkStringList --- testsuite/gtk/stringlist.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/testsuite/gtk/stringlist.c b/testsuite/gtk/stringlist.c index 12169be13e..63a1f6def4 100644 --- a/testsuite/gtk/stringlist.c +++ b/testsuite/gtk/stringlist.c @@ -109,6 +109,16 @@ new_model (const char **strings) return result; } +static void +test_string_object (void) +{ + GtkStringObject *so; + + so = gtk_string_object_new ("Hello"); + g_assert_cmpstr (gtk_string_object_get_string (so), ==, "Hello"); + g_object_unref (so); +} + static void test_create_empty (void) { @@ -116,6 +126,8 @@ test_create_empty (void) list = new_model ((const char *[]){ NULL }); + g_assert_true (g_type_is_a (g_list_model_get_item_type (G_LIST_MODEL (list)), G_TYPE_OBJECT)); + assert_model (list, ""); assert_changes (list, ""); @@ -237,6 +249,7 @@ main (int argc, char *argv[]) changes_quark = g_quark_from_static_string ("What did I see? Can I believe what I saw?"); + g_test_add_func ("/stringobject/basic", test_string_object); g_test_add_func ("/stringlist/create/empty", test_create_empty); g_test_add_func ("/stringlist/create/strv", test_create_strv); g_test_add_func ("/stringlist/create/builder", test_create_builder);