From 444f47447bf8031c9c05b213a6d03c9c285b5ffd Mon Sep 17 00:00:00 2001 From: Tor Egge Date: Mon, 19 Jun 2017 13:48:23 +0000 Subject: Make stealSomethingFrom{Left,Right}Node steal one more slot if sum of valid slots is odd. This will allow the methods to be used for rebalancing during insertion too. --- searchlib/src/tests/btree/btreeaggregation_test.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'searchlib/src/tests/btree') diff --git a/searchlib/src/tests/btree/btreeaggregation_test.cpp b/searchlib/src/tests/btree/btreeaggregation_test.cpp index e07de5cd9d5..50ef7f21c4c 100644 --- a/searchlib/src/tests/btree/btreeaggregation_test.cpp +++ b/searchlib/src/tests/btree/btreeaggregation_test.cpp @@ -588,11 +588,11 @@ Test::requireThatNodeStealWorks() "[60:160,70:170,80:180[min=160,max=180]]" "[min=110,max=180]]", t)); t.remove(60); - EXPECT_TRUE(assertTree("[40:" - "[10:110,20:120,30:130,40:140" - "[min=110,max=140]]" + EXPECT_TRUE(assertTree("[30:" + "[10:110,20:120,30:130" + "[min=110,max=130]]" ",80:" - "[50:150,70:170,80:180[min=150,max=180]]" + "[40:140,50:150,70:170,80:180[min=140,max=180]]" "[min=110,max=180]]", t)); } { // steal some from right @@ -615,12 +615,12 @@ Test::requireThatNodeStealWorks() "[min=150,max=190]]" "[min=110,max=190]]", t)); t.remove(20); - EXPECT_TRUE(assertTree("[50:" - "[10:110,30:130,50:150" - "[min=110,max=150]]" + EXPECT_TRUE(assertTree("[60:" + "[10:110,30:130,50:150,60:160" + "[min=110,max=160]]" ",90:" - "[60:160,70:170,80:180,90:190" - "[min=160,max=190]]" + "[70:170,80:180,90:190" + "[min=170,max=190]]" "[min=110,max=190]]", t)); } } -- cgit v1.2.3