[Spice-devel] [PATCH spice-server v2 3/3] tests: Reuse GLib compatibility code
Frediano Ziglio
fziglio at redhat.com
Fri Mar 3 14:21:23 UTC 2017
Instead of disabling the code use the compatibility functions.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
server/tests/Makefile.am | 1 +
server/tests/test-codecs-parsing.c | 7 -------
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/server/tests/Makefile.am b/server/tests/Makefile.am
index 6983f6c..db23177 100644
--- a/server/tests/Makefile.am
+++ b/server/tests/Makefile.am
@@ -122,6 +122,7 @@ test_vdagent_CPPFLAGS = \
-UGLIB_VERSION_MIN_REQUIRED \
-UGLIB_VERSION_MAX_ALLOWED \
$(NULL)
+test_codecs_parsing_CPPFLAGS = $(test_vdagent_CPPFLAGS)
if HAVE_GSTREAMER
test_gst_SOURCES = test-gst.c \
diff --git a/server/tests/test-codecs-parsing.c b/server/tests/test-codecs-parsing.c
index a2e1b9a..0390a49 100644
--- a/server/tests/test-codecs-parsing.c
+++ b/server/tests/test-codecs-parsing.c
@@ -45,9 +45,6 @@ static void codecs_good(void)
spice_server_destroy(server);
}
-/* g_test_expect_message is available since Glib 2.34 */
-#if GLIB_CHECK_VERSION(2, 34, 0)
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
static void codecs_bad(void)
{
guint i;
@@ -137,17 +134,13 @@ static void codecs_bad(void)
spice_server_destroy(server);
}
-G_GNUC_END_IGNORE_DEPRECATIONS
-#endif
int main(int argc, char *argv[])
{
g_test_init(&argc, &argv, NULL);
g_test_add_func("/server/codecs-good", codecs_good);
-#if GLIB_CHECK_VERSION(2, 34, 0)
g_test_add_func("/server/codecs-bad", codecs_bad);
-#endif
return g_test_run();
}
--
2.9.3
More information about the Spice-devel
mailing list