Commit 67af0736 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent ab979249
......@@ -586,7 +586,7 @@ def test_restructure():
assert crack_bucket(b1) == ([1], [X[1]])
assert crack_bucket(b35) == ([3,5], [X[3], X[5]])
# -> T2/T-T/B1-B3,5
# -> T2/T-T/B1-B3,5 (add intermediate T-T level)
R(z, 'T2/T-T/B1-B3,5')
kind, keys, kids = crack_btree(z)
assert (kind, keys) == (BTREE_NORMAL, [2])
......@@ -603,6 +603,28 @@ def test_restructure():
assert crack_bucket(b1) == ([1], [X[1]])
assert crack_bucket(b35) == ([3,5], [X[3], X[5]])
# -> T2/T-T/B1-T/B3,5 (add intermediate T level in right arm)
R(z, 'T2/T-T/B1-T/B3,5')
kind, keys, kids = crack_btree(z)
assert (kind, keys) == (BTREE_NORMAL, [2])
assert len(kids) == 2
assert kids[0] is tl
assert kids[1] is tr
kind, keys, kids = crack_btree(tl) # XXX -> assertT ?
assert (kind, keys) == (BTREE_NORMAL, []) #
assert len(kids) == 1 #
assert kids[0] is b1 #
kind, keys, kids = crack_btree(tr)
assert (kind, keys) == (BTREE_NORMAL, [])
assert len(kids) == 1
trr = kids[0]
assert isinstance(trr, XLOTree)
kind, keys, kids = crack_btree(trr)
assert (kind, keys) == (BTREE_NORMAL, [])
assert len(kids) == 1
assert kids[0] is b35
# XXX T2/B1-B3-B5
......
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