Commit 7a2e9511 authored by Yoni Fogel's avatar Yoni Fogel

Refs Tokutek/ft-index#46 improve test coverage, minor formatting

parent 51d75f31
......@@ -594,8 +594,6 @@ rebalance_ftnode_leaf(FTNODE node, unsigned int basementnodesize)
curr_pivot++;
num_le_in_curr_bn = 0;
bn_size_so_far = 0;
bn_le_sizes[curr_pivot] = 0;
bn_key_sizes[curr_pivot] = 0;
}
num_le_in_curr_bn++;
num_les_this_bn[curr_pivot] = num_le_in_curr_bn;
......
......@@ -349,6 +349,10 @@ int
test_main(int argc, const char *argv[]) {
parse_args(argc, argv);
// Do test with size divisible by 4 and not
test_builder_fixed(4, 0);
test_builder_fixed(5, 0);
test_builder_fixed(4, 1);
test_builder_fixed(5, 1);
test_builder_fixed(4, 100);
test_builder_fixed(5, 100);
// Do test with zero, one, or both sizes divisible
......@@ -357,20 +361,13 @@ test_main(int argc, const char *argv[]) {
test_builder_variable(5, 8, 100);
test_builder_variable(5, 10, 100);
test_create_from_sorted_memory_of_fixed_sized_elements__and__serialize(4, 0);
test_create_from_sorted_memory_of_fixed_sized_elements__and__serialize(5, 0);
test_create_from_sorted_memory_of_fixed_sized_elements__and__serialize(4, 1);
test_create_from_sorted_memory_of_fixed_sized_elements__and__serialize(5, 1);
test_create_from_sorted_memory_of_fixed_sized_elements__and__serialize(4, 100);
test_create_from_sorted_memory_of_fixed_sized_elements__and__serialize(5, 100);
/*TODO
* insert
* insert_at
* delete_at
* iterate
* iterate_on_range
* verify
* iterate_ptr
* find_zero
* find
*/
return 0;
}
......@@ -184,6 +184,7 @@ size_t toku_mempool_get_size(const struct mempool *mp) {
}
// TODO(yoni): unify the toku_mempool_get*_size and toku_mempool_get*_space functions (use either size or space but not both)
// use _size for all
size_t toku_mempool_get_frag_size(const struct mempool *mp) {
return mp->frag_size;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment