Commit 8cfd103a authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent d01422ab
......@@ -498,9 +498,22 @@ def test_zwalkBFS():
assert _[0].range == R(4,6)
assert _[1].range == R(6,10)
assert _[2].range == R(10,inf)
assertT(_[0].node, [], b5)
assertB(_[1].node, 7)
assertB(_[2].node, 11)
t4_b5= _[0].node; assertT(t4_b5, [], b5)
b7 = _[1].node; assertB(b7, 7)
b11 = _[2].node; assertB(b11, 11)
_ = zwalkv[3] # [-∞,2)B1, [2,4)B3, [4,6)T, [6,10)T, [10,∞]T
assert len(_) == 5
assert _[0].range == R(-inf,2)
assert _[1].range == R(2,4)
assert _[2].range == R(4,6)
assert _[3].range == R(6,10)
assert _[4].range == R(10,inf)
b1 = _[0].node; assertB(b1, 1)
b3 = _[1].node; assertB(b3, 3)
t3_t4_b5 = _[2].node; assertT(t3_t4_b5, [], t4_b5)
t3_b7 = _[3].node; assertT(t3_b7, [], b7)
t3_b11 = _[4].node; assertT(t3_b11, [], b11)
_ = zwalkv[0] # [-∞,∞)T4,
......@@ -524,18 +537,6 @@ def test_zwalkBFS():
assert T(_[1].node) == (BTREE_ONE, B3)
assert T(_[2].node) == (BTREE_NORMAL, [6,10])
_ = zwalkv[3] # [-∞,2)B1, [2,4)B3, [4,6)T, [6,10)T, [10,∞]T
assert len(_) == 5
assert _[0].range == R(-inf,2)
assert _[1].range == R(2,4)
assert _[2].range == R(4,6)
assert _[3].range == R(6,10)
assert _[4].range == R(10,inf)
assert B(_[0].node) == [1]
assert B(_[1].node) == [3]
assert T(_[2].node) == (BTREE_NORMAL, [])
assert T(_[3].node) == (BTREE_ONE, B7)
assert T(_[4].node) == (BTREE_ONE, B11)
......
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