diff options
Diffstat (limited to 'test/pkbktarr.cpp')
| -rw-r--r-- | test/pkbktarr.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/test/pkbktarr.cpp b/test/pkbktarr.cpp index e315c8e..45d2ba2 100644 --- a/test/pkbktarr.cpp +++ b/test/pkbktarr.cpp @@ -7,8 +7,8 @@ void test_spinup(struct pk_membucket **bkt_buckets, struct pk_membucket **bkt_data) { - *bkt_buckets = pk_bucket_create("buckets", 1 << 16, false); - *bkt_data = pk_bucket_create("data", 1 << 16, false); + *bkt_buckets = pk_bucket_create("buckets", 1 << 16, PK_MEMBUCKET_FLAG_NONE); + *bkt_data = pk_bucket_create("data", 1 << 16, PK_MEMBUCKET_FLAG_NONE); } void test_teardown(struct pk_membucket **bkt_buckets, struct pk_membucket **bkt_data) @@ -44,8 +44,8 @@ int main(int argc, char *argv[]) if (arr.head_r.b != 0) exit(1); if (arr.head_r.i != 1) exit(1); if (arr.idx_unused[0] != 0xFFFFFFFFFFFFFFFE) 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); if (arr[h] != 128) exit(1); pk_bkt_arr_free_handle(&arr, h); @@ -54,12 +54,12 @@ int main(int argc, char *argv[]) if (arr.head_r.b != 0) exit(1); if (arr.head_r.i != 1) exit(1); if (arr.idx_unused[0] != 0xFFFFFFFFFFFFFFFF) 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); arr.~pk_bkt_arr_t<int>(); - 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); @@ -80,8 +80,8 @@ int main(int argc, char *argv[]) if (arr.head_r.b != 0) exit(1); if (arr.head_r.i != 1) exit(1); if (arr.idx_unused[0] != 0xFFFFFFFFFFFFFFFE) 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); if (arr[h] != val) exit(1); using CompCbWrapper = pk_tmpln_2<bool, const int*, const int*, const void*, const void*>; @@ -94,8 +94,8 @@ int main(int argc, char *argv[]) if (pk_bkt_arr_handle_compare(found_h, h) != 0) exit(1); arr.~pk_bkt_arr_t<int>(); - 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); @@ -116,8 +116,8 @@ int main(int argc, char *argv[]) if (arr.head_r.b != 0) exit(1); if (arr.head_r.i != 1) exit(1); if (arr.idx_unused[0] != 0xFFFFFFFFFFFFFFFE) 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); if (arr[h] != val) exit(1); int some_counter = 0; @@ -133,8 +133,8 @@ int main(int argc, char *argv[]) if (some_counter != 1) exit(1); arr.~pk_bkt_arr_t<int>(); - 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); } |
