1 // (C) Copyright Gennadiy Rozental 2001. 2 // Distributed under the Boost Software License, Version 1.0. 3 // (See accompanying file LICENSE_1_0.txt or copy at 4 // http://www.boost.org/LICENSE_1_0.txt) 5 6 // See http://www.boost.org/libs/test for the library home page. 7 // 8 // File : $RCSfile$ 9 // 10 // Version : $Revision: -1 $ 11 // 12 // Description : defines test_tree_visitor 13 // *************************************************************************** 14 15 #ifndef BOOST_TEST_TREE_VISITOR_HPP_100211GER 16 #define BOOST_TEST_TREE_VISITOR_HPP_100211GER 17 18 // Boost.Test 19 #include <boost/test/detail/config.hpp> 20 21 #include <boost/test/tree/test_unit.hpp> 22 23 #include <boost/test/detail/suppress_warnings.hpp> 24 25 //____________________________________________________________________________// 26 27 namespace boost { 28 namespace unit_test { 29 30 // ************************************************************************** // 31 // ************** test_tree_visitor ************** // 32 // ************************************************************************** // 33 34 class BOOST_TEST_DECL test_tree_visitor { 35 public: 36 // test tree visitor interface visit(test_unit const &)37 virtual bool visit( test_unit const& ) { return true; } visit(test_case const & tc)38 virtual void visit( test_case const& tc ) { visit( (test_unit const&)tc ); } test_suite_start(test_suite const & ts)39 virtual bool test_suite_start( test_suite const& ts ){ return visit( (test_unit const&)ts ); } test_suite_finish(test_suite const &)40 virtual void test_suite_finish( test_suite const& ) {} 41 42 protected: ~test_tree_visitor()43 BOOST_TEST_PROTECTED_VIRTUAL ~test_tree_visitor() {} 44 }; 45 46 } // namespace unit_test 47 } // namespace boost 48 49 #include <boost/test/detail/enable_warnings.hpp> 50 51 #endif // BOOST_TEST_TREE_VISITOR_HPP_100211GER 52 53