$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
From: ockham_at_[hidden]
Date: 2008-06-08 11:53:26
Author: bernhard.reiter
Date: 2008-06-08 11:53:25 EDT (Sun, 08 Jun 2008)
New Revision: 46240
URL: http://svn.boost.org/trac/boost/changeset/46240
Log:
Minor addition to the subtree tests.
Text files modified: 
   sandbox/SOC/2006/tree/trunk/TODO                                         |     3 ++-                                     
   sandbox/SOC/2006/tree/trunk/boost/tree/cursor.hpp                        |     2 +-                                      
   sandbox/SOC/2006/tree/trunk/libs/tree/test/subtree_algorithms_checks.hpp |    25 +++++++++++--------------               
   3 files changed, 14 insertions(+), 16 deletions(-)
Modified: sandbox/SOC/2006/tree/trunk/TODO
==============================================================================
--- sandbox/SOC/2006/tree/trunk/TODO	(original)
+++ sandbox/SOC/2006/tree/trunk/TODO	2008-06-08 11:53:25 EDT (Sun, 08 Jun 2008)
@@ -53,7 +53,8 @@
 
 Proposal:
 
-* Write a cursor_facade, cursor_adaptor and ascending_adaptor proposal.
+* Write a cursor_facade, cursor_adaptor as well as ascending_adaptor 
+  (and output_cursor_iterator_wrapper?) proposal.
 * Add a revision log:
  * Add to_parent() (replaces operator!()), to_begin() and to_end() descending cursor members.
 * Add (subtree) cursor algorithms.
Modified: sandbox/SOC/2006/tree/trunk/boost/tree/cursor.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/cursor.hpp	(original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/cursor.hpp	2008-06-08 11:53:25 EDT (Sun, 08 Jun 2008)
@@ -184,7 +184,7 @@
         return output_cursor_iterator_wrapper<OutputIterator>(o);
 }
 
-//define freestanding begin, end, size, empty using node's member fns?
+//define freestanding begin, end, size, empty using cursor's member fns?
 
 } // namespace tree
 } // namespace boost
Modified: sandbox/SOC/2006/tree/trunk/libs/tree/test/subtree_algorithms_checks.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/libs/tree/test/subtree_algorithms_checks.hpp	(original)
+++ sandbox/SOC/2006/tree/trunk/libs/tree/test/subtree_algorithms_checks.hpp	2008-06-08 11:53:25 EDT (Sun, 08 Jun 2008)
@@ -92,29 +92,26 @@
                                 std::distance(test_list.rbegin(), test_list.rend()));					
 
         //Now same for iterators wrapped around "explicit stack"-based cursors
-	// TODO: Only possible when there are stack-based pre- and postorder iterators
-
-//	BOOST_CHECK(std::equal(	boost::tree::ORDER::begin(t.root(), forward_traversal_tag()),
-//							boost::tree::ORDER::end(t.root(), forward_traversal_tag()),
-//							test_list.begin()
-//							));
-//
-//	BOOST_CHECK(std::equal(	boost::tree::ORDER::rbegin(t.root(), forward_traversal_tag()),
-//							boost::tree::ORDER::rend(t.root(), forward_traversal_tag()),
-//							test_list.rbegin()
-//							));
-
         BOOST_CHECK(std::equal(	boost::tree::ORDER::begin(ascending_cursor<cursor>(t.root())),
                                                         boost::tree::ORDER::end(ascending_cursor<cursor>(t.root())),
                                                         test_list.begin()
                                                         ));
 
+	BOOST_CHECK(std::distance(boost::tree::ORDER::begin(ascending_cursor<cursor>(t.root())),
+							  boost::tree::ORDER::end(ascending_cursor<cursor>(t.root()))) == 
+				std::distance(test_list.begin(), test_list.end()));
+
         BOOST_CHECK(std::equal(	boost::tree::ORDER::rbegin(ascending_cursor<cursor>(t.root())),
                                                         boost::tree::ORDER::rend(ascending_cursor<cursor>(t.root())),
                                                         test_list.rbegin()
                                                         ));
+							
+	BOOST_CHECK(std::distance(boost::tree::ORDER::rbegin(ascending_cursor<cursor>(t.root())),
+							  boost::tree::ORDER::rend(ascending_cursor<cursor>(t.root()))) == 
+				std::distance(test_list.rbegin(), test_list.rend()));
+
 }
 
 
-}
-}
+} // namespace ORDER
+} // namespace test