From b52294d14ce7097c34538d4646f298461fb8d36e Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 4 Dec 2010 14:12:07 -0500 Subject: [PATCH] Try to fix the version test on builders --- glib/tests/utils.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/glib/tests/utils.c b/glib/tests/utils.c index 6b8da900d..f586aa131 100644 --- a/glib/tests/utils.c +++ b/glib/tests/utils.c @@ -75,6 +75,10 @@ test_language_names (void) static void test_version (void) { + g_print ("(header %d.%d.%d library %d.%d.%d) ", + GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION, + glib_major_version, glib_minor_version, glib_micro_version); + g_assert (glib_check_version (GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION) == NULL); @@ -90,9 +94,12 @@ test_version (void) g_assert (glib_check_version (GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION + 1, 0) != NULL); + /* don't use + 1 here, since a +/-1 difference can + * happen due to post-release version bumps in git + */ g_assert (glib_check_version (GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, - GLIB_MICRO_VERSION + 1) != NULL); + GLIB_MICRO_VERSION + 3) != NULL); } static const gchar *argv0;