Skip to content
Snippets Groups Projects
Commit 11bdff4b authored by Simon McVittie's avatar Simon McVittie
Browse files

test-utils: Rely on libglnx to redefine some of the test macros


If we try to redefine g_test_skip(), and so does libglnx, then we fight.
Including libglnx first worked, because our redefinition was
conditional on it not already having been redefined; but including our
redefinition first didn't work, because libglnx's redefinition is only
conditional on the GLib version number.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 970fc860
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,9 @@
#include <glib.h>
/* for its backports of g_test_skip(), etc. */
#include <libglnx/libglnx.h>
#ifndef g_assert_true
#define g_assert_true(x) g_assert ((x))
#endif
......@@ -52,15 +55,3 @@
#ifndef g_assert_cmpstr
#define g_assert_cmpstr(a, op, b) g_assert (g_strcmp0 ((a), (b)) op 0)
#endif
#ifndef g_assert_nonnull
#define g_assert_nonnull(x) g_assert ((x) != NULL)
#endif
#ifndef g_assert_null
#define g_assert_null(x) g_assert ((x) == NULL)
#endif
#if !GLIB_CHECK_VERSION(2, 38, 0) && !defined(g_test_skip)
#define g_test_skip(msg) g_test_message ("SKIP: %s", msg)
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment