[gtk/matthiasc/for-master] testsuite: Improve coverage for GtkStringList
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master] testsuite: Improve coverage for GtkStringList
- Date: Sat, 31 Oct 2020 13:24:00 +0000 (UTC)
commit 1c4c5e3b80178007dae260359ffb8ef1ea035b98
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Oct 30 23:33:15 2020 -0400
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]