From 1ffb2b7ddb1e8ce4f4fbc5c7f1a13e8533859bb6 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 8 Feb 2011 11:28:35 +0100 Subject: List debugging --- tests/list_check.c | 50 ++++++++++++++++++-------------------------------- 1 file changed, 18 insertions(+), 32 deletions(-) (limited to 'tests') diff --git a/tests/list_check.c b/tests/list_check.c index be427af0..91d7367d 100644 --- a/tests/list_check.c +++ b/tests/list_check.c @@ -38,6 +38,8 @@ static int test_lists(int num_items) RefList *list; int i; + fprintf(stderr, "Testing with %i items.\n", num_items); + check = malloc(num_items * sizeof(struct refltemp)); list = reflist_new(); @@ -47,17 +49,22 @@ static int test_lists(int num_items) int j; int duplicate = 0; - h = RANDOM_INDEX; - k = RANDOM_INDEX; - l = RANDOM_INDEX; + do { + duplicate = 0; + + h = RANDOM_INDEX; + k = RANDOM_INDEX; + l = RANDOM_INDEX; - for ( j=0; j