summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2014-09-02 13:47:09 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2014-09-03 10:23:44 +0200
commitc81d89c4f0d5f0458f4794125999014657ba0eb1 (patch)
tree8bf04d4487bfdfd0fad1b73c096bed09658998af /tests
parent19c5f952e9e30790795f3548c125e53392e8bb14 (diff)
downloadlibrest-c81d89c4f0d5f0458f4794125999014657ba0eb1.tar.gz
tests: Don't call g_type_init() on newer glib
This is deprecated and causes a compile warning https://bugzilla.gnome.org/show_bug.cgi?id=735921
Diffstat (limited to 'tests')
-rw-r--r--tests/custom-serialize.c2
-rw-r--r--tests/flickr.c2
-rw-r--r--tests/lastfm.c2
-rw-r--r--tests/oauth-async.c2
-rw-r--r--tests/oauth.c2
-rw-r--r--tests/oauth2.c2
-rw-r--r--tests/proxy-continuous.c2
-rw-r--r--tests/proxy.c2
-rw-r--r--tests/threaded.c2
-rw-r--r--tests/xml.c2
10 files changed, 20 insertions, 0 deletions
diff --git a/tests/custom-serialize.c b/tests/custom-serialize.c
index c6b801f..c5443b7 100644
--- a/tests/custom-serialize.c
+++ b/tests/custom-serialize.c
@@ -125,7 +125,9 @@ main (int argc, char **argv)
int i;
GError *error;
+#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
session = soup_session_sync_new ();
diff --git a/tests/flickr.c b/tests/flickr.c
index a34025e..1befe72 100644
--- a/tests/flickr.c
+++ b/tests/flickr.c
@@ -36,7 +36,9 @@ main (int argc, char **argv)
RestXmlParser *parser;
RestXmlNode *root, *node;
+#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
/* Create the proxy */
proxy = flickr_proxy_new (API_KEY, SHARED_SECRET);
diff --git a/tests/lastfm.c b/tests/lastfm.c
index ab86575..4b281ae 100644
--- a/tests/lastfm.c
+++ b/tests/lastfm.c
@@ -37,7 +37,9 @@ main (int argc, char **argv)
RestXmlParser *parser;
RestXmlNode *root, *u_node, *node;
+#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
/* Create the proxy */
proxy = lastfm_proxy_new (API_KEY, SECRET);
diff --git a/tests/oauth-async.c b/tests/oauth-async.c
index a258127..a8fcdbb 100644
--- a/tests/oauth-async.c
+++ b/tests/oauth-async.c
@@ -119,7 +119,9 @@ main (int argc, char **argv)
OAuthProxy *oproxy;
GError *error = NULL;
+#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
/* Install a timeout so that we don't hang or infinite loop */
g_timeout_add_seconds (10, on_timeout, NULL);
diff --git a/tests/oauth.c b/tests/oauth.c
index c1db284..639060d 100644
--- a/tests/oauth.c
+++ b/tests/oauth.c
@@ -33,7 +33,9 @@ main (int argc, char **argv)
RestProxyCall *call;
GError *error = NULL;
+#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
/* Create the proxy */
proxy = oauth_proxy_new ("key", "secret",
diff --git a/tests/oauth2.c b/tests/oauth2.c
index f4819ff..7bb1561 100644
--- a/tests/oauth2.c
+++ b/tests/oauth2.c
@@ -47,7 +47,9 @@ test_extract_token ()
int
main (int argc, char **argv)
{
+#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
test_extract_token ();
diff --git a/tests/proxy-continuous.c b/tests/proxy-continuous.c
index 2141dab..a739fac 100644
--- a/tests/proxy-continuous.c
+++ b/tests/proxy-continuous.c
@@ -168,7 +168,9 @@ main (int argc, char **argv)
char *url;
RestProxy *proxy;
+#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
loop = g_main_loop_new (NULL, FALSE);
session = soup_session_async_new ();
diff --git a/tests/proxy.c b/tests/proxy.c
index 6e630ff..36414de 100644
--- a/tests/proxy.c
+++ b/tests/proxy.c
@@ -283,7 +283,9 @@ main (int argc, char **argv)
char *url;
RestProxy *proxy;
+#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
session = soup_session_async_new ();
diff --git a/tests/threaded.c b/tests/threaded.c
index a0f5f0e..6283c9c 100644
--- a/tests/threaded.c
+++ b/tests/threaded.c
@@ -85,7 +85,9 @@ main (int argc, char **argv)
char *url;
int i;
+#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
session = soup_session_sync_new ();
diff --git a/tests/xml.c b/tests/xml.c
index 85af973..161b56e 100644
--- a/tests/xml.c
+++ b/tests/xml.c
@@ -33,7 +33,9 @@ main (int argc, char **argv)
RestXmlNode *root, *node;
char *xml;
+#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
parser = rest_xml_parser_new ();