mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-13 04:10:13 +00:00
testsuite: Improve coverage for GtkStringList
This commit is contained in:
parent
af5e13b9a1
commit
1c4c5e3b80
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user