diff options
Diffstat (limited to 'test/pkbktarr.c')
| -rw-r--r-- | test/pkbktarr.c | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/test/pkbktarr.c b/test/pkbktarr.c index cb39651..ef8a78f 100644 --- a/test/pkbktarr.c +++ b/test/pkbktarr.c @@ -120,20 +120,20 @@ int main(int argc, char *argv[]) if (arr.head_l.i != 1) exit(1); if (arr.head_r.b != 0) exit(1); if (arr.head_r.i != 1) exit(1); - if (bkt_buckets->allocs != 2) exit(1); - if (bkt_data->allocs != 1) exit(1); + if (bkt_buckets->alloc_count != 2) exit(1); + if (bkt_data->alloc_count != 1) exit(1); pk_bkt_arr_free_handle(&arr, h); if (arr.head_l.b != 0) exit(1); if (arr.head_l.i != 0) exit(1); if (arr.head_r.b != 0) exit(1); if (arr.head_r.i != 1) exit(1); - if (bkt_buckets->allocs != 2) exit(1); - if (bkt_data->allocs != 1) exit(1); + if (bkt_buckets->alloc_count != 2) exit(1); + if (bkt_data->alloc_count != 1) exit(1); pk_bkt_arr_teardown(&arr); - if (bkt_buckets->allocs != 0) exit(1); - if (bkt_data->allocs != 0) exit(1); + if (bkt_buckets->alloc_count != 0) exit(1); + if (bkt_data->alloc_count != 0) exit(1); } test_teardown(&bkt_buckets, &bkt_data); @@ -152,16 +152,16 @@ int main(int argc, char *argv[]) if (arr.head_l.i != 1) exit(1); if (arr.head_r.b != 0) exit(1); if (arr.head_r.i != 1) exit(1); - if (bkt_buckets->allocs != 2) exit(1); - if (bkt_data->allocs != 1) exit(1); + if (bkt_buckets->alloc_count != 2) exit(1); + if (bkt_data->alloc_count != 1) exit(1); pk_bkt_arr_clear(&arr); if (arr.head_l.b != 0) exit(1); if (arr.head_l.i != 0) exit(1); if (arr.head_r.b != 0) exit(1); if (arr.head_r.i != 0) exit(1); - if (bkt_buckets->allocs != 2) exit(1); - if (bkt_data->allocs != 1) exit(1); + if (bkt_buckets->alloc_count != 2) exit(1); + if (bkt_data->alloc_count != 1) exit(1); h = pk_bkt_arr_new_handle(&arr); if (h.b != 0) exit(1); @@ -170,12 +170,12 @@ int main(int argc, char *argv[]) if (arr.head_l.i != 1) exit(1); if (arr.head_r.b != 0) exit(1); if (arr.head_r.i != 1) exit(1); - if (bkt_buckets->allocs != 2) exit(1); - if (bkt_data->allocs != 1) exit(1); + if (bkt_buckets->alloc_count != 2) exit(1); + if (bkt_data->alloc_count != 1) exit(1); pk_bkt_arr_teardown(&arr); - if (bkt_buckets->allocs != 0) exit(1); - if (bkt_data->allocs != 0) exit(1); + if (bkt_buckets->alloc_count != 0) exit(1); + if (bkt_data->alloc_count != 0) exit(1); } test_teardown(&bkt_buckets, &bkt_data); @@ -194,8 +194,8 @@ int main(int argc, char *argv[]) if (arr.head_l.i != 1) exit(1); if (arr.head_r.b != 0) exit(1); if (arr.head_r.i != 1) exit(1); - if (bkt_buckets->allocs != 2) exit(1); - if (bkt_data->allocs != 1) exit(1); + if (bkt_buckets->alloc_count != 2) exit(1); + if (bkt_data->alloc_count != 1) exit(1); int val = 69; ((int**)arr.bucketed_data)[h.b][h.i] = val; @@ -203,8 +203,8 @@ int main(int argc, char *argv[]) if (pk_bkt_arr_handle_compare(h, found_h) != 0) exit(1); pk_bkt_arr_teardown(&arr); - if (bkt_buckets->allocs != 0) exit(1); - if (bkt_data->allocs != 0) exit(1); + if (bkt_buckets->alloc_count != 0) exit(1); + if (bkt_data->alloc_count != 0) exit(1); } test_teardown(&bkt_buckets, &bkt_data); @@ -223,15 +223,15 @@ int main(int argc, char *argv[]) if (arr.head_l.i != 1) exit(1); if (arr.head_r.b != 0) exit(1); if (arr.head_r.i != 1) exit(1); - if (bkt_buckets->allocs != 2) exit(1); - if (bkt_data->allocs != 1) exit(1); + if (bkt_buckets->alloc_count != 2) exit(1); + if (bkt_data->alloc_count != 1) exit(1); pk_bkt_arr_iterate(&arr, iter, NULL); if (global_counter != 1) exit(1); pk_bkt_arr_teardown(&arr); - if (bkt_buckets->allocs != 0) exit(1); - if (bkt_data->allocs != 0) exit(1); + if (bkt_buckets->alloc_count != 0) exit(1); + if (bkt_data->alloc_count != 0) exit(1); } test_teardown(&bkt_buckets, &bkt_data); @@ -255,8 +255,8 @@ int main(int argc, char *argv[]) if (arr.head_r.b != 0) exit(1); if (arr.head_r.i != 2) exit(1); if (arr.idx_unused[0] != 0xFFFFFFFFFFFFFFFC) exit(1); - if (bkt_buckets->allocs != 2) exit(1); - if (bkt_data->allocs != 1) exit(1); + if (bkt_buckets->alloc_count != 2) exit(1); + if (bkt_data->alloc_count != 1) exit(1); pk_bkt_arr_free_handle(&arr, h1); if (arr.head_l.b != 0) exit(1); @@ -264,8 +264,8 @@ int main(int argc, char *argv[]) if (arr.head_r.b != 0) exit(1); if (arr.head_r.i != 2) exit(1); if (arr.idx_unused[0] != 0xFFFFFFFFFFFFFFFD) exit(1); - if (bkt_buckets->allocs != 2) exit(1); - if (bkt_data->allocs != 1) exit(1); + if (bkt_buckets->alloc_count != 2) exit(1); + if (bkt_data->alloc_count != 1) exit(1); h2 = pk_bkt_arr_new_handle(&arr); if (h2.b != 0) exit(1); @@ -275,12 +275,12 @@ int main(int argc, char *argv[]) if (arr.head_r.b != 0) exit(1); if (arr.head_r.i != 2) exit(1); if (arr.idx_unused[0] != 0xFFFFFFFFFFFFFFFC) exit(1); - if (bkt_buckets->allocs != 2) exit(1); - if (bkt_data->allocs != 1) exit(1); + if (bkt_buckets->alloc_count != 2) exit(1); + if (bkt_data->alloc_count != 1) exit(1); pk_bkt_arr_teardown(&arr); - if (bkt_buckets->allocs != 0) exit(1); - if (bkt_data->allocs != 0) exit(1); + if (bkt_buckets->alloc_count != 0) exit(1); + if (bkt_data->alloc_count != 0) exit(1); } test_teardown(&bkt_buckets, &bkt_data); @@ -312,8 +312,8 @@ int main(int argc, char *argv[]) if (arr.head_r.i != i + 1) exit(1); } if (arr.reserved_buckets != 1) exit(1); - if (bkt_buckets->allocs != 2) exit(1); - if (bkt_data->allocs != 1) exit(1); + if (bkt_buckets->alloc_count != 2) exit(1); + if (bkt_data->alloc_count != 1) exit(1); } h1 = pk_bkt_arr_new_handle(&arr); @@ -326,8 +326,8 @@ int main(int argc, char *argv[]) if (arr.idx_unused[0] != 0xFFFFFFFFFFFFFF00) exit(1); if (arr.idx_unused[1] != 0xFFFFFFFFFFFFFFFE) exit(1); if (arr.reserved_buckets != 2) exit(1); - if (bkt_buckets->allocs != 2) exit(1); - if (bkt_data->allocs != 2) exit(1); + if (bkt_buckets->alloc_count != 2) exit(1); + if (bkt_data->alloc_count != 2) exit(1); h1 = pk_bkt_arr_new_handle(&arr); if (h1.b != 1) exit(1); @@ -339,8 +339,8 @@ int main(int argc, char *argv[]) if (arr.idx_unused[0] != 0xFFFFFFFFFFFFFF00) exit(1); if (arr.idx_unused[1] != 0xFFFFFFFFFFFFFFFC) exit(1); if (arr.reserved_buckets != 2) exit(1); - if (bkt_buckets->allocs != 2) exit(1); - if (bkt_data->allocs != 2) exit(1); + if (bkt_buckets->alloc_count != 2) exit(1); + if (bkt_data->alloc_count != 2) exit(1); h1.b = 0; h1.i = 3; @@ -352,8 +352,8 @@ int main(int argc, char *argv[]) if (arr.idx_unused[0] != 0xFFFFFFFFFFFFFF08) exit(1); if (arr.idx_unused[1] != 0xFFFFFFFFFFFFFFFC) exit(1); if (arr.reserved_buckets != 2) exit(1); - if (bkt_buckets->allocs != 2) exit(1); - if (bkt_data->allocs != 2) exit(1); + if (bkt_buckets->alloc_count != 2) exit(1); + if (bkt_data->alloc_count != 2) exit(1); h2 = pk_bkt_arr_new_handle(&arr); if (h2.b != 0) exit(1); @@ -365,8 +365,8 @@ int main(int argc, char *argv[]) if (arr.idx_unused[0] != 0xFFFFFFFFFFFFFF00) exit(1); if (arr.idx_unused[1] != 0xFFFFFFFFFFFFFFFC) exit(1); if (arr.reserved_buckets != 2) exit(1); - if (bkt_buckets->allocs != 2) exit(1); - if (bkt_data->allocs != 2) exit(1); + if (bkt_buckets->alloc_count != 2) exit(1); + if (bkt_data->alloc_count != 2) exit(1); h1.b = 1; h1.i = 0; @@ -381,8 +381,8 @@ int main(int argc, char *argv[]) if (arr.idx_unused[0] != 0xFFFFFFFFFFFFFF00) exit(1); if (arr.idx_unused[1] != 0xFFFFFFFFFFFFFFFF) exit(1); if (arr.reserved_buckets != 2) exit(1); - if (bkt_buckets->allocs != 2) exit(1); - if (bkt_data->allocs != 2) exit(1); + if (bkt_buckets->alloc_count != 2) exit(1); + if (bkt_data->alloc_count != 2) exit(1); h2 = pk_bkt_arr_new_handle(&arr); if (h2.b != 1) exit(1); @@ -394,12 +394,12 @@ int main(int argc, char *argv[]) if (arr.idx_unused[0] != 0xFFFFFFFFFFFFFF00) exit(1); if (arr.idx_unused[1] != 0xFFFFFFFFFFFFFFFE) exit(1); if (arr.reserved_buckets != 2) exit(1); - if (bkt_buckets->allocs != 2) exit(1); - if (bkt_data->allocs != 2) exit(1); + if (bkt_buckets->alloc_count != 2) exit(1); + if (bkt_data->alloc_count != 2) exit(1); pk_bkt_arr_teardown(&arr); - if (bkt_buckets->allocs != 0) exit(1); - if (bkt_data->allocs != 0) exit(1); + if (bkt_buckets->alloc_count != 0) exit(1); + if (bkt_data->alloc_count != 0) exit(1); } test_teardown(&bkt_buckets, &bkt_data); @@ -444,8 +444,8 @@ int main(int argc, char *argv[]) if (arr.head_l.i != 7) exit(1); if (arr.head_r.b != 1) exit(1); if (arr.head_r.i != 7) exit(1); - if (bkt_buckets->allocs != 2) exit(1); - if (bkt_data->allocs != 2) exit(1); + if (bkt_buckets->alloc_count != 2) exit(1); + if (bkt_data->alloc_count != 2) exit(1); expected_exit = true; caught = false; @@ -459,12 +459,12 @@ int main(int argc, char *argv[]) if (arr.head_l.i != 0) exit(1); if (arr.head_r.b != 0) exit(1); if (arr.head_r.i != 1) exit(1); - if (bkt_buckets->allocs != 2) exit(1); - if (bkt_data->allocs != 1) exit(1); + if (bkt_buckets->alloc_count != 2) exit(1); + if (bkt_data->alloc_count != 1) exit(1); pk_bkt_arr_teardown(&arr); - if (bkt_buckets->allocs != 0) exit(1); - if (bkt_data->allocs != 0) exit(1); + if (bkt_buckets->alloc_count != 0) exit(1); + if (bkt_data->alloc_count != 0) exit(1); */ } while (false); |
