[libsoup] Hack do_qvalue_tests() to handle undefined sort order of test
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup] Hack do_qvalue_tests() to handle undefined sort order of test
- Date: Mon, 1 May 2017 17:59:47 +0000 (UTC)
commit e3267e59e7fc2192df2acc2c1d0cbc324e606b6f
Author: Dan Winship <danw gnome org>
Date: Mon May 1 13:58:49 2017 -0400
Hack do_qvalue_tests() to handle undefined sort order of test
https://bugzilla.gnome.org/show_bug.cgi?id=777258
tests/header-parsing.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/tests/header-parsing.c b/tests/header-parsing.c
index b19ef11..c896879 100644
--- a/tests/header-parsing.c
+++ b/tests/header-parsing.c
@@ -908,6 +908,17 @@ do_qvalue_tests (void)
debug_printf (1, " acceptable: ");
if (acceptable) {
+ /* Kludge to deal with the fact that the sort order of the first
+ * test is not fully specified.
+ */
+ if (i == 0 && acceptable->next &&
+ !g_str_equal (acceptable->data, qvaluetests[i].acceptable[0]) &&
+ g_str_equal (acceptable->data, qvaluetests[i].acceptable[1])) {
+ gpointer tmp = acceptable->data;
+ acceptable->data = acceptable->next->data;
+ acceptable->next->data = tmp;
+ }
+
for (iter = acceptable, j = 0; iter; iter = iter->next, j++) {
debug_printf (1, "%s ", (char *)iter->data);
g_assert_cmpstr (iter->data, ==, qvaluetests[i].acceptable[j]);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]