$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r74666 - trunk/boost/test/tree
From: gennadiy.rozental_at_[hidden]
Date: 2011-10-03 06:57:54
Author: rogeeff
Date: 2011-10-03 06:57:52 EDT (Mon, 03 Oct 2011)
New Revision: 74666
URL: http://svn.boost.org/trac/boost/changeset/74666
Log:
some missing files
Added:
   trunk/boost/test/tree/auto_registration.hpp   (contents, props changed)
   trunk/boost/test/tree/fixture.hpp   (contents, props changed)
   trunk/boost/test/tree/global_fixture.hpp   (contents, props changed)
   trunk/boost/test/tree/test_case_counter.hpp   (contents, props changed)
   trunk/boost/test/tree/test_case_template.hpp   (contents, props changed)
   trunk/boost/test/tree/test_unit.hpp   (contents, props changed)
   trunk/boost/test/tree/traverse.hpp   (contents, props changed)
   trunk/boost/test/tree/visitor.hpp   (contents, props changed)
Properties modified: 
   trunk/boost/test/tree/decorator.hpp   (props changed)
Added: trunk/boost/test/tree/auto_registration.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/test/tree/auto_registration.hpp	2011-10-03 06:57:52 EDT (Mon, 03 Oct 2011)
@@ -0,0 +1,56 @@
+//  (C) Copyright Gennadiy Rozental 2001-2011.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 74640 $
+//
+//  Description : defines auto_test_unit_registrar
+// ***************************************************************************
+
+#ifndef BOOST_TEST_TREE_AUTO_REGISTRATION_HPP_100211GER
+#define BOOST_TEST_TREE_AUTO_REGISTRATION_HPP_100211GER
+
+// Boost.Test
+#include <boost/test/detail/config.hpp>
+#include <boost/test/tree/decorator.hpp>
+#include <boost/test/tree/test_unit.hpp>
+
+// STL
+#include <list>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+namespace ut_detail {
+
+// ************************************************************************** //
+// **************           auto_test_unit_registrar           ************** //
+// ************************************************************************** //
+
+struct BOOST_TEST_DECL auto_test_unit_registrar {
+    // Constructors
+                auto_test_unit_registrar( test_case* tc, decorator::collector* decorators, counter_t exp_fail = 0 );
+    explicit    auto_test_unit_registrar( const_string ts_name, decorator::collector* decorators );
+    explicit    auto_test_unit_registrar( test_unit_generator const& tc_gen, decorator::collector* decorators );
+    explicit    auto_test_unit_registrar( int );
+
+private:
+    static std::list<test_suite*>& curr_ts_store();
+};
+
+} // namespace ut_detail
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_TREE_AUTO_REGISTRATION_HPP_100211GER
+
Added: trunk/boost/test/tree/fixture.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/test/tree/fixture.hpp	2011-10-03 06:57:52 EDT (Mon, 03 Oct 2011)
@@ -0,0 +1,93 @@
+//  (C) Copyright Gennadiy Rozental 2011.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 74640 $
+//
+//  Description : defines fixture interface and object makers
+// ***************************************************************************
+
+#ifndef BOOST_TEST_TREE_FIXTURE_HPP_100311GER
+#define BOOST_TEST_TREE_FIXTURE_HPP_100311GER
+
+// Boost.Test
+#include <boost/test/detail/config.hpp>
+
+// Boost
+#include <boost/shared_ptr.hpp>
+#include <boost/function/function0.hpp>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+
+// ************************************************************************** //
+// **************               test_unit_fixture              ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL test_unit_fixture { 
+public: 
+    // Fixture interface
+    virtual void    setup() = 0;
+    virtual void    teardown() = 0;
+}; 
+
+typedef shared_ptr<test_unit_fixture> test_unit_fixture_ptr;
+
+// ************************************************************************** //
+// **************              class_based_fixture             ************** //
+// ************************************************************************** //
+
+template<typename F>
+class class_based_fixture : public test_unit_fixture { 
+public: 
+    // Constructor
+    class_based_fixture() : m_inst( 0 ) {}
+
+private:
+    // Fixture interface
+    virtual void    setup()         { m_inst = new F; }
+    virtual void    teardown()      { delete m_inst; }
+
+    // Data members
+    F*              m_inst;
+}; 
+
+// ************************************************************************** //
+// **************            function_based_fixture            ************** //
+// ************************************************************************** //
+
+class function_based_fixture : public test_unit_fixture { 
+public:
+    // Constructor
+    function_based_fixture( boost::function<void ()> const& setup, boost::function<void ()> const& teardown )
+    : m_setup( setup )
+    , m_teardown( teardown )
+    {
+    }
+
+private:
+    // Fixture interface
+    virtual void    setup()         { if( m_setup ) m_setup(); }
+    virtual void    teardown()      { if( m_teardown ) m_teardown(); }
+
+    // Data members
+    boost::function<void ()>    m_setup;
+    boost::function<void ()>    m_teardown;
+}; 
+
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_TREE_FIXTURE_HPP_100311GER
+
Added: trunk/boost/test/tree/global_fixture.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/test/tree/global_fixture.hpp	2011-10-03 06:57:52 EDT (Mon, 03 Oct 2011)
@@ -0,0 +1,68 @@
+//  (C) Copyright Gennadiy Rozental 2001-2011.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 74640 $
+//
+//  Description : defines global_fixture
+// ***************************************************************************
+
+#ifndef BOOST_TEST_TREE_GLOBAL_FIXTURE_HPP_091911GER
+#define BOOST_TEST_TREE_GLOBAL_FIXTURE_HPP_091911GER
+
+// Boost.Test
+#include <boost/test/detail/config.hpp>
+#include <boost/test/detail/global_typedef.hpp>
+
+#include <boost/test/tree/observer.hpp>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+
+// ************************************************************************** //
+// **************                global_fixture                ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL global_fixture : public test_observer { 
+public: 
+    // Constructor
+    global_fixture();
+}; 
+
+//____________________________________________________________________________//
+
+namespace ut_detail {
+
+template<typename F> 
+struct global_fixture_impl : public global_fixture {
+    // Constructor
+    global_fixture_impl() : m_fixure( 0 )    {}
+
+    // test observer interface
+    virtual void    test_start( counter_t ) { m_fixure = new F; }
+    virtual void    test_finish()           { delete m_fixure; m_fixure = 0; } 
+    virtual void    test_aborted()          { delete m_fixure; m_fixure = 0; } 
+
+private:
+    // Data members
+    F*  m_fixure;
+}; 
+
+} // namespace ut_detail
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_TREE_GLOBAL_FIXTURE_HPP_091911GER
+
Added: trunk/boost/test/tree/test_case_counter.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/test/tree/test_case_counter.hpp	2011-10-03 06:57:52 EDT (Mon, 03 Oct 2011)
@@ -0,0 +1,54 @@
+//  (C) Copyright Gennadiy Rozental 2001-2011.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 74640 $
+//
+//  Description : defines test_case_counter
+// ***************************************************************************
+
+#ifndef BOOST_TEST_TREE_TEST_CASE_COUNTER_HPP_100211GER
+#define BOOST_TEST_TREE_TEST_CASE_COUNTER_HPP_100211GER
+
+// Boost.Test
+#include <boost/test/detail/config.hpp>
+#include <boost/test/utils/class_properties.hpp>
+
+#include <boost/test/tree/test_unit.hpp>
+#include <boost/test/tree/visitor.hpp>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+
+// ************************************************************************** //
+// **************                test_case_counter             ************** //
+// ************************************************************************** //
+
+class test_case_counter : public test_tree_visitor {
+public:
+    // Constructor
+    test_case_counter() : p_count( 0 ) {}
+
+    BOOST_READONLY_PROPERTY( counter_t, (test_case_counter)) p_count;
+private:
+    // test tree visitor interface
+    virtual void    visit( test_case const& tc )                { if( tc.p_enabled ) ++p_count.value; }
+    virtual bool    test_suite_start( test_suite const& ts )    { return ts.p_enabled; }
+};
+
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_TREE_TEST_CASE_COUNTER_HPP_100211GER
+
Added: trunk/boost/test/tree/test_case_template.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/test/tree/test_case_template.hpp	2011-10-03 06:57:52 EDT (Mon, 03 Oct 2011)
@@ -0,0 +1,129 @@
+//  (C) Copyright Gennadiy Rozental 2001-2011.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: -1 $
+//
+//  Description : defines template_test_case_gen
+// ***************************************************************************
+
+#ifndef BOOST_TEST_TREE_TEST_CASE_TEMPLATE_HPP_091911GER
+#define BOOST_TEST_TREE_TEST_CASE_TEMPLATE_HPP_091911GER
+
+// Boost.Test
+#include <boost/test/detail/config.hpp>
+#include <boost/test/detail/global_typedef.hpp>
+#include <boost/test/detail/fwd_decl.hpp>
+#include <boost/test/detail/workaround.hpp>
+
+#include <boost/test/utils/class_properties.hpp>
+
+#include <boost/test/tree/observer.hpp>
+
+
+// Boost
+#include <boost/shared_ptr.hpp>
+#include <boost/mpl/for_each.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/type.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/function/function0.hpp>
+
+// STL
+#include <typeinfo> // for typeid
+#include <string>   // for std::string
+#include <list>     // for std::list
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+namespace ut_detail {
+
+// ************************************************************************** //
+// **************          test_case_template_invoker          ************** //
+// ************************************************************************** //
+
+template<typename TestCaseTemplate,typename TestType>
+class test_case_template_invoker {
+public:
+    void    operator()()    { TestCaseTemplate::run( (boost::type<TestType>*)0 ); }
+};
+
+// ************************************************************************** //
+// **************           generate_test_case_4_type          ************** //
+// ************************************************************************** //
+
+template<typename Generator,typename TestCaseTemplate>
+struct generate_test_case_4_type {
+    explicit    generate_test_case_4_type( const_string tc_name, Generator& G )
+    : m_test_case_name( tc_name )
+    , m_holder( G )
+    {}
+
+    template<typename TestType>
+    void        operator()( mpl::identity<TestType> )
+    {
+        std::string full_name;
+        assign_op( full_name, m_test_case_name, 0 );
+        full_name += '<';
+        full_name += typeid(TestType).name();
+        if( boost::is_const<TestType>::value )
+            full_name += " const";
+        full_name += '>';
+
+        m_holder.m_test_cases.push_back( new test_case( full_name, test_case_template_invoker<TestCaseTemplate,TestType>() ) );
+    }
+
+private:
+    // Data members
+    const_string    m_test_case_name;
+    Generator&      m_holder;
+};
+
+// ************************************************************************** //
+// **************              test_case_template              ************** //
+// ************************************************************************** //
+
+template<typename TestCaseTemplate,typename TestTypesList>
+class template_test_case_gen : public test_unit_generator {
+public:
+    // Constructor
+    template_test_case_gen( const_string tc_name )
+    {
+        typedef generate_test_case_4_type<template_test_case_gen<TestCaseTemplate,TestTypesList>,TestCaseTemplate> single_test_gen;
+
+        mpl::for_each<TestTypesList,mpl::make_identity<mpl::_> >( single_test_gen( tc_name, *this ) );
+    }
+
+    virtual test_unit* next() const
+    {
+        if( m_test_cases.empty() )
+            return 0;
+    
+        test_unit* res = m_test_cases.front();
+        m_test_cases.pop_front();
+
+        return res;
+    }
+
+    // Data members
+    mutable std::list<test_unit*> m_test_cases;
+};
+
+} // namespace ut_detail
+} // unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_TREE_TEST_CASE_TEMPLATE_HPP_091911GER
+
Added: trunk/boost/test/tree/test_unit.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/test/tree/test_unit.hpp	2011-10-03 06:57:52 EDT (Mon, 03 Oct 2011)
@@ -0,0 +1,228 @@
+//  (C) Copyright Gennadiy Rozental 2011.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: -1 $
+//
+//  Description : defines test_unit, test_case, test_suite, master_test_suite_t
+// ***************************************************************************
+
+#ifndef BOOST_TEST_TREE_TEST_UNIT_HPP_100211GER
+#define BOOST_TEST_TREE_TEST_UNIT_HPP_100211GER
+
+// Boost.Test
+#include <boost/test/detail/config.hpp>
+#include <boost/test/detail/global_typedef.hpp>
+#include <boost/test/detail/fwd_decl.hpp>
+#include <boost/test/tree/decorator.hpp>
+#include <boost/test/tree/fixture.hpp>
+#include <boost/test/utils/class_properties.hpp>
+
+// Boost
+#include <boost/function/function0.hpp>
+
+// STL
+#include <list>
+#include <vector>
+#include <string>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+
+// ************************************************************************** //
+// **************                   test_unit                  ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL test_unit {
+public:
+    enum { type = tut_any };
+    typedef std::list<test_unit_id>             id_list;
+    typedef std::list<test_unit_fixture_ptr>    fixture_list;
+
+    // Constructor
+    test_unit( const_string tu_name, test_unit_type t );
+
+    // dependencies management
+    void    depends_on( test_unit* tu );
+    bool    check_dependencies() const;
+
+    // labels management
+    void    add_label( const_string l );
+    bool    has_label( const_string l ) const;
+
+    // helper access method
+    void    increase_exp_fail( unsigned num );
+
+    // Public r/o properties
+    typedef BOOST_READONLY_PROPERTY(test_unit_id,(framework_impl))  id_t;
+    typedef BOOST_READONLY_PROPERTY(test_unit_id,(test_suite))      parent_id_t;
+    typedef BOOST_READONLY_PROPERTY(id_list,(test_unit))            id_list_t;
+    typedef decorator::for_test_unit_ptr                            decorator_base;
+
+    readonly_property<test_unit_type>   p_type;                 // type for this test unit
+    readonly_property<const_string>     p_type_name;            // "case"/"suite"
+    id_t                                p_id;                   // unique id for this test unit
+    parent_id_t                         p_parent_id;            // parent test suite id
+    id_list_t                           p_dependencies;         // list of test units this one depends on
+
+    // Public r/w properties
+    readwrite_property<std::string>     p_name;                 // name for this test unit
+    readwrite_property<std::string>     p_description;          // description for this test unit
+    readwrite_property<unsigned>        p_timeout;              // timeout for the test unit execution 
+    readwrite_property<counter_t>       p_expected_failures;    // number of expected failures in this test unit
+    mutable readwrite_property<bool>    p_enabled;              // enabled/disabled status for this unit
+    readwrite_property<decorator_base>  p_decorators;           // automatically assigned decorators; execution is delayed till framework::init function
+    readwrite_property<fixture_list>    p_fixtures;             // fixtures associated with this test unit
+
+protected:
+    ~test_unit();
+
+private:
+    // Data members
+    std::list<std::string>              m_labels;
+};
+
+// ************************************************************************** //
+// **************              test_unit_generator             ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL test_unit_generator {
+public:
+    virtual test_unit*  next() const = 0;
+
+protected:
+    BOOST_TEST_PROTECTED_VIRTUAL ~test_unit_generator() {}
+};
+
+// ************************************************************************** //
+// **************                   test_case                  ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL test_case : public test_unit {
+public:
+    enum { type = tut_case };
+
+    // Constructor
+    test_case( const_string tc_name, boost::function<void ()> const& test_func );
+
+    // Public property
+    typedef BOOST_READONLY_PROPERTY(boost::function<void ()>,(test_case))  test_func;
+
+    test_func   p_test_func;
+
+private:
+    friend class framework_impl;
+    ~test_case() {}
+};
+
+// ************************************************************************** //
+// **************                  test_suite                  ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL test_suite : public test_unit {
+public:
+    enum { type = tut_suite };
+
+    // Constructor
+    explicit        test_suite( const_string ts_name );
+
+    // test unit list management
+    void            add( test_unit* tu, counter_t expected_failures = 0, unsigned timeout = 0 );
+    void            add( test_unit_generator const& gen, unsigned timeout = 0 );
+    void            remove( test_unit_id id );
+
+    // access methods
+    test_unit_id    get( const_string tu_name ) const;
+    std::size_t     size() const { return m_members.size(); }
+
+protected:
+    friend BOOST_TEST_DECL 
+    void        traverse_test_tree( test_suite const&, test_tree_visitor&, bool );
+    friend class framework_impl;
+    virtual     ~test_suite() {}
+
+    // Data members
+    std::vector<test_unit_id> m_members;
+};
+
+// ************************************************************************** //
+// **************               master_test_suite              ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL master_test_suite_t : public test_suite {
+public:
+    master_test_suite_t() : test_suite( "Master Test Suite" )
+    , argc( 0 )
+    , argv( 0 )
+    {}
+    
+    // Data members    
+    int      argc;
+    char**   argv;
+};
+
+// ************************************************************************** //
+// **************            user_tc_method_invoker            ************** //
+// ************************************************************************** //
+
+namespace ut_detail {
+
+BOOST_TEST_DECL std::string normalize_test_case_name( const_string tu_name );
+
+//____________________________________________________________________________//
+
+template<typename InstanceType,typename UserTestCase>
+struct user_tc_method_invoker {
+    typedef void (UserTestCase::*TestMethod )();
+
+    user_tc_method_invoker( shared_ptr<InstanceType> inst, TestMethod test_method )
+    : m_inst( inst ), m_test_method( test_method ) {}
+
+    void operator()() { ((*m_inst).*m_test_method)(); }
+
+    shared_ptr<InstanceType> m_inst;
+    TestMethod               m_test_method;
+};
+
+} // namespace ut_detail
+
+// ************************************************************************** //
+// **************                make_test_case                ************** //
+// ************************************************************************** //
+
+inline test_case*
+make_test_case( boost::function<void ()> const& test_func, const_string tc_name )
+{
+    return new test_case( ut_detail::normalize_test_case_name( tc_name ), test_func );
+}
+
+//____________________________________________________________________________//
+
+template<typename UserTestCase, typename InstanceType>
+inline test_case*
+make_test_case( void (UserTestCase::*           test_method )(),
+                const_string                    tc_name,
+                boost::shared_ptr<InstanceType> user_test_case )
+{
+    return new test_case( ut_detail::normalize_test_case_name( tc_name ), 
+                          ut_detail::user_tc_method_invoker<InstanceType,UserTestCase>( user_test_case, test_method ) );
+}
+
+//____________________________________________________________________________//
+
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_TREE_TEST_UNIT_HPP_100211GER
+
Added: trunk/boost/test/tree/traverse.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/test/tree/traverse.hpp	2011-10-03 06:57:52 EDT (Mon, 03 Oct 2011)
@@ -0,0 +1,58 @@
+//  (C) Copyright Gennadiy Rozental 2001-2011.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: -1 $
+//
+//  Description : defines traverse_test_tree algorithm
+// ***************************************************************************
+
+#ifndef BOOST_TEST_TREE_TRAVERSE_HPP_100211GER
+#define BOOST_TEST_TREE_TRAVERSE_HPP_100211GER
+
+// Boost.Test
+#include <boost/test/detail/config.hpp>
+
+#include <boost/test/tree/test_unit.hpp>
+#include <boost/test/tree/visitor.hpp>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+
+// ************************************************************************** //
+// **************               traverse_test_tree             ************** //
+// ************************************************************************** //
+
+BOOST_TEST_DECL void    traverse_test_tree( test_case const&, test_tree_visitor&, bool ignore_status = false );
+BOOST_TEST_DECL void    traverse_test_tree( test_suite const&, test_tree_visitor&, bool ignore_status = false );
+BOOST_TEST_DECL void    traverse_test_tree( test_unit_id     , test_tree_visitor&, bool ignore_status = false );
+
+//____________________________________________________________________________//
+
+inline void
+traverse_test_tree( test_unit const& tu, test_tree_visitor& V, bool ignore_status = false )
+{
+    if( tu.p_type == tut_case )
+        traverse_test_tree( static_cast<test_case const&>( tu ), V, ignore_status );
+    else
+        traverse_test_tree( static_cast<test_suite const&>( tu ), V, ignore_status );
+}
+
+//____________________________________________________________________________//
+
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_TREE_TRAVERSE_HPP_100211GER
Added: trunk/boost/test/tree/visitor.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/test/tree/visitor.hpp	2011-10-03 06:57:52 EDT (Mon, 03 Oct 2011)
@@ -0,0 +1,51 @@
+//  (C) Copyright Gennadiy Rozental 2011.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: -1 $
+//
+//  Description : defines test_tree_visitor
+// ***************************************************************************
+
+#ifndef BOOST_TEST_TREE_VISITOR_HPP_100211GER
+#define BOOST_TEST_TREE_VISITOR_HPP_100211GER
+
+// Boost.Test
+#include <boost/test/detail/config.hpp>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+
+// ************************************************************************** //
+// **************               test_tree_visitor              ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL test_tree_visitor {
+public:
+    // test tree visitor interface
+    virtual bool    visit( test_unit const& )               { return true; }
+    virtual void    visit( test_case const& tc )            { visit( (test_unit const&)tc ); }
+    virtual bool    test_suite_start(test_suite const& ts)  { return visit( (test_unit const&)ts ); }
+    virtual void    test_suite_finish( test_suite const& )  {}
+
+protected:
+    BOOST_TEST_PROTECTED_VIRTUAL ~test_tree_visitor() {}
+};
+
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_TREE_VISITOR_HPP_100211GER
+