]> git.donarmstrong.com Git - biopieces.git/blob - code_c/Maasha/src/test_hash.c
updateing to idba hybrid
[biopieces.git] / code_c / Maasha / src / test_hash.c
1 #include <stdio.h>
2 #include "common.h"
3 #include "hash.h"
4
5
6 int main()
7 {
8     struct hash *my_hash;
9     int          pot;
10     int          i;
11     char        *dummy;
12
13     pot = 16;
14
15     my_hash = hash_new( pot );
16
17     for ( i = 1; i <= ( 1 << pot ); i++ )
18     {
19         sprintf( dummy, "dummy_%d", i );
20
21         hash_add( my_hash, dummy, "FOO" );
22     }
23
24     hash_collision_stats( my_hash );
25
26 //    if ( ( val = ( char * ) hash_get( my_hash, key ) ) != NULL ) {
27 //        printf( "Key: %s, Val: %s\n", key, val );
28 //    } else {
29 //        printf( "Key: %s, Val: Not Found\n", key );
30 //    }
31
32     hash_destroy( my_hash );
33
34     return 0;
35 }