mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-11 23:16:14 +01:00
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
This commit is contained in:
parent
63c07f9b63
commit
edcabe1a4e
@ -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));
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user