summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/everything/everything.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/everything/everything.c b/tests/everything/everything.c
index d02182d4..ddab7b67 100644
--- a/tests/everything/everything.c
+++ b/tests/everything/everything.c
@@ -483,8 +483,11 @@ static void assert_test_sequence_list (const GList *in)
const GList *l;
gsize i;
- for (i = 0, l = in; l != NULL; ++i, l = l->next)
- g_assert (strcmp (in->data, test_sequence[i]) == 0);
+ for (i = 0, l = in; l != NULL; ++i, l = l->next) {
+ g_assert (i < G_N_ELEMENTS(test_sequence));
+ g_assert (strcmp (l->data, test_sequence[i]) == 0);
+ }
+ g_assert (i == G_N_ELEMENTS(test_sequence));
}
/**
@@ -602,8 +605,11 @@ static void assert_test_sequence_slist (const GSList *in)
const GSList *l;
gsize i;
- for (i = 0, l = in; l != NULL; ++i, l = l->next)
- g_assert (strcmp (in->data, test_sequence[i]) == 0);
+ for (i = 0, l = in; l != NULL; ++i, l = l->next) {
+ g_assert (i < G_N_ELEMENTS(test_sequence));
+ g_assert (strcmp (l->data, test_sequence[i]) == 0);
+ }
+ g_assert (i == G_N_ELEMENTS(test_sequence));
}
/**