summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/assert-msg-test.gdb3
-rw-r--r--tests/gobject/Makefile.am6
-rw-r--r--tests/gobject/meson.build1
-rw-r--r--tests/gobject/singleton.c2
-rw-r--r--tests/gobject/testgobject.c3
-rw-r--r--tests/meson.build1
6 files changed, 8 insertions, 8 deletions
diff --git a/tests/assert-msg-test.gdb b/tests/assert-msg-test.gdb
index 63a254152..dbecaaf2a 100644
--- a/tests/assert-msg-test.gdb
+++ b/tests/assert-msg-test.gdb
@@ -1,4 +1,5 @@
run
set print elements 0
-print (char*) __glib_assert_msg
+# Work around https://sourceware.org/bugzilla/show_bug.cgi?id=22501
+print *((char**) &__glib_assert_msg)
quit
diff --git a/tests/gobject/Makefile.am b/tests/gobject/Makefile.am
index 656941db1..aa5dbb602 100644
--- a/tests/gobject/Makefile.am
+++ b/tests/gobject/Makefile.am
@@ -22,6 +22,7 @@ installed_test_programs = \
signals \
singleton \
references \
+ testgobject \
$(NULL)
# Don't install these ones, and keep them out of 'make check' because they take too long...
@@ -43,6 +44,7 @@ accumulator_SOURCES = accumulator.c testmarshal.c testmarshal.h
signals_SOURCES = signals.c
defaultiface_SOURCES = defaultiface.c testmodule.c testmodule.h
dynamictype_SOURCES = dynamictype.c testmodule.c testmodule.h
+testgobject_SOURCES = testgobject.c
if ENABLE_TIMELOOP
installed_test_programs += timeloop-closure
@@ -55,12 +57,12 @@ glib_genmarshal=$(top_builddir)/gobject/glib-genmarshal
testmarshal.h: stamp-testmarshal.h
@true
-stamp-testmarshal.h: @REBUILD@ testmarshal.list $(glib_genmarshal)
+stamp-testmarshal.h: testmarshal.list $(glib_genmarshal)
$(AM_V_GEN) $(glib_genmarshal) --prefix=test_marshal $(srcdir)/testmarshal.list --header >> xgen-gmh \
&& (cmp -s xgen-gmh testmarshal.h 2>/dev/null || cp xgen-gmh testmarshal.h) \
&& rm -f xgen-gmh xgen-gmh~ \
&& echo timestamp > $@
-testmarshal.c: @REBUILD@ testmarshal.h testmarshal.list $(glib_genmarshal)
+testmarshal.c: testmarshal.h testmarshal.list $(glib_genmarshal)
$(AM_V_GEN) (echo "#include \"testmarshal.h\""; $(glib_genmarshal) --prefix=test_marshal $(srcdir)/testmarshal.list --body) >> xgen-gmc \
&& cp xgen-gmc testmarshal.c \
&& rm -f xgen-gmc xgen-gmc~
diff --git a/tests/gobject/meson.build b/tests/gobject/meson.build
index ba72d7a1e..95212393b 100644
--- a/tests/gobject/meson.build
+++ b/tests/gobject/meson.build
@@ -8,6 +8,7 @@ gobject_tests = [
['signals'],
['singleton'],
['references'],
+ ['testgobject'],
]
# We cannot use gnome.genmarshal() here
diff --git a/tests/gobject/singleton.c b/tests/gobject/singleton.c
index 2795d0e8f..79a41b263 100644
--- a/tests/gobject/singleton.c
+++ b/tests/gobject/singleton.c
@@ -46,7 +46,7 @@ my_singleton_constructor (GType type,
GObjectConstructParam *construct_properties)
{
if (the_one_and_only)
- return g_object_ref (the_one_and_only);
+ return g_object_ref (G_OBJECT (the_one_and_only));
else
return G_OBJECT_CLASS (my_singleton_parent_class)->constructor (type, n_construct_properties, construct_properties);
}
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));
}
diff --git a/tests/meson.build b/tests/meson.build
index 694e1790f..552178271 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -5,7 +5,6 @@ test_env = [
'G_TEST_BUILDDIR=' + meson.current_build_dir(),
'G_DEBUG=gc-friendly',
'MALLOC_CHECK_=2',
- 'MALLOC_PERTURB_=@0@'.format(random_number % 256),
]
test_cargs = ['-DHAVE_CONFIG_H=1', '-DG_LOG_DOMAIN="GLib"']