Changeset 3293
- Timestamp:
- 04/27/08 14:49:59 (4 months ago)
- Files:
-
- trunk/tests/support.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/tests/support.c
r3281 r3293 224 224 fail_unless(table != NULL, NULL); 225 225 fail_unless(error == NULL, NULL); 226 227 fail_unless(osync_hashtable_num_entries(table) == entries, NULL); 226 227 fail_unless(osync_hashtable_load(table, &error), NULL); 228 229 fail_unless(osync_hashtable_num_entries(table) == entries, NULL); 228 230 229 231 return table; … … 232 234 void check_hash(OSyncHashTable *table, const char *cmpuid) 233 235 { 234 char *uid = NULL; 235 char *hash = NULL; 236 int i; 237 osync_bool found = FALSE; 238 for (i = 0; i < osync_hashtable_num_entries(table); i++) { 239 osync_hashtable_nth_entry(table, i, &uid, &hash); 240 if (!strcmp(cmpuid, uid)) 241 found = TRUE; 242 g_free(hash); 243 g_free(uid); 244 } 245 fail_unless(found == TRUE, NULL); 236 fail_unless(!!osync_hashtable_get_hash(table, cmpuid), "Couldn't find hash!"); 246 237 } 247 238
