[glib] Try to fix the version test on builders
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Try to fix the version test on builders
- Date: Sat, 4 Dec 2010 19:12:38 +0000 (UTC)
commit b52294d14ce7097c34538d4646f298461fb8d36e
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Dec 4 14:12:07 2010 -0500
Try to fix the version test on builders
glib/tests/utils.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/glib/tests/utils.c b/glib/tests/utils.c
index 6b8da90..f586aa1 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]