Commit e383d121 authored by Yoni Fogel's avatar Yoni Fogel

Addresses #724

Put in comments for what form of tests we need for split and merge.

git-svn-id: file:///svn/tokudb@3602 c7de825b-a66e-492c-adef-691d508d4ae1
parent d17ca6b7
......@@ -715,6 +715,14 @@ UNTESTED COMPLETELY:
int toku_omt_split_at(OMT omt, OMT *newomt, u_int32_t index);
// Effect: Create a new OMT, storing it in *newomt.
// The values to the right of index (starting at index) are moved to *newomt.
Tests
* Split at 0
* Split at 1
* Split at ~half
* Split at toku_omt_size(omt)-1 (right ends up with 1 element)
* Split at toku_omt_size(omt) (right ends up empty)
* Split at toku_omt_size(omt)+1 (ERANGE)
* Split at toku_omt_size(omt)+2 (ERANGE)
int toku_omt_merge(OMT leftomt, OMT rightomt, OMT *newomt);
// Effect: Appends leftomt and rightomt to produce a new omt.
......@@ -725,5 +733,12 @@ int toku_omt_merge(OMT leftomt, OMT rightomt, OMT *newomt);
// On error, nothing is modified.
// Performance: time=O(n) is acceptable, but one can imagine implementations that are O(\log n) worst-case.
Tests
* Left tree is empty.
* Right tree is empty.
* |left tree| = 1
* |right tree| = 1
* |left tree| = half |right tree| = half
*/
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