mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 14:41:25 +00:00
tests: Reuse GLib compatibility code
Instead of disabling the code use the compatibility functions. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
parent
73f8a65d06
commit
a22a76371e
@ -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 \
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user