From e980ed54dc29e025587aba47390727c500aec8f1 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 8 Feb 2011 19:10:27 +0100 Subject: Work on making iteration work --- tests/list_check.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/list_check.c b/tests/list_check.c index 00e27e00..ffae8d12 100644 --- a/tests/list_check.c +++ b/tests/list_check.c @@ -27,6 +27,7 @@ struct refltemp { signed int l; int del; int dup; + int found; }; #define RANDOM_INDEX (128*random()/RAND_MAX - 256*random()/RAND_MAX) @@ -38,6 +39,8 @@ static int test_lists(int num_items) RefList *list; int i; signed int h, k, l; + Reflection *refl; + RefListIterator *iter; check = malloc(num_items * sizeof(struct refltemp)); list = reflist_new(); @@ -53,11 +56,11 @@ static int test_lists(int num_items) int j; int duplicate = 0; - if ( random() > RAND_MAX/2 ) { + //if ( random() > RAND_MAX/2 ) { h = RANDOM_INDEX; k = RANDOM_INDEX; l = RANDOM_INDEX; - } /* else use the same as last time */ + //} /* else use the same as last time */ /* Count the number of times this reflection appeared before */ for ( j=0; j