summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEmanuele Aina <emanuele.aina@collabora.com>2013-05-28 22:45:03 +0200
committerPhilip Withnall <withnall@endlessm.com>2017-11-17 12:26:23 +0000
commitedcabe1a4e55b3b541c2e0afcece3ba175b67dba (patch)
treefce3a9ff0faf6d45f5c6ff187aecb21e0080383c /tests
parent63c07f9b63a1e74d65b7551f7cbff266e68e637c (diff)
tests: Don't assume that private data follows the instance data
Commit 31fde56 changed the way the private data is laid out in memory by putting it *before* the instance data to keep the offsets fixed regardless of the number of many subclasses. This means that the invariant testgobject was verifying is no longer true and the failing tests can be safely dropped. https://bugzilla.gnome.org/show_bug.cgi?id=701156
Diffstat (limited to 'tests')
-rw-r--r--tests/gobject/testgobject.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/tests/gobject/testgobject.c b/tests/gobject/testgobject.c
index 9302278e5..391e01852 100644
--- a/tests/gobject/testgobject.c
+++ b/tests/gobject/testgobject.c
@@ -206,7 +206,6 @@ test_object_init (TestObject *tobject)
priv = TEST_OBJECT_GET_PRIVATE (tobject);
g_assert (priv);
- g_assert ((gchar *)priv >= (gchar *)tobject + sizeof (TestObject));
priv->dummy1 = 54321;
}
@@ -359,12 +358,10 @@ derived_object_init (DerivedObject *dobject)
derived_priv = DERIVED_OBJECT_GET_PRIVATE (dobject);
g_assert (derived_priv);
- g_assert ((gchar *)derived_priv >= (gchar *)TEST_OBJECT_GET_PRIVATE (dobject) + sizeof (TestObjectPrivate));
test_priv = TEST_OBJECT_GET_PRIVATE (dobject);
g_assert (test_priv);
- g_assert ((gchar *)test_priv >= (gchar *)dobject + sizeof (TestObject));
}