From: Jelte Jansen Date: Tue, 17 Jul 2012 08:27:52 +0000 (+0200) Subject: [2089] make tree dump in rbtree test multiline X-Git-Tag: trac2351_base~157^2~27^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ebbb43bdefff8a35cc4563b65d668b9e3148cba9;p=thirdparty%2Fkea.git [2089] make tree dump in rbtree test multiline --- diff --git a/src/lib/datasrc/tests/rbtree_unittest.cc b/src/lib/datasrc/tests/rbtree_unittest.cc index a11bff517d..507c969d1c 100644 --- a/src/lib/datasrc/tests/rbtree_unittest.cc +++ b/src/lib/datasrc/tests/rbtree_unittest.cc @@ -680,7 +680,49 @@ TEST_F(RBTreeTest, dumpTree) { std::ostringstream str; std::ostringstream str2; rbtree.dumpTree(str); - str2 << "tree has 14 node(s)\nb. (black)\n a. (black)\n NULL\n NULL\n d.e.f. (black)[invisible] \n begin down from d.e.f.\n w.y. (black)[invisible] \n begin down from w.y.\n p. (black)\n o. (red)\n NULL\n NULL\n q. (red)\n NULL\n NULL\n end down from w.y.\n x. (red)\n NULL\n NULL\n z. (red)\n begin down from z.\n j. (black)\n NULL\n NULL\n end down from z.\n NULL\n NULL\n end down from d.e.f.\n c. (red)\n NULL\n NULL\n g.h. (red)\n begin down from g.h.\n i. (black)\n NULL\n k. (red)\n NULL\n NULL\n end down from g.h.\n NULL\n NULL\n"; + str2 << "tree has 14 node(s)\n" << + "b. (black)\n" << + " a. (black)\n" << + " NULL\n" << + " NULL\n" << + " d.e.f. (black)[invisible] \n" << + " begin down from d.e.f.\n" << + " w.y. (black)[invisible] \n" << + " begin down from w.y.\n" << + " p. (black)\n" << + " o. (red)\n" << + " NULL\n" << + " NULL\n" << + " q. (red)\n" << + " NULL\n" << + " NULL\n" << + " end down from w.y.\n" << + " x. (red)\n" << + " NULL\n" << + " NULL\n" << + " z. (red)\n" << + " begin down from z.\n" << + " j. (black)\n" << + " NULL\n" << + " NULL\n" << + " end down from z.\n" << + " NULL\n" << + " NULL\n" << + " end down from d.e.f.\n" << + " c. (red)\n" << + " NULL\n" << + " NULL\n" << + " g.h. (red)\n" << + " begin down from g.h.\n" << + " i. (black)\n" << + " NULL\n" << + " k. (red)\n" << + " NULL\n" << + " NULL\n" << + " end down from g.h.\n" << + " NULL\n" << + " NULL\n"; + rbtree.dumpTree(std::cout); EXPECT_EQ(str.str(), str2.str()); }