summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2017-07-17 10:16:06 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2017-07-17 10:16:06 +0100
commit43aac613f1c2a56aa672c36c157c9b8eb193ac25 (patch)
tree350bf07923d136a3e24006b423ae1ca601107257 /tests
parent46e8b1cfad0012be1d74a32ded0f5f873599b2b4 (diff)
downloadlibnotify-43aac613f1c2a56aa672c36c157c9b8eb193ac25.tar.gz
Conditionall call g_type_init() after a version check
There's no need to call g_type_init() since GLib 2.36, so let's hide it when building against newer versions of GLib.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-error.c2
-rw-r--r--tests/test-replace.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/test-error.c b/tests/test-error.c
index b7b9662..afcb59b 100644
--- a/tests/test-error.c
+++ b/tests/test-error.c
@@ -29,7 +29,9 @@ main ()
{
NotifyNotification *n;
+#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
notify_init ("Error Handling");
diff --git a/tests/test-replace.c b/tests/test-replace.c
index 56b13c5..ec7b5fc 100644
--- a/tests/test-replace.c
+++ b/tests/test-replace.c
@@ -28,7 +28,9 @@ main ()
GError *error;
error = NULL;
+#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
notify_init ("Replace Test");