Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r49931 - in sandbox/SOC/2006/tree/trunk: . boost/tree boost/tree/detail/algorithm boost/tree/detail/cursor libs/tree/test
From: ockham_at_[hidden]
Date: 2008-11-25 14:40:49


Author: bernhard.reiter
Date: 2008-11-25 14:40:48 EST (Tue, 25 Nov 2008)
New Revision: 49931
URL: http://svn.boost.org/trac/boost/changeset/49931

Log:
Some iterator and forest fixes.
Text files modified:
   sandbox/SOC/2006/tree/trunk/TODO | 12 +-
   sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/preorder.hpp | 2
   sandbox/SOC/2006/tree/trunk/boost/tree/detail/cursor/forest.hpp | 4 -
   sandbox/SOC/2006/tree/trunk/boost/tree/detail/cursor/nary.hpp | 4
   sandbox/SOC/2006/tree/trunk/boost/tree/forest_tree.hpp | 22 +++++
   sandbox/SOC/2006/tree/trunk/libs/tree/test/algorithm_concepts_test.cpp | 1
   sandbox/SOC/2006/tree/trunk/libs/tree/test/binary_tree_test.cpp | 2
   sandbox/SOC/2006/tree/trunk/libs/tree/test/cursor_algorithm_test.cpp | 16 ++++
   sandbox/SOC/2006/tree/trunk/libs/tree/test/forest_tree_test.cpp | 72 ++++++++----------
   sandbox/SOC/2006/tree/trunk/libs/tree/test/iterator_algorithm_test.cpp | 150 ++++++++++++++-------------------------
   sandbox/SOC/2006/tree/trunk/libs/tree/test/test_tree_traversal_data.hpp | 20 ++++
   11 files changed, 153 insertions(+), 152 deletions(-)

Modified: sandbox/SOC/2006/tree/trunk/TODO
==============================================================================
--- sandbox/SOC/2006/tree/trunk/TODO (original)
+++ sandbox/SOC/2006/tree/trunk/TODO 2008-11-25 14:40:48 EST (Tue, 25 Nov 2008)
@@ -14,14 +14,12 @@
 [section TODO]
 
 General:
-* Fix iterator tests.
-* Add forest cursor algorithms for postorder.
+* Fix forest copy
+* Fix cursor archetypes: *order copy checks don't compile
+* Implement forest_tree::insert_above.
+* Revisit namespaces.
 * Move some of the secondary stuff to a util/ dir? Is that what they're used for?
 * Redo testing. Right now, it's just chaotic.
-* Fix algorithms for use with forest:
- * Recursive preorder: OK.
- * Recursive postorder: TBD.
- * Iterative pre- and postorder: TBD.
 * Implement a real output cursor (if possible) and use copy(preorder(), ...) to build a new tree.
   Then, do some performance measurements comparing
   * Different *orders;
@@ -29,7 +27,6 @@
   * cursor and iterator based algorithms (from Boost.Tree and the STL, respectively)
   Do these measurements also with algorithms other than copy.
 * Test cursor adaptors wrapped around output cursors!
-* Add tests for copy involving a second tree cursor (not just a cursor adaptor).
 * Think of a couple good examples (draw inspiration eg from Wikipedia: Tree traversal
   or CRLS) and include them in the docs. Maybe move some files from libs/test to
   example.
@@ -118,6 +115,7 @@
 
 Proposal:
 
+* Can we just build the proposal from doxygen and quickbook parts?
 * Change parity/parent complexity requirements at least for binary_tree::cursor? - See newsgroup thread.
 * Change complexity requirements for * order end() to constant? We're using root(), and
   for postorder begin() - which is also root() - it's already constant. Then again, how much

Modified: sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/preorder.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/preorder.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/preorder.hpp 2008-11-25 14:40:48 EST (Tue, 25 Nov 2008)
@@ -9,8 +9,6 @@
  * Subtree preorder traversal algorithms
  */
 
-// TODO: concept checks.
-
 #ifndef BOOST_TREE_DETAIL_ALGORITHM_PREORDER_HPP
 #define BOOST_TREE_DETAIL_ALGORITHM_PREORDER_HPP
 

Modified: sandbox/SOC/2006/tree/trunk/boost/tree/detail/cursor/forest.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/cursor/forest.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/detail/cursor/forest.hpp 2008-11-25 14:40:48 EST (Tue, 25 Nov 2008)
@@ -9,10 +9,6 @@
  * Forest cursor template
  */
 
-// TODO: Use TR1 type_traits (integral_constant)
-// can we abstract the cursor stuff any further,
-// eventually producing cursor_adaptor?
-
 #ifndef BOOST_TREE_DETAIL_CURSOR_FOREST_HPP
 #define BOOST_TREE_DETAIL_CURSOR_FOREST_HPP
 

Modified: sandbox/SOC/2006/tree/trunk/boost/tree/detail/cursor/nary.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/cursor/nary.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/detail/cursor/nary.hpp 2008-11-25 14:40:48 EST (Tue, 25 Nov 2008)
@@ -207,8 +207,8 @@
         p_node->m_parent = m_node;
         
         // Only forest-relevant:
- p_node->operator[](1) = m_node->operator[](m_pos);
- m_node->operator[](m_pos)->m_parent = p_node;
+// p_node->operator[](1) = m_node->operator[](m_pos);
+// m_node->operator[](m_pos)->m_parent = p_node;
         
         m_node->operator[](m_pos) = p_node;
     }

Modified: sandbox/SOC/2006/tree/trunk/boost/tree/forest_tree.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/forest_tree.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/forest_tree.hpp 2008-11-25 14:40:48 EST (Tue, 25 Nov 2008)
@@ -145,6 +145,9 @@
     return cur.index();
 }
 
+/// Use natural forest_tree-binary_tree correspondence:
+/// Preoder - preorder
+
 template <class Cursor, class Op>
 Op for_each(preorder, forest_cursor<Cursor> s, Op f)
 {
@@ -163,6 +166,25 @@
     return copy(preorder(), InCursor(s), InCursor(t));
 }
 
+/// Postoder - inorder
+
+template <class Cursor, class Op>
+Op for_each(postorder, forest_cursor<Cursor> s, Op f)
+{
+ return for_each(inorder(), Cursor(s), f);
+}
+
+template <class InCursor, class OutCursor, class Op>
+OutCursor transform (postorder, forest_cursor<InCursor> s, forest_cursor<OutCursor> t, Op op)
+{
+ return transform(inorder(), InCursor(s), InCursor(t), op);
+}
+
+template <class InCursor, class OutCursor>
+OutCursor copy (postorder, forest_cursor<InCursor> s, forest_cursor<OutCursor> t)
+{
+ return copy(inorder(), InCursor(s), InCursor(t));
+}
 
 } // namespace tree
 } // namespace boost

Modified: sandbox/SOC/2006/tree/trunk/libs/tree/test/algorithm_concepts_test.cpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/libs/tree/test/algorithm_concepts_test.cpp (original)
+++ sandbox/SOC/2006/tree/trunk/libs/tree/test/algorithm_concepts_test.cpp 2008-11-25 14:40:48 EST (Tue, 25 Nov 2008)
@@ -38,7 +38,6 @@
 
 //BOOST_AUTO_TEST_CASE_TEMPLATE( test_copy, Order, orders )
 //{
-//// boost::detail::dummy_constructor dummy_cons;
 // cursor_archetype< boost::null_archetype<>
 // , boost::iterator_archetypes::readable_lvalue_iterator_t // Really lvalue?
 // , boost::forward_traversal_tag

Modified: sandbox/SOC/2006/tree/trunk/libs/tree/test/binary_tree_test.cpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/libs/tree/test/binary_tree_test.cpp (original)
+++ sandbox/SOC/2006/tree/trunk/libs/tree/test/binary_tree_test.cpp 2008-11-25 14:40:48 EST (Tue, 25 Nov 2008)
@@ -223,6 +223,8 @@
 
 BOOST_AUTO_TEST_CASE( comparison_operator_test )
 {
+ *bt2.root().begin().end().begin().begin()
+ = *bt.root().begin().end().begin().begin();
     BOOST_CHECK(bt == bt2);
 }
 

Modified: sandbox/SOC/2006/tree/trunk/libs/tree/test/cursor_algorithm_test.cpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/libs/tree/test/cursor_algorithm_test.cpp (original)
+++ sandbox/SOC/2006/tree/trunk/libs/tree/test/cursor_algorithm_test.cpp 2008-11-25 14:40:48 EST (Tue, 25 Nov 2008)
@@ -43,6 +43,14 @@
     test_traversal(Order(), l.begin(), l.end());
 }
 
+BOOST_AUTO_TEST_CASE_TEMPLATE( test_copy_trees, Order, orders)
+{
+ BOOST_CHECK(bt != bt2);
+ boost::tree::copy(Order(), bt.root(), bt2.root());
+ BOOST_CHECK(bt == bt2);
+ validate_test_dataset1_tree(bt2);
+}
+
 BOOST_AUTO_TEST_CASE_TEMPLATE ( test_desc_copy_using_insert_cursor, Order, orders )
 {
     bt2.clear();
@@ -75,4 +83,12 @@
     test_traversal(Order(), l.begin(), l.end());
 }
 
+BOOST_AUTO_TEST_CASE_TEMPLATE( test_transform_trees, Order, orders)
+{
+ BOOST_CHECK(bt != bt2);
+ boost::tree::transform(Order(), bt.root(), bt2.root()
+ , std::bind2nd(std::minus<int>(),1));
+ validate_test_dataset1_minus_1_tree(bt2);
+}
+
 BOOST_AUTO_TEST_SUITE_END()
\ No newline at end of file

Modified: sandbox/SOC/2006/tree/trunk/libs/tree/test/forest_tree_test.cpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/libs/tree/test/forest_tree_test.cpp (original)
+++ sandbox/SOC/2006/tree/trunk/libs/tree/test/forest_tree_test.cpp 2008-11-25 14:40:48 EST (Tue, 25 Nov 2008)
@@ -113,49 +113,44 @@
     BOOST_CHECK(c.empty());
     
     //validate_corresponding_forest_tree(ft0);
- //BOOST_CHECK_EQUAL(1, 2);
 }
 
 BOOST_AUTO_TEST_SUITE_END()
 
 BOOST_FIXTURE_TEST_SUITE(forest_algorithms_test, test_binary_tree_with_list_fixture<int>)
-//
-//// Test *order correspondence:
-//// forest binary
-//// pre pre
-//// post in
-//// FIXME: should also check post-/inorder correspondence
-//
+
+// Test *order correspondence:
+// forest binary
+// pre pre
+// post in
 typedef boost::mpl::list< boost::mpl::pair<preorder, preorder>
- /*, boost::mpl::pair<postorder, inorder>*/ > corresponding_orders;
-//
+ , boost::mpl::pair<postorder, inorder> > corresponding_orders;
+
 BOOST_AUTO_TEST_CASE_TEMPLATE( test_natural_correspondence_for_each, Order
                              , corresponding_orders )
 {
-// using namespace boost::tree;
-//
-// forest_tree<int> ft(bt);
-//
-// validate_corresponding_forest_tree(ft);
-//
-// std::list<int> test_list;
-// typedef std::back_insert_iterator< std::list<int> > back_insert_iter_list_int;
-// typedef output_cursor_iterator_wrapper<back_insert_iter_list_int> oc_bi_lst_type;
-// back_insert_iter_list_int it_test_list = std::back_inserter(test_list);
-// oc_bi_lst_type oc_test_list = oc_bi_lst_type(it_test_list);
-//
-// boost::tree::for_each(
-// typename Order::first()
-// , ft.root()
-// , boost::lambda::bind(&std::list<int>::push_back, &test_list, boost::lambda::_1)
-// /*, boost::forward_traversal_tag()*/ // FIXME: Also fix and test iterative versions!
-// );
-// test_traversal(typename Order::second(), test_list.begin(), test_list.end());
-// BOOST_CHECK_EQUAL(test_list.size(), 11);
-// BOOST_CHECK_EQUAL(1, 2);
-//
+ using namespace boost::tree;
+
+ forest_tree<int> ft(bt);
+
+ //validate_corresponding_forest_tree(ft);
+
+ std::list<int> test_list;
+ typedef std::back_insert_iterator< std::list<int> > back_insert_iter_list_int;
+ typedef output_cursor_iterator_wrapper<back_insert_iter_list_int> oc_bi_lst_type;
+ back_insert_iter_list_int it_test_list = std::back_inserter(test_list);
+ oc_bi_lst_type oc_test_list = oc_bi_lst_type(it_test_list);
+
+ boost::tree::for_each(
+ typename Order::first()
+ , ft.root()
+ , boost::lambda::bind(&std::list<int>::push_back, &test_list, boost::lambda::_1)
+ );
+ test_traversal(typename Order::second(), test_list.begin(), test_list.end());
+ BOOST_CHECK_EQUAL(test_list.size(), 11);
+
 }
-//
+
 //BOOST_AUTO_TEST_CASE_TEMPLATE( test_natural_correspondence_copy, Order
 // , corresponding_orders )
 //{
@@ -163,7 +158,7 @@
 //
 // forest_tree<int> ft(bt);
 //
-// validate_corresponding_forest_tree(ft);
+// //validate_corresponding_forest_tree(ft);
 //
 // std::list<int> test_list;
 // typedef std::back_insert_iterator< std::list<int> > back_insert_iter_list_int;
@@ -171,18 +166,15 @@
 // back_insert_iter_list_int it_test_list = std::back_inserter(test_list);
 // oc_bi_lst_type oc_test_list = oc_bi_lst_type(it_test_list);
 //
-// boost::tree::copy(typename Order::first(), ft.root(), oc_test_list
-// /*, boost::forward_traversal_tag()*/); // FIXME: Also fix and test iterative versions!
+// boost::tree::copy(typename Order::first(), ft.root(), oc_test_list);
 // test_traversal(typename Order::second(), test_list.begin(), test_list.end());
 // BOOST_CHECK_EQUAL(test_list.size(), 11);
 // test_list.clear();
 //
 // boost::tree::transform(typename Order::first(), ft.root(), oc_test_list
-// , std::bind2nd(std::plus<int>(),0)
-// /*, boost::forward_traversal_tag()*/); // FIXME: Also fix and test iterative versions!
+// , std::bind2nd(std::plus<int>(),0));
 // test_traversal(typename Order::second(), test_list.begin(), test_list.end());
 // BOOST_CHECK_EQUAL(test_list.size(), 11);
-//
 //}
-//
+
 BOOST_AUTO_TEST_SUITE_END()
\ No newline at end of file

Modified: sandbox/SOC/2006/tree/trunk/libs/tree/test/iterator_algorithm_test.cpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/libs/tree/test/iterator_algorithm_test.cpp (original)
+++ sandbox/SOC/2006/tree/trunk/libs/tree/test/iterator_algorithm_test.cpp 2008-11-25 14:40:48 EST (Tue, 25 Nov 2008)
@@ -25,74 +25,41 @@
 
 BOOST_FIXTURE_TEST_SUITE( iterator_algorithms_test, test_binary_tree_with_list_fixture<int> )
 
-template <class Order, class Cursor>
-void compare_cursor_to_iterator_traversal(Order, Cursor cur) {
- std::list<int> test_list;
- typedef std::back_insert_iterator< std::list<int> > back_insert_iter_list_int;
- typedef output_cursor_iterator_wrapper<back_insert_iter_list_int> oc_bi_lst_type;
- back_insert_iter_list_int it_test_list = std::back_inserter(test_list);
- oc_bi_lst_type oc_test_list = oc_bi_lst_type(it_test_list);
-
- boost::tree::copy(Order(), cur, oc_test_list);
-
- // Are the elements accessed in the correct order?
- BOOST_CHECK(std::equal( boost::tree::begin(Order(), cur)
- , boost::tree::end(Order(), cur)
- , test_list.begin()
- ));
-
- // Does end() mark the right element?
- BOOST_CHECK(std::distance(boost::tree::begin(Order(), cur)
- , boost::tree::end(Order(), cur)) ==
- std::distance(test_list.begin(), test_list.end()));
-
- // Reverse order.
- BOOST_CHECK(std::equal(boost::tree::rbegin(Order(), cur)
- , boost::tree::rend(Order(), cur)
- , test_list.rbegin()
- ));
-
- BOOST_CHECK(std::distance(boost::tree::rbegin(Order(), cur)
- , boost::tree::rend(Order(), cur)) ==
- std::distance(test_list.rbegin(), test_list.rend()));
-
-}
-
-template <class Cursor, class Op>
-void underefed_for_each_recursive(Cursor s, Op& f)
-{
- Cursor t = s.end();
- f(s); // Caution: f(s) comes before s.to_begin(), as opposed to
- s.to_begin(); // "normal" preorder for_each
- do
- if (!s.empty())
- underefed_for_each_recursive(s, f);
- while (s++ != t);
-}
-
-template <class Cursor, class Op>
-Op underefed_for_each(Cursor s, Op f)
-{
- Cursor t = s.end();
- f(s); // Caution: f(s) comes before s.to_begin(), as opposed to
- s.to_begin(); // "normal" preorder for_each
- do
- if (!s.empty())
- underefed_for_each_recursive(s, f);
- while (s++ != t);
-
- return f;
-}
-
-template <class Order>
-void comparisons_using_ac(binary_tree<int>::cursor c) {
- compare_cursor_to_iterator_traversal(Order(), make_ascending_cursor(c));
-}
-
-template <class Order>
-void comparisons_using_rtc(binary_tree<int>::cursor c) {
- compare_cursor_to_iterator_traversal(Order(), c);
-}
+//template <class Cursor, class Op>
+//void underefed_for_each_recursive(Cursor s, Op& f)
+//{
+// Cursor t = s.end();
+// f(s); // Caution: f(s) comes before s.to_begin(), as opposed to
+// s.to_begin(); // "normal" preorder for_each
+// do
+// if (!s.empty())
+// underefed_for_each_recursive(s, f);
+// while (s++ != t);
+//}
+//
+//template <class Cursor, class Op>
+//Op underefed_for_each(Cursor s, Op f)
+//{
+// Cursor t = s.end();
+// f(s); // Caution: f(s) comes before s.to_begin(), as opposed to
+// s.to_begin(); // "normal" preorder for_each
+// do
+// if (!s.empty())
+// underefed_for_each_recursive(s, f);
+// while (s++ != t);
+//
+// return f;
+//}
+//
+//template <class Order>
+//void comparisons_using_ac(binary_tree<int>::cursor c) {
+// compare_cursor_to_iterator_traversal(Order(), make_ascending_cursor(c));
+//}
+//
+//template <class Order>
+//void comparisons_using_rtc(binary_tree<int>::cursor c) {
+// compare_cursor_to_iterator_traversal(Order(), c);
+//}
 
 /**
  * Check all iterator traversals by comparing them to a recursive cursor
@@ -102,7 +69,10 @@
  *
  * Afterwards, do all that using iterators wrapped around
  * "explicit stack"-based cursors also.
- */
+ *
+ * FIXME: This depends too much on the correct behavior of cursor algorithms.
+ * Do check algorithms, but with ready-made, differently shaped trees.
+ */
 //void compare_cursor_to_iterator_traversal() {
 //BOOST_AUTO_TEST_CASE_TEMPLATE( compare_cursor_to_iterator_traversal_test, Order, orders )
 //{
@@ -157,27 +127,16 @@
 // underefed_for_each(test_tree2.root(), comparisons_using_rtc<Order>);
 //}
 
-BOOST_AUTO_TEST_CASE_TEMPLATE( test_algorithms, Order, orders )
+BOOST_AUTO_TEST_CASE_TEMPLATE( test_iterator_algorithms, Order, orders )
 {
- typedef boost::tree::binary_tree<int>::cursor cursor;
-
-// std::list<int> test_list;
-//
-// // TODO: Put this into a better testing context.
-// boost::tree::for_each(preorder(),
-// test_tree.root(),
-// boost::lambda::bind(&std::list<int>::push_back, &test_list, boost::lambda::_1)
-// );
-// BOOST_CHECK(test_list.empty());
-
- test_traversal(Order(), begin(Order(), bt.root()),
- end(Order(), bt.root()));
+ test_traversal(Order(), begin(Order(), bt.root())
+ , end(Order(), bt.root()));
 
     test_reverse_traversal(Order(), end(Order(), bt.root())
                                   , begin(Order(), bt.root()));
                                     
- BOOST_CHECK(std::distance(begin(Order(), bt.root())
- , end(Order(), bt.root())) == 11);
+ BOOST_CHECK_EQUAL(std::distance(begin(Order(), bt.root())
+ , end(Order(), bt.root())), 11);
 
     // TODO: Also check with binary_tree-specialized inorder begin()!
 
@@ -187,16 +146,19 @@
                           , end(Order(), make_ascending_cursor(bt.root())));
     test_reverse_traversal(Order(), end(Order(), make_ascending_cursor(bt.root()))
                                   , begin(Order(), make_ascending_cursor(bt.root())));
-// TODO: Move to other unit
- //Ascending iterator.
-// binary_tree<int>::cursor c = test_tree.root();
-// boost::tree::iterator<ascending, binary_tree<int>::cursor> ai_root(c);
-// c = c.begin().end().begin().begin();
+ BOOST_CHECK_EQUAL(std::distance(
+ begin(Order(), make_ascending_cursor(bt.root()))
+ , end(Order(), make_ascending_cursor(bt.root()))), 11);
+}
+
+//BOOST_AUTO_TEST_CASE( test_ascending_iterator_algorithms )
+//{
+// binary_tree<int>::cursor c = bt.root();
+// typedef boost::tree::iterator<ascending, binary_tree<int>::cursor> ai;
+// c.to_begin().to_end().to_begin().to_begin();
 // BOOST_CHECK_EQUAL(*c, 4);
 //
-// boost::tree::iterator<ascending, binary_tree<int>::cursor> ais(c);
-// test_traversal_from_leaf4(ais, ai_root);
-
-}
+// test_traversal_from_leaf4(ai(c), ai(bt.root()));
+//}
 
 BOOST_AUTO_TEST_SUITE_END()
\ No newline at end of file

Modified: sandbox/SOC/2006/tree/trunk/libs/tree/test/test_tree_traversal_data.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/libs/tree/test/test_tree_traversal_data.hpp (original)
+++ sandbox/SOC/2006/tree/trunk/libs/tree/test/test_tree_traversal_data.hpp 2008-11-25 14:40:48 EST (Tue, 25 Nov 2008)
@@ -25,8 +25,8 @@
         // Just to make sure we won't be getting any false positives when
         // copying test_tree1 to test_tree2, we'll change one of test_tree2's
         // values.
-// d = d.begin().end().begin().begin();
-// ++*d;
+ d = d.begin().end().begin().begin();
+ *d = T(29);
     }
     
     // Test data from http://en.wikipedia.org/wiki/Image:Binary_search_tree.svg
@@ -66,6 +66,22 @@
         BOOST_CHECK_EQUAL(*ret.root().end().end().begin().begin().begin(), 11);
         BOOST_CHECK_EQUAL(*ret.root().end().end().begin().begin().end().begin(), 12); //Leaf
     }
+
+ static void validate_test_dataset1_minus_1_tree(boost::tree::binary_tree<T>& ret)
+ {
+ BOOST_CHECK_EQUAL(*ret.root().begin(), 7);
+ BOOST_CHECK_EQUAL(*ret.root().begin().begin(), 2);
+ BOOST_CHECK_EQUAL(*ret.root().begin().begin().begin(), 0); //Leaf
+ BOOST_CHECK_EQUAL(*ret.root().begin().end().begin(), 5);
+ BOOST_CHECK_EQUAL(*ret.root().begin().end().begin().begin(), 3); //Leaf
+ BOOST_CHECK_EQUAL(*ret.root().begin().end().end().begin(), 6); //Leaf
+
+ BOOST_CHECK_EQUAL(*ret.root().end().begin(), 9);
+ BOOST_CHECK_EQUAL(*ret.root().end().end().begin(), 13);
+ BOOST_CHECK_EQUAL(*ret.root().end().end().begin().begin(), 12);
+ BOOST_CHECK_EQUAL(*ret.root().end().end().begin().begin().begin(), 10);
+ BOOST_CHECK_EQUAL(*ret.root().end().end().begin().begin().end().begin(), 11); //Leaf
+ }
     
     boost::tree::binary_tree<T> bt, bt2;
 };


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk