mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
Improve test coverage in gobject/tests
This is just making sure that we execute property getters/setters.
This commit is contained in:
@@ -213,6 +213,8 @@ properties_construct (void)
|
||||
{
|
||||
TestObject *obj;
|
||||
gint val;
|
||||
gboolean b;
|
||||
gchar *s;
|
||||
|
||||
g_test_bug ("630357");
|
||||
|
||||
@@ -223,11 +225,13 @@ properties_construct (void)
|
||||
"foo", 3,
|
||||
"foo", 4,
|
||||
"foo", 5,
|
||||
"bar", FALSE,
|
||||
"foo", 6,
|
||||
"foo", 7,
|
||||
"foo", 8,
|
||||
"foo", 9,
|
||||
"foo", 10,
|
||||
"baz", "boo",
|
||||
"foo", 11,
|
||||
"foo", 12,
|
||||
"foo", 13,
|
||||
@@ -240,6 +244,11 @@ properties_construct (void)
|
||||
|
||||
g_object_get (obj, "foo", &val, NULL);
|
||||
g_assert (val == 18);
|
||||
g_object_get (obj, "bar", &b, NULL);
|
||||
g_assert (!b);
|
||||
g_object_get (obj, "baz", &s, NULL);
|
||||
g_assert_cmpstr (s, ==, "boo");
|
||||
g_free (s);
|
||||
|
||||
g_object_unref (obj);
|
||||
}
|
||||
|
Reference in New Issue
Block a user