Changeset 3293

Show
Ignore:
Timestamp:
04/27/08 14:49:59 (4 months ago)
Author:
dgollub
Message:

Make use of latest hashtable API changes in tests/support.c

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tests/support.c

    r3281 r3293  
    224224        fail_unless(table != NULL, NULL); 
    225225        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); 
    228230     
    229231    return table; 
     
    232234void check_hash(OSyncHashTable *table, const char *cmpuid) 
    233235{ 
    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!"); 
    246237} 
    247238