diff options
author | Matthias Clasen <mclasen@redhat.com> | 2013-11-28 21:58:48 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2013-11-28 21:58:48 -0500 |
commit | 4c3b009992f585ce00cafc8cd38941eb646df8e5 (patch) | |
tree | 1b497d770f83a148b1733c483c1f7d87d44f2e49 | |
parent | d6af3c63c9a95aa86aebf422f14935059a769159 (diff) | |
download | glib-4c3b009992f585ce00cafc8cd38941eb646df8e5.tar.gz |
Improve GType test coverage
Add a test for g_type_class_get_instance_private_offset
-rw-r--r-- | gobject/tests/private.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gobject/tests/private.c b/gobject/tests/private.c index 80ef9fcbd..a960e50e0 100644 --- a/gobject/tests/private.c +++ b/gobject/tests/private.c @@ -201,10 +201,18 @@ static void private_instance (void) { TestObject *obj = g_object_new (test_object_get_type (), NULL); + gpointer class; + gint offset; g_assert_cmpint (test_object_get_dummy_0 (obj), ==, 42); g_assert_cmpfloat (test_object_get_dummy_1 (obj), ==, 3.14159f); + class = g_type_class_ref (test_object_get_type ()); + offset = g_type_class_get_instance_private_offset (class); + g_type_class_unref (class); + + g_assert (offset == TestObject_private_offset); + g_object_unref (obj); } |