|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r74663 - in trunk/boost/test: . detail impl included interaction output tools tree utils
From: gennadiy.rozental_at_[hidden]
Date: 2011-10-03 02:59:48
Author: rogeeff
Date: 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
New Revision: 74663
URL: http://svn.boost.org/trac/boost/changeset/74663
Log:
Removed unit_test_framework namespace
test_being_aborted moved into framework namespace
New decorators: enable_if/disable_if to facilitate change status at construction time
Further work on restructuring unit_test_suite_impl split into multiple new headers under boost/test/tree/decorator.hpp
Added:
trunk/boost/test/impl/decorator.ipp
- copied, changed from r74640, /trunk/boost/test/impl/decorators.ipp
trunk/boost/test/tree/decorator.hpp
- copied, changed from r74640, /trunk/boost/test/tree/decorators.hpp
Removed:
trunk/boost/test/impl/decorators.ipp
trunk/boost/test/impl/test_main.ipp
trunk/boost/test/tree/decorators.hpp
trunk/boost/test/unit_test_suite_impl.hpp
Binary files modified:
trunk/boost/test/tools/impl.hpp
Text files modified:
trunk/boost/test/debug.hpp | 2
trunk/boost/test/detail/global_typedef.hpp | 4
trunk/boost/test/detail/unit_test_parameters.hpp | 6 -
trunk/boost/test/detail/workaround.hpp | 6 -
trunk/boost/test/execution_monitor.hpp | 6 +
trunk/boost/test/framework.hpp | 19 +++--
trunk/boost/test/impl/compiler_log_formatter.ipp | 10 --
trunk/boost/test/impl/cpp_main.ipp | 2
trunk/boost/test/impl/debug.ipp | 6 -
trunk/boost/test/impl/exception_safety.ipp | 3
trunk/boost/test/impl/execution_monitor.ipp | 55 ++++++++-------
trunk/boost/test/impl/framework.ipp | 138 ++++++++++++++++++++++++---------------
trunk/boost/test/impl/interaction_based.ipp | 4 -
trunk/boost/test/impl/logged_expectations.ipp | 3
trunk/boost/test/impl/plain_report_formatter.ipp | 10 --
trunk/boost/test/impl/progress_monitor.ipp | 9 +-
trunk/boost/test/impl/results_collector.ipp | 10 +-
trunk/boost/test/impl/results_reporter.ipp | 11 +--
trunk/boost/test/impl/test_tools.ipp | 6 -
trunk/boost/test/impl/unit_test_log.ipp | 5 -
trunk/boost/test/impl/unit_test_main.ipp | 7 +
trunk/boost/test/impl/unit_test_monitor.ipp | 7 -
trunk/boost/test/impl/unit_test_parameters.ipp | 5 -
trunk/boost/test/impl/unit_test_suite.ipp | 31 ++++++--
trunk/boost/test/impl/xml_log_formatter.ipp | 15 ++--
trunk/boost/test/impl/xml_report_formatter.ipp | 8 --
trunk/boost/test/included/unit_test.hpp | 2
trunk/boost/test/interaction/exception_safety.hpp | 2
trunk/boost/test/interaction/logged_expectations.hpp | 2
trunk/boost/test/interaction/mock_object.hpp | 6 +
trunk/boost/test/minimal.hpp | 1
trunk/boost/test/output/compiler_log_formatter.hpp | 6 -
trunk/boost/test/output/plain_report_formatter.hpp | 6 -
trunk/boost/test/output/xml_log_formatter.hpp | 6 -
trunk/boost/test/output/xml_report_formatter.hpp | 6 -
trunk/boost/test/parameterized_test.hpp | 4 -
trunk/boost/test/progress_monitor.hpp | 2
trunk/boost/test/results_collector.hpp | 4 -
trunk/boost/test/results_reporter.hpp | 6 -
trunk/boost/test/tools/floating_point_comparison.hpp | 9 -
trunk/boost/test/tools/output_test_stream.hpp | 4 -
trunk/boost/test/tools/predicate_result.hpp | 4 -
trunk/boost/test/tools/prod_tools.hpp | 6 -
trunk/boost/test/tree/observer.hpp | 6 -
trunk/boost/test/unit_test_log.hpp | 2
trunk/boost/test/unit_test_log_formatter.hpp | 2
trunk/boost/test/unit_test_monitor.hpp | 4 -
trunk/boost/test/unit_test_suite.hpp | 3
trunk/boost/test/utils/algorithm.hpp | 3
trunk/boost/test/utils/assign_op.hpp | 2
trunk/boost/test/utils/class_properties.hpp | 4 -
trunk/boost/test/utils/custom_manip.hpp | 4 -
trunk/boost/test/utils/fixed_mapping.hpp | 4 -
trunk/boost/test/utils/foreach.hpp | 6 -
trunk/boost/test/utils/lazy_ostream.hpp | 14 +--
trunk/boost/test/utils/named_params.hpp | 2
trunk/boost/test/utils/rtti.hpp | 2
trunk/boost/test/utils/setcolor.hpp | 4 -
trunk/boost/test/utils/trivial_singleton.hpp | 7 +
trunk/boost/test/utils/wrap_stringstream.hpp | 2
trunk/boost/test/utils/xml_printer.hpp | 4 -
61 files changed, 209 insertions(+), 330 deletions(-)
Modified: trunk/boost/test/debug.hpp
==============================================================================
--- trunk/boost/test/debug.hpp (original)
+++ trunk/boost/test/debug.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -30,7 +30,6 @@
//____________________________________________________________________________//
namespace boost {
-
namespace debug {
// ************************************************************************** //
@@ -95,7 +94,6 @@
void BOOST_TEST_DECL break_memory_alloc( long mem_alloc_order_num );
} // namespace debug
-
} // namespace boost
#include <boost/test/detail/enable_warnings.hpp>
Modified: trunk/boost/test/detail/global_typedef.hpp
==============================================================================
--- trunk/boost/test/detail/global_typedef.hpp (original)
+++ trunk/boost/test/detail/global_typedef.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -16,6 +16,8 @@
#define BOOST_TEST_GLOBAL_TYPEDEF_HPP_021005GER
#include <boost/test/utils/basic_cstring/basic_cstring.hpp>
+#include <boost/test/detail/workaround.hpp>
+
#define BOOST_TEST_L( s ) boost::unit_test::const_string( s, sizeof( s ) - 1 )
#define BOOST_TEST_STRINGIZE( s ) BOOST_TEST_L( BOOST_STRINGIZE( s ) )
#define BOOST_TEST_EMPTY_STRING BOOST_TEST_L( "" )
@@ -32,7 +34,6 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
typedef unsigned long counter_t;
@@ -85,7 +86,6 @@
} // namespace ut_detail
} // namespace unit_test
-
} // namespace boost
//____________________________________________________________________________//
Modified: trunk/boost/test/detail/unit_test_parameters.hpp
==============================================================================
--- trunk/boost/test/detail/unit_test_parameters.hpp (original)
+++ trunk/boost/test/detail/unit_test_parameters.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -27,15 +27,13 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
+namespace runtime_config {
// ************************************************************************** //
// ************** runtime_config ************** //
// ************************************************************************** //
-namespace runtime_config {
-
BOOST_TEST_DECL void init( int& argc, char** argv );
BOOST_TEST_DECL unit_test::log_level log_level();
@@ -60,9 +58,7 @@
BOOST_TEST_DECL int random_seed();
} // namespace runtime_config
-
} // namespace unit_test
-
} // namespace boost
//____________________________________________________________________________//
Modified: trunk/boost/test/detail/workaround.hpp
==============================================================================
--- trunk/boost/test/detail/workaround.hpp (original)
+++ trunk/boost/test/detail/workaround.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -26,9 +26,7 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
-
namespace ut_detail {
#ifdef BOOST_NO_STD_DISTANCE
@@ -51,11 +49,7 @@
template <class T> inline void ignore_unused_variable_warning(const T&) {}
} // namespace ut_detail
-
} // namespace unit_test
-
-namespace unit_test_framework = unit_test;
-
} // namespace boost
//____________________________________________________________________________//
Modified: trunk/boost/test/execution_monitor.hpp
==============================================================================
--- trunk/boost/test/execution_monitor.hpp (original)
+++ trunk/boost/test/execution_monitor.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -370,15 +370,17 @@
BOOST_FPE_INV = BOOST_FPE_ALL+1
};
+//____________________________________________________________________________//
+
// return the previous set of enabled exceptions when successful, and BOOST_FPE_INV otherwise
unsigned BOOST_TEST_DECL enable( unsigned mask );
unsigned BOOST_TEST_DECL disable( unsigned mask );
-} // namespace fpe
+//____________________________________________________________________________//
+} // namespace fpe
} // namespace boost
-//____________________________________________________________________________//
#include <boost/test/detail/enable_warnings.hpp>
Modified: trunk/boost/test/framework.hpp
==============================================================================
--- trunk/boost/test/framework.hpp (original)
+++ trunk/boost/test/framework.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -28,7 +28,6 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
// ************************************************************************** //
@@ -112,26 +111,32 @@
// ************** framework errors ************** //
// ************************************************************************** //
-struct internal_error : std::runtime_error {
+struct BOOST_TEST_DECL internal_error : std::runtime_error {
internal_error( const_string m ) : std::runtime_error( std::string( m.begin(), m.size() ) ) {}
};
-struct setup_error : std::runtime_error {
+//____________________________________________________________________________//
+
+struct BOOST_TEST_DECL setup_error : std::runtime_error {
setup_error( const_string m ) : std::runtime_error( std::string( m.begin(), m.size() ) ) {}
};
#define BOOST_TEST_SETUP_ASSERT( cond, msg ) if( cond ) {} else throw unit_test::framework::setup_error( msg )
-struct nothing_to_test {}; // not really an error
+//____________________________________________________________________________//
-} // namespace framework
+struct BOOST_TEST_DECL test_being_aborted {};
-} // unit_test
+//____________________________________________________________________________//
-} // namespace boost
+struct nothing_to_test {}; // not really an error
//____________________________________________________________________________//
+} // namespace framework
+} // unit_test
+} // namespace boost
+
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_FRAMEWORK_HPP_020805GER
Modified: trunk/boost/test/impl/compiler_log_formatter.ipp
==============================================================================
--- trunk/boost/test/impl/compiler_log_formatter.ipp (original)
+++ trunk/boost/test/impl/compiler_log_formatter.ipp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -16,12 +16,12 @@
#define BOOST_TEST_COMPILER_LOG_FORMATTER_IPP_020105GER
// Boost.Test
-#include <boost/test/output/compiler_log_formatter.hpp>
-#include <boost/test/unit_test_suite_impl.hpp>
#include <boost/test/framework.hpp>
+#include <boost/test/tree/test_unit.hpp>
#include <boost/test/utils/basic_cstring/io.hpp>
#include <boost/test/utils/lazy_ostream.hpp>
#include <boost/test/utils/setcolor.hpp>
+#include <boost/test/output/compiler_log_formatter.hpp>
#include <boost/test/detail/unit_test_parameters.hpp>
// Boost
@@ -35,9 +35,7 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
-
namespace output {
// ************************************************************************** //
@@ -269,13 +267,9 @@
//____________________________________________________________________________//
} // namespace output
-
} // namespace unit_test
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_COMPILER_LOG_FORMATTER_IPP_020105GER
Modified: trunk/boost/test/impl/cpp_main.ipp
==============================================================================
--- trunk/boost/test/impl/cpp_main.ipp (original)
+++ trunk/boost/test/impl/cpp_main.ipp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -131,8 +131,6 @@
#endif // !BOOST_TEST_DYN_LINK && !BOOST_TEST_NO_MAIN
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_CPP_MAIN_IPP_012205GER
Modified: trunk/boost/test/impl/debug.ipp
==============================================================================
--- trunk/boost/test/impl/debug.ipp (original)
+++ trunk/boost/test/impl/debug.ipp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -113,7 +113,6 @@
//____________________________________________________________________________//
namespace boost {
-
namespace debug {
using unit_test::const_string;
@@ -958,12 +957,11 @@
#endif // BOOST_MS_CRT_BASED_DEBUG
}
-} // namespace debug
+//____________________________________________________________________________//
+} // namespace debug
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_DEBUG_API_IPP_112006GER
Copied: trunk/boost/test/impl/decorator.ipp (from r74640, /trunk/boost/test/impl/decorators.ipp)
==============================================================================
Binary files. No diff available.
Deleted: trunk/boost/test/impl/decorators.ipp
==============================================================================
Binary file. No diff available.
Modified: trunk/boost/test/impl/exception_safety.ipp
==============================================================================
--- trunk/boost/test/impl/exception_safety.ipp (original)
+++ trunk/boost/test/impl/exception_safety.ipp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -525,11 +525,8 @@
//____________________________________________________________________________//
} // namespace itest
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // non-ancient compiler
Modified: trunk/boost/test/impl/execution_monitor.ipp
==============================================================================
--- trunk/boost/test/impl/execution_monitor.ipp (original)
+++ trunk/boost/test/impl/execution_monitor.ipp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -257,19 +257,19 @@
struct fpe_except_guard {
explicit fpe_except_guard( unsigned detect_fpe )
- : m_detect_fpe( detect_fpe )
+ : m_detect_fpe( detect_fpe )
{
// prepare fp exceptions control
m_previosly_enabled = fpe::disable( fpe::BOOST_FPE_ALL );
- if( m_previosly_enabled != fpe::BOOST_FPE_INV && detect_fpe != fpe::BOOST_FPE_OFF )
+ if( m_previosly_enabled != fpe::BOOST_FPE_INV && detect_fpe != fpe::BOOST_FPE_OFF )
fpe::enable( detect_fpe );
}
~fpe_except_guard()
{
if( m_detect_fpe != fpe::BOOST_FPE_OFF )
fpe::disable( m_detect_fpe );
- if( m_previosly_enabled != fpe::BOOST_FPE_INV )
- fpe::enable( m_previosly_enabled );
+ if( m_previosly_enabled != fpe::BOOST_FPE_INV )
+ fpe::enable( m_previosly_enabled );
}
unsigned m_detect_fpe;
@@ -1089,8 +1089,8 @@
detail::system_signal_exception SSE( this );
- int ret_val = 0;
-
+ int ret_val = 0;
+
__try {
__try {
ret_val = detail::do_invoke( m_custom_translators, F );
@@ -1106,8 +1106,8 @@
_set_invalid_parameter_handler( old_iph );
}
}
-
- return ret_val;
+
+ return ret_val;
}
//____________________________________________________________________________//
@@ -1273,18 +1273,21 @@
//____________________________________________________________________________//
-void
-execution_monitor::vexecute( boost::function<void ()> const& F )
-{
- struct forward {
- explicit forward( boost::function<void ()> const& F ) : m_F( F ) {}
+namespace detail {
- int operator()() { m_F(); return 0; }
+struct forward {
+ explicit forward( boost::function<void ()> const& F ) : m_F( F ) {}
- boost::function<void ()> const& m_F;
- };
+ int operator()() { m_F(); return 0; }
- execute( forward( F ) );
+ boost::function<void ()> const& m_F;
+};
+
+} // namespace detail
+void
+execution_monitor::vexecute( boost::function<void ()> const& F )
+{
+ execute( detail::forward( F ) );
}
// ************************************************************************** //
@@ -1343,18 +1346,18 @@
#else
unsigned old_cw;
if( ::_controlfp_s( &old_cw, 0, 0 ) != 0 )
- return BOOST_FPE_INV;
+ return BOOST_FPE_INV;
// Set the control word
if( ::_controlfp_s( 0, old_cw & ~mask, BOOST_FPE_ALL ) != 0 )
- return BOOST_FPE_INV;
+ return BOOST_FPE_INV;
#endif
- return ~old_cw & BOOST_FPE_ALL;
+ return ~old_cw & BOOST_FPE_ALL;
#elif defined(__GLIBC__) && defined(__USE_GNU) && !defined(BOOST_CLANG) && !defined(BOOST_NO_FENV_H)
::feclearexcept(BOOST_FPE_ALL);
- int res = ::feenableexcept( mask );
- return res == -1 ? BOOST_FPE_INV : (unsigned)res;
+ int res = ::feenableexcept( mask );
+ return res == -1 ? BOOST_FPE_INV : (unsigned)res;
#else
/* Not Implemented */
return 0;
@@ -1378,18 +1381,18 @@
#else
unsigned old_cw;
if( ::_controlfp_s( &old_cw, 0, 0 ) != 0 )
- return BOOST_FPE_INV;
+ return BOOST_FPE_INV;
// Set the control word
if( ::_controlfp_s( 0, old_cw | mask, BOOST_FPE_ALL ) != 0 )
- return BOOST_FPE_INV;
+ return BOOST_FPE_INV;
#endif
return ~old_cw & BOOST_FPE_ALL;
#elif defined(__GLIBC__) && defined(__USE_GNU) && !defined(BOOST_CLANG) && !defined(BOOST_NO_FENV_H)
::feclearexcept(BOOST_FPE_ALL);
- int res = ::fedisableexcept( mask );
- return res == -1 ? BOOST_FPE_INV : (unsigned)res;
+ int res = ::fedisableexcept( mask );
+ return res == -1 ? BOOST_FPE_INV : (unsigned)res;
#else
/* Not Implemented */
return BOOST_FPE_INV;
Modified: trunk/boost/test/impl/framework.ipp
==============================================================================
--- trunk/boost/test/impl/framework.ipp (original)
+++ trunk/boost/test/impl/framework.ipp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -19,15 +19,19 @@
#include <boost/test/framework.hpp>
#include <boost/test/execution_monitor.hpp>
#include <boost/test/debug.hpp>
-#include <boost/test/unit_test_suite_impl.hpp>
#include <boost/test/unit_test_log.hpp>
#include <boost/test/unit_test_monitor.hpp>
-#include <boost/test/tree/observer.hpp>
#include <boost/test/results_collector.hpp>
#include <boost/test/progress_monitor.hpp>
#include <boost/test/results_reporter.hpp>
#include <boost/test/test_tools.hpp>
+#include <boost/test/tree/observer.hpp>
+#include <boost/test/tree/test_unit.hpp>
+#include <boost/test/tree/visitor.hpp>
+#include <boost/test/tree/traverse.hpp>
+#include <boost/test/tree/test_case_counter.hpp>
+
#if BOOST_TEST_SUPPORT_TOKEN_ITERATOR
#include <boost/test/utils/iterator/token_iterator.hpp>
#endif
@@ -56,7 +60,6 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
// ************************************************************************** //
@@ -66,9 +69,7 @@
namespace ut_detail {
struct test_init_invoker {
- explicit test_init_invoker( init_unit_test_func init_func )
- : m_init_func( init_func )
- {}
+ explicit test_init_invoker( init_unit_test_func init_func ) : m_init_func( init_func ) {}
int operator()()
{
#ifdef BOOST_TEST_ALTERNATIVE_INIT_API
@@ -229,7 +230,7 @@
};
// ************************************************************************** //
-// ************** change_status ************** //
+// ************** change_status ************** //
// ************************************************************************** //
class change_status : public test_tree_visitor {
@@ -244,44 +245,6 @@
bool m_new_status;
};
-// ************************************************************************** //
-// ************** collect_disabled ************** //
-// ************************************************************************** //
-
-class collect_disabled : public test_tree_visitor {
-public:
- explicit collect_disabled( tu_enable_list& tu_to_enable ) : m_tu_to_enable( tu_to_enable ) {}
-
-private:
- // test_tree_visitor interface
- virtual bool visit( test_unit const& tu )
- {
- if( !tu.p_enabled )
- m_tu_to_enable.push_back( std::make_pair( tu.p_id, false ) );
-
- return true;
- }
-
- // Data members
- tu_enable_list& m_tu_to_enable;
-};
-
-// ************************************************************************** //
-// ************** apply_decorators ************** //
-// ************************************************************************** //
-
-class apply_decorators : public test_tree_visitor {
-private:
- // test_tree_visitor interface
- virtual bool visit( test_unit const& tu )
- {
- if( tu.p_decorators.get() )
- tu.p_decorators.get()->apply( const_cast<test_unit&>(tu) );
-
- return true;
- }
-};
-
} // namespace ut_detail
// ************************************************************************** //
@@ -360,7 +323,7 @@
m_curr_test_case = bkup;
if( unit_test_monitor.is_critical_error( run_result ) )
- throw test_being_aborted();
+ throw framework::test_being_aborted();
}
bool test_suite_start( test_suite const& ts )
@@ -477,11 +440,67 @@
throw setup_error( ex.what() );
}
- ut_detail::apply_decorators ad;
+ // Apply all decorators to the auto test units
+ class apply_decorators : public test_tree_visitor {
+ private:
+ // test_tree_visitor interface
+ virtual bool visit( test_unit const& tu )
+ {
+ if( tu.p_decorators.get() )
+ tu.p_decorators.get()->apply( const_cast<test_unit&>(tu) );
+
+ return true;
+ }
+ } ad;
traverse_test_tree( master_test_suite().p_id, ad, true );
+ // Let's see if anything was disabled during construction. These test units and anything
+ // that depends on them are removed from the test tree
+ class remove_disabled : public test_tree_visitor {
+ public:
+ // test_tree_visitor interface
+ virtual bool visit( test_unit const& tu )
+ {
+ // check if any of dependencies are disabled
+ if( tu.p_enabled ) {
+ BOOST_TEST_FOREACH( test_unit_id, dep_id, tu.p_dependencies.get() ) {
+ test_unit const& dep = framework::get( dep_id, tut_any );
+
+ if( !dep.p_enabled ) {
+ BOOST_TEST_MESSAGE( "Disable test " << tu.p_type_name << ' ' << tu.p_name <<
+ " since it depends on desabled test " << dep.p_type_name << ' ' << dep.p_name );
+
+ tu.p_enabled.value = false;
+ break;
+ }
+ }
+ }
+
+ // if this test unit is disabled - remove it from the tree and disable all subunits
+ if( !tu.p_enabled && tu.p_id != master_test_suite().p_id ) {
+ if( tu.p_type == tut_suite ) {
+ ut_detail::change_status disabler( false );
+ traverse_test_tree( tu.p_id, disabler, true );
+ }
+
+ framework::get<test_suite>( tu.p_parent_id ).remove( tu.p_id );
+ m_made_changes = true;
+ }
+
+ return tu.p_enabled;
+ }
+ bool m_made_changes;
+ } rd;
+
+ do {
+ rd.m_made_changes = false;
+ traverse_test_tree( master_test_suite().p_id, rd, true );
+ } while( rd.m_made_changes );
+
+ // apply all name and label filters
impl::apply_filters( master_test_suite().p_id );
+ // We are Done!
s_frk_impl().m_is_initialized = true;
}
@@ -553,7 +572,24 @@
// 35. add all children to the list recursively
if( data.second && tu.p_type == tut_suite ) {
- ut_detail::collect_disabled V( tu_to_enable );
+ class collect_disabled : public test_tree_visitor {
+ public:
+ explicit collect_disabled( ut_detail::tu_enable_list& tu_to_enable ) : m_tu_to_enable( tu_to_enable ) {}
+
+ private:
+ // test_tree_visitor interface
+ virtual bool visit( test_unit const& tu )
+ {
+ if( !tu.p_enabled )
+ m_tu_to_enable.push_back( std::make_pair( tu.p_id, false ) );
+
+ return true;
+ }
+
+ // Data members
+ ut_detail::tu_enable_list& m_tu_to_enable;
+ } V( tu_to_enable );
+
traverse_test_tree( tu.p_id, V, true );
}
}
@@ -797,7 +833,7 @@
try {
traverse_test_tree( id, s_frk_impl() );
}
- catch( test_being_aborted const& ) {
+ catch( framework::test_being_aborted const& ) {
// abort already reported
}
@@ -847,13 +883,9 @@
//____________________________________________________________________________//
} // namespace framework
-
} // namespace unit_test
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_FRAMEWORK_IPP_021005GER
Modified: trunk/boost/test/impl/interaction_based.ipp
==============================================================================
--- trunk/boost/test/impl/interaction_based.ipp (original)
+++ trunk/boost/test/impl/interaction_based.ipp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -35,7 +35,6 @@
//____________________________________________________________________________//
namespace boost {
-
namespace itest { // interaction-based testing
// ************************************************************************** //
@@ -77,11 +76,8 @@
}
} // namespace itest
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // not ancient compiler
Modified: trunk/boost/test/impl/logged_expectations.ipp
==============================================================================
--- trunk/boost/test/impl/logged_expectations.ipp (original)
+++ trunk/boost/test/impl/logged_expectations.ipp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -234,11 +234,8 @@
//____________________________________________________________________________//
} // namespace itest
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // not ancient compiler
Modified: trunk/boost/test/impl/plain_report_formatter.ipp
==============================================================================
--- trunk/boost/test/impl/plain_report_formatter.ipp (original)
+++ trunk/boost/test/impl/plain_report_formatter.ipp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -19,10 +19,12 @@
#include <boost/test/output/plain_report_formatter.hpp>
#include <boost/test/utils/custom_manip.hpp>
#include <boost/test/results_collector.hpp>
-#include <boost/test/unit_test_suite_impl.hpp>
+
+#include <boost/test/tree/test_unit.hpp>
#include <boost/test/utils/basic_cstring/io.hpp>
#include <boost/test/utils/setcolor.hpp>
+
#include <boost/test/detail/unit_test_parameters.hpp>
// STL
@@ -39,9 +41,7 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
-
namespace output {
namespace {
@@ -192,13 +192,9 @@
//____________________________________________________________________________//
} // namespace output
-
} // namespace unit_test
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_PLAIN_REPORT_FORMATTER_IPP_020105GER
Modified: trunk/boost/test/impl/progress_monitor.ipp
==============================================================================
--- trunk/boost/test/impl/progress_monitor.ipp (original)
+++ trunk/boost/test/impl/progress_monitor.ipp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -17,11 +17,14 @@
// Boost.Test
#include <boost/test/progress_monitor.hpp>
-#include <boost/test/unit_test_suite_impl.hpp>
#include <boost/test/detail/unit_test_parameters.hpp>
#include <boost/test/utils/setcolor.hpp>
+#include <boost/test/tree/test_unit.hpp>
+#include <boost/test/tree/test_case_counter.hpp>
+#include <boost/test/tree/traverse.hpp>
+
// Boost
#include <boost/progress.hpp>
#include <boost/scoped_ptr.hpp>
@@ -31,7 +34,6 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
// ************************************************************************** //
@@ -109,11 +111,8 @@
//____________________________________________________________________________//
} // namespace unit_test
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_PROGRESS_MONITOR_IPP_020105GER
Modified: trunk/boost/test/impl/results_collector.ipp
==============================================================================
--- trunk/boost/test/impl/results_collector.ipp (original)
+++ trunk/boost/test/impl/results_collector.ipp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -16,11 +16,15 @@
#define BOOST_TEST_RESULTS_COLLECTOR_IPP_021105GER
// Boost.Test
-#include <boost/test/unit_test_suite_impl.hpp>
#include <boost/test/unit_test_log.hpp>
#include <boost/test/results_collector.hpp>
#include <boost/test/framework.hpp>
+#include <boost/test/tree/test_unit.hpp>
+#include <boost/test/tree/visitor.hpp>
+#include <boost/test/tree/test_case_counter.hpp>
+#include <boost/test/tree/traverse.hpp>
+
// Boost
#include <boost/cstdlib.hpp>
@@ -32,7 +36,6 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
// ************************************************************************** //
@@ -284,11 +287,8 @@
//____________________________________________________________________________//
} // namespace unit_test
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_RESULTS_COLLECTOR_IPP_021105GER
Modified: trunk/boost/test/impl/results_reporter.ipp
==============================================================================
--- trunk/boost/test/impl/results_reporter.ipp (original)
+++ trunk/boost/test/impl/results_reporter.ipp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -17,12 +17,15 @@
// Boost.Test
#include <boost/test/results_reporter.hpp>
-#include <boost/test/unit_test_suite_impl.hpp>
#include <boost/test/results_collector.hpp>
#include <boost/test/framework.hpp>
#include <boost/test/output/plain_report_formatter.hpp>
#include <boost/test/output/xml_report_formatter.hpp>
+#include <boost/test/tree/visitor.hpp>
+#include <boost/test/tree/test_unit.hpp>
+#include <boost/test/tree/traverse.hpp>
+
#include <boost/test/detail/unit_test_parameters.hpp>
// Boost
@@ -38,9 +41,7 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
-
namespace results_reporter {
// ************************************************************************** //
@@ -190,13 +191,9 @@
//____________________________________________________________________________//
} // namespace results_reporter
-
} // namespace unit_test
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_RESULTS_REPORTER_IPP_020105GER
Deleted: trunk/boost/test/impl/test_main.ipp
==============================================================================
--- trunk/boost/test/impl/test_main.ipp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
+++ (empty file)
@@ -1,68 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001-2010.
-// (C) Copyright Beman Dawes 1995-2001.
-// 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$
-//
-// Description : implements main function for Test Execution Monitor.
-// ***************************************************************************
-
-#ifndef BOOST_TEST_TEST_MAIN_IPP_012205GER
-#define BOOST_TEST_TEST_MAIN_IPP_012205GER
-
-// Boost.Test
-#include <boost/test/framework.hpp>
-#include <boost/test/test_tools.hpp>
-#include <boost/test/unit_test_suite.hpp>
-
-// Boost
-#include <boost/cstdlib.hpp>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-extern int test_main( int argc, char* argv[] ); // prototype for user's test_main()
-
-struct test_main_caller {
- test_main_caller( int argc, char** argv ) : m_argc( argc ), m_argv( argv ) {}
-
- void operator()() {
- int test_main_result = test_main( m_argc, m_argv );
-
- // translate a test_main non-success return into a test error
- BOOST_CHECK( test_main_result == 0 || test_main_result == boost::exit_success );
- }
-
-private:
- // Data members
- int m_argc;
- char** m_argv;
-};
-
-// ************************************************************************** //
-// ************** test main ************** //
-// ************************************************************************** //
-
-::boost::unit_test::test_suite*
-init_unit_test_suite( int argc, char* argv[] ) {
- using namespace ::boost::unit_test;
-
- framework::master_test_suite().p_name.value = "Test Program";
-
- framework::master_test_suite().add( BOOST_TEST_CASE( test_main_caller( argc, argv ) ) );
-
- return 0;
-}
-
-//____________________________________________________________________________//
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_TEST_MAIN_IPP_012205GER
Modified: trunk/boost/test/impl/test_tools.ipp
==============================================================================
--- trunk/boost/test/impl/test_tools.ipp (original)
+++ trunk/boost/test/impl/test_tools.ipp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -20,8 +20,8 @@
#include <boost/test/unit_test_log.hpp>
#include <boost/test/tools/output_test_stream.hpp>
#include <boost/test/framework.hpp>
+#include <boost/test/tree/test_unit.hpp>
#include <boost/test/execution_monitor.hpp> // execution_aborted
-#include <boost/test/unit_test_suite_impl.hpp>
// Boost
#include <boost/config.hpp>
@@ -52,7 +52,6 @@
# endif
namespace boost {
-
namespace test_tools {
// ************************************************************************** //
@@ -626,11 +625,8 @@
//____________________________________________________________________________//
} // namespace test_tools
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_TEST_TOOLS_IPP_012205GER
Modified: trunk/boost/test/impl/unit_test_log.ipp
==============================================================================
--- trunk/boost/test/impl/unit_test_log.ipp (original)
+++ trunk/boost/test/impl/unit_test_log.ipp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -18,7 +18,6 @@
// Boost.Test
#include <boost/test/unit_test_log.hpp>
#include <boost/test/unit_test_log_formatter.hpp>
-#include <boost/test/unit_test_suite_impl.hpp>
#include <boost/test/execution_monitor.hpp>
#include <boost/test/framework.hpp>
@@ -39,7 +38,6 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
// ************************************************************************** //
@@ -463,11 +461,8 @@
//____________________________________________________________________________//
} // namespace unit_test
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_UNIT_TEST_LOG_IPP_012205GER
Modified: trunk/boost/test/impl/unit_test_main.ipp
==============================================================================
--- trunk/boost/test/impl/unit_test_main.ipp (original)
+++ trunk/boost/test/impl/unit_test_main.ipp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -18,9 +18,12 @@
// Boost.Test
#include <boost/test/framework.hpp>
#include <boost/test/results_collector.hpp>
-#include <boost/test/unit_test_suite_impl.hpp>
#include <boost/test/results_reporter.hpp>
+#include <boost/test/tree/visitor.hpp>
+#include <boost/test/tree/test_unit.hpp>
+#include <boost/test/tree/traverse.hpp>
+
#include <boost/test/detail/unit_test_parameters.hpp>
// Boost
@@ -36,7 +39,6 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
namespace ut_detail {
@@ -118,7 +120,6 @@
}
} // namespace unit_test
-
} // namespace boost
#if !defined(BOOST_TEST_DYN_LINK) && !defined(BOOST_TEST_NO_MAIN)
Modified: trunk/boost/test/impl/unit_test_monitor.ipp
==============================================================================
--- trunk/boost/test/impl/unit_test_monitor.ipp (original)
+++ trunk/boost/test/impl/unit_test_monitor.ipp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -18,10 +18,9 @@
// Boost.Test
#include <boost/test/unit_test_monitor.hpp>
-#include <boost/test/unit_test_suite_impl.hpp>
#include <boost/test/test_tools.hpp>
#include <boost/test/framework.hpp>
-
+#include <boost/test/tree/test_unit.hpp>
#include <boost/test/detail/unit_test_parameters.hpp>
#include <boost/test/detail/suppress_warnings.hpp>
@@ -29,7 +28,6 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
// ************************************************************************** //
@@ -71,11 +69,8 @@
//____________________________________________________________________________//
} // namespace unit_test
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_UNIT_TEST_MONITOR_IPP_012205GER
Modified: trunk/boost/test/impl/unit_test_parameters.ipp
==============================================================================
--- trunk/boost/test/impl/unit_test_parameters.ipp (original)
+++ trunk/boost/test/impl/unit_test_parameters.ipp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -62,7 +62,6 @@
# endif
namespace boost {
-
namespace unit_test {
// ************************************************************************** //
@@ -545,13 +544,9 @@
//____________________________________________________________________________//
} // namespace runtime_config
-
} // namespace unit_test
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_UNIT_TEST_PARAMETERS_IPP_012205GER
Modified: trunk/boost/test/impl/unit_test_suite.ipp
==============================================================================
--- trunk/boost/test/impl/unit_test_suite.ipp (original)
+++ trunk/boost/test/impl/unit_test_suite.ipp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -18,10 +18,18 @@
// Boost.Test
#include <boost/detail/workaround.hpp>
-#include <boost/test/unit_test_suite_impl.hpp>
+
#include <boost/test/framework.hpp>
-#include <boost/test/utils/foreach.hpp>
#include <boost/test/results_collector.hpp>
+
+#include <boost/test/tree/test_unit.hpp>
+#include <boost/test/tree/visitor.hpp>
+#include <boost/test/tree/traverse.hpp>
+#include <boost/test/tree/auto_registration.hpp>
+#include <boost/test/tree/global_fixture.hpp>
+
+#include <boost/test/utils/foreach.hpp>
+
#include <boost/test/detail/unit_test_parameters.hpp>
// Boost
@@ -33,16 +41,13 @@
#include <boost/test/detail/suppress_warnings.hpp>
-#if BOOST_WORKAROUND(__BORLANDC__, < 0x600) && \
- BOOST_WORKAROUND(_STLPORT_VERSION, <= 0x450) \
- /**/
+#if BOOST_WORKAROUND(__BORLANDC__, < 0x600) && BOOST_WORKAROUND(_STLPORT_VERSION, <= 0x450)
using std::rand; // rand is in std and random_shuffle is in _STL
#endif
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
// ************************************************************************** //
@@ -215,8 +220,15 @@
try {
if( runtime_config::random_seed() == 0 ) {
- BOOST_TEST_FOREACH( test_unit_id, id, suite.m_members )
- traverse_test_tree( id, V, ignore_status );
+ unsigned total_members = suite.m_members.size();
+ for( unsigned i=0; i < total_members; ) {
+ // this statement can remove the test unit from this list
+ traverse_test_tree( suite.m_members[i], V, ignore_status );
+ if( total_members > suite.m_members.size() )
+ total_members = suite.m_members.size();
+ else
+ ++i;
+ }
}
else {
std::vector<test_unit_id> members( suite.m_members );
@@ -225,7 +237,7 @@
traverse_test_tree( id, V, ignore_status );
}
- } catch( test_being_aborted const& ) {
+ } catch( framework::test_being_aborted const& ) {
V.test_suite_finish( suite );
framework::test_unit_aborted( suite );
@@ -345,7 +357,6 @@
//____________________________________________________________________________//
} // namespace unit_test
-
} // namespace boost
#include <boost/test/detail/enable_warnings.hpp>
Modified: trunk/boost/test/impl/xml_log_formatter.ipp
==============================================================================
--- trunk/boost/test/impl/xml_log_formatter.ipp (original)
+++ trunk/boost/test/impl/xml_log_formatter.ipp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -17,10 +17,9 @@
// Boost.Test
#include <boost/test/output/xml_log_formatter.hpp>
-#include <boost/test/unit_test_suite_impl.hpp>
#include <boost/test/framework.hpp>
+#include <boost/test/tree/test_unit.hpp>
#include <boost/test/utils/basic_cstring/io.hpp>
-
#include <boost/test/utils/xml_printer.hpp>
// Boost
@@ -34,9 +33,7 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
-
namespace output {
static const_string tu_type_name( test_unit const& tu )
@@ -192,26 +189,28 @@
}
+//____________________________________________________________________________//
+
void
xml_log_formatter::entry_context_finish( std::ostream& ostr )
{
ostr << BOOST_TEST_L( "</Context>" );
}
+//____________________________________________________________________________//
+
void
xml_log_formatter::log_entry_context( std::ostream& ostr, const_string context_descr )
{
ostr << BOOST_TEST_L( "<Frame><![CDATA[" ) << context_descr << BOOST_TEST_L( "]]></Frame>" );
}
-} // namespace output
+//____________________________________________________________________________//
+} // namespace output
} // namespace unit_test
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_XML_LOG_FORMATTER_IPP_020105GER
Modified: trunk/boost/test/impl/xml_report_formatter.ipp
==============================================================================
--- trunk/boost/test/impl/xml_report_formatter.ipp (original)
+++ trunk/boost/test/impl/xml_report_formatter.ipp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -17,9 +17,9 @@
// Boost.Test
#include <boost/test/results_collector.hpp>
-#include <boost/test/unit_test_suite_impl.hpp>
#include <boost/test/output/xml_report_formatter.hpp>
+#include <boost/test/tree/test_unit.hpp>
#include <boost/test/utils/xml_printer.hpp>
#include <boost/test/utils/basic_cstring/io.hpp>
@@ -28,9 +28,7 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
-
namespace output {
void
@@ -103,13 +101,9 @@
//____________________________________________________________________________//
} // namespace output
-
} // namespace unit_test
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_XML_REPORT_FORMATTER_IPP_020105GER
Modified: trunk/boost/test/included/unit_test.hpp
==============================================================================
--- trunk/boost/test/included/unit_test.hpp (original)
+++ trunk/boost/test/included/unit_test.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -17,7 +17,7 @@
#include <boost/test/impl/compiler_log_formatter.ipp>
#include <boost/test/impl/debug.ipp>
-#include <boost/test/impl/decorators.ipp>
+#include <boost/test/impl/decorator.ipp>
#include <boost/test/impl/framework.ipp>
#include <boost/test/impl/exception_safety.ipp>
#include <boost/test/impl/execution_monitor.ipp>
Modified: trunk/boost/test/interaction/exception_safety.hpp
==============================================================================
--- trunk/boost/test/interaction/exception_safety.hpp (original)
+++ trunk/boost/test/interaction/exception_safety.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -59,7 +59,6 @@
/**/
namespace boost {
-
namespace itest {
// ************************************************************************** //
@@ -69,7 +68,6 @@
void BOOST_TEST_DECL exception_safety( boost::function<void ()> const& F, unit_test::const_string test_name = "" );
} // namespace itest
-
} // namespace boost
// ************************************************************************** //
Modified: trunk/boost/test/interaction/logged_expectations.hpp
==============================================================================
--- trunk/boost/test/interaction/logged_expectations.hpp (original)
+++ trunk/boost/test/interaction/logged_expectations.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -54,7 +54,6 @@
/**/
namespace boost {
-
namespace itest {
// ************************************************************************** //
@@ -65,7 +64,6 @@
logged_expectations( boost::function<void ()> const& F, unit_test::const_string log_file_name, bool test_or_log = true );
} // namespace itest
-
} // namespace boost
#include <boost/test/detail/enable_warnings.hpp>
Modified: trunk/boost/test/interaction/mock_object.hpp
==============================================================================
--- trunk/boost/test/interaction/mock_object.hpp (original)
+++ trunk/boost/test/interaction/mock_object.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -27,7 +27,6 @@
//____________________________________________________________________________//
namespace boost {
-
namespace itest {
// ************************************************************************** //
@@ -286,6 +285,8 @@
}
};
+//____________________________________________________________________________//
+
// !! MO_BINARY_OP( BOOST_PP_COMMA(), "Comma operator" )
MO_BINARY_BOOL_OP( !=, "Inequality" )
@@ -319,8 +320,9 @@
MO_BINARY_OP( <<, "Left shift" )
MO_BINARY_OP( >>, "Right shift" )
-} // namespace itest
+//____________________________________________________________________________//
+} // namespace itest
} // namespace boost
#include <boost/test/detail/enable_warnings.hpp>
Modified: trunk/boost/test/minimal.hpp
==============================================================================
--- trunk/boost/test/minimal.hpp (original)
+++ trunk/boost/test/minimal.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -101,7 +101,6 @@
}; // monitor
} // namespace minimal_test
-
} // namespace boost
//____________________________________________________________________________//
Modified: trunk/boost/test/output/compiler_log_formatter.hpp
==============================================================================
--- trunk/boost/test/output/compiler_log_formatter.hpp (original)
+++ trunk/boost/test/output/compiler_log_formatter.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -24,9 +24,7 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
-
namespace output {
// ************************************************************************** //
@@ -61,13 +59,9 @@
};
} // namespace output
-
} // namespace unit_test
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_COMPILER_LOG_FORMATTER_HPP_020105GER
Modified: trunk/boost/test/output/plain_report_formatter.hpp
==============================================================================
--- trunk/boost/test/output/plain_report_formatter.hpp (original)
+++ trunk/boost/test/output/plain_report_formatter.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -24,9 +24,7 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
-
namespace output {
// ************************************************************************** //
@@ -50,13 +48,9 @@
};
} // namespace output
-
} // namespace unit_test
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_PLAIN_REPORT_FORMATTER_HPP_020105GER
Modified: trunk/boost/test/output/xml_log_formatter.hpp
==============================================================================
--- trunk/boost/test/output/xml_log_formatter.hpp (original)
+++ trunk/boost/test/output/xml_log_formatter.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -27,9 +27,7 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
-
namespace output {
// ************************************************************************** //
@@ -66,13 +64,9 @@
};
} // namespace output
-
} // namespace unit_test
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_XML_LOG_FORMATTER_020105GER
Modified: trunk/boost/test/output/xml_report_formatter.hpp
==============================================================================
--- trunk/boost/test/output/xml_report_formatter.hpp (original)
+++ trunk/boost/test/output/xml_report_formatter.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -24,9 +24,7 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
-
namespace output {
// ************************************************************************** //
@@ -46,13 +44,9 @@
};
} // namespace output
-
} // namespace unit_test
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_XML_REPORT_FORMATTER_HPP_020105GER
Modified: trunk/boost/test/parameterized_test.hpp
==============================================================================
--- trunk/boost/test/parameterized_test.hpp (original)
+++ trunk/boost/test/parameterized_test.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -43,7 +43,6 @@
/**/
namespace boost {
-
namespace unit_test {
namespace ut_detail {
@@ -152,11 +151,8 @@
//____________________________________________________________________________//
} // unit_test
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_PARAMETERIZED_TEST_HPP_021102GER
Modified: trunk/boost/test/progress_monitor.hpp
==============================================================================
--- trunk/boost/test/progress_monitor.hpp (original)
+++ trunk/boost/test/progress_monitor.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -27,7 +27,6 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
// ************************************************************************** //
@@ -61,7 +60,6 @@
BOOST_TEST_SINGLETON_INST( progress_monitor )
} // namespace unit_test
-
} // namespace boost
//____________________________________________________________________________//
Modified: trunk/boost/test/results_collector.hpp
==============================================================================
--- trunk/boost/test/results_collector.hpp (original)
+++ trunk/boost/test/results_collector.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -30,7 +30,6 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
// ************************************************************************** //
@@ -103,11 +102,8 @@
BOOST_TEST_SINGLETON_INST( results_collector )
} // namespace unit_test
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_RESULTS_COLLECTOR_HPP_071894GER
Modified: trunk/boost/test/results_reporter.hpp
==============================================================================
--- trunk/boost/test/results_reporter.hpp (original)
+++ trunk/boost/test/results_reporter.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -28,9 +28,7 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
-
namespace results_reporter {
// ************************************************************************** //
@@ -75,13 +73,9 @@
{ make_report( DETAILED_REPORT, id ); }
} // namespace results_reporter
-
} // namespace unit_test
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_RESULTS_REPORTER_HPP_021205GER
Modified: trunk/boost/test/tools/floating_point_comparison.hpp
==============================================================================
--- trunk/boost/test/tools/floating_point_comparison.hpp (original)
+++ trunk/boost/test/tools/floating_point_comparison.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -33,8 +33,8 @@
//____________________________________________________________________________//
namespace boost {
-
-namespace math { namespace fpc {
+namespace math {
+namespace fpc {
// ************************************************************************** //
// ************** fpc::strength ************** //
@@ -208,7 +208,7 @@
// Data members
FPT m_fraction_tolerance;
fpc::strength m_strength;
- mutable FPT m_failed_fraction;
+ mutable FPT m_failed_fraction;
};
// ************************************************************************** //
@@ -329,11 +329,8 @@
//____________________________________________________________________________//
} // namespace test_tools
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_FLOATING_POINT_COMAPARISON_HPP_071894GER
Modified: trunk/boost/test/tools/impl.hpp
==============================================================================
Binary files. No diff available.
Modified: trunk/boost/test/tools/output_test_stream.hpp
==============================================================================
--- trunk/boost/test/tools/output_test_stream.hpp (original)
+++ trunk/boost/test/tools/output_test_stream.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -34,7 +34,6 @@
// class to be used to simplify testing of ostream-based output operations
namespace boost {
-
namespace test_tools {
class BOOST_TEST_DECL output_test_stream : public wrap_stringstream::wrapped_stream {
@@ -68,11 +67,8 @@
};
} // namespace test_tools
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_OUTPUT_TEST_STREAM_HPP_012705GER
Modified: trunk/boost/test/tools/predicate_result.hpp
==============================================================================
--- trunk/boost/test/tools/predicate_result.hpp (original)
+++ trunk/boost/test/tools/predicate_result.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -32,7 +32,6 @@
//____________________________________________________________________________//
namespace boost {
-
namespace test_tools {
// ************************************************************************** //
@@ -78,11 +77,8 @@
};
} // namespace test_tools
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_PREDICATE_RESULT_HPP_012705GER
Modified: trunk/boost/test/tools/prod_tools.hpp
==============================================================================
--- trunk/boost/test/tools/prod_tools.hpp (original)
+++ trunk/boost/test/tools/prod_tools.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -109,9 +109,7 @@
//____________________________________________________________________________//
namespace boost {
-
namespace test_tools {
-
namespace tt_detail {
// ************************************************************************** //
@@ -197,13 +195,9 @@
//____________________________________________________________________________//
} // namespace tt_detail
-
} // namespace test_tools
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_PROD_TOOLS_HPP_122109GER
Copied: trunk/boost/test/tree/decorator.hpp (from r74640, /trunk/boost/test/tree/decorators.hpp)
==============================================================================
Binary files. No diff available.
Deleted: trunk/boost/test/tree/decorators.hpp
==============================================================================
Binary file. No diff available.
Modified: trunk/boost/test/tree/observer.hpp
==============================================================================
--- trunk/boost/test/tree/observer.hpp (original)
+++ trunk/boost/test/tree/observer.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -25,7 +25,6 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
// ************************************************************************** //
@@ -53,12 +52,9 @@
BOOST_TEST_PROTECTED_VIRTUAL ~test_observer() {}
};
-} // unit_test
-
+} // namespace unit_test
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_TEST_OBSERVER_HPP_021005GER
Modified: trunk/boost/test/unit_test_log.hpp
==============================================================================
--- trunk/boost/test/unit_test_log.hpp (original)
+++ trunk/boost/test/unit_test_log.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -39,7 +39,6 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
// ************************************************************************** //
@@ -142,7 +141,6 @@
/**/
} // namespace unit_test
-
} // namespace boost
// ************************************************************************** //
Modified: trunk/boost/test/unit_test_log_formatter.hpp
==============================================================================
--- trunk/boost/test/unit_test_log_formatter.hpp (original)
+++ trunk/boost/test/unit_test_log_formatter.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -31,7 +31,6 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
// ************************************************************************** //
@@ -112,7 +111,6 @@
};
} // namespace unit_test
-
} // namespace boost
//____________________________________________________________________________//
Modified: trunk/boost/test/unit_test_monitor.hpp
==============================================================================
--- trunk/boost/test/unit_test_monitor.hpp (original)
+++ trunk/boost/test/unit_test_monitor.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -26,7 +26,6 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
// ************************************************************************** //
@@ -58,11 +57,8 @@
BOOST_TEST_SINGLETON_INST( unit_test_monitor )
} // namespace unit_test
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_UNIT_TEST_MONITOR_HPP_020905GER
Modified: trunk/boost/test/unit_test_suite.hpp
==============================================================================
--- trunk/boost/test/unit_test_suite.hpp (original)
+++ trunk/boost/test/unit_test_suite.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -16,8 +16,9 @@
#define BOOST_TEST_UNIT_TEST_SUITE_HPP_071894GER
// Boost.Test
-#include <boost/test/unit_test_suite_impl.hpp>
#include <boost/test/framework.hpp>
+#include <boost/test/tree/auto_registration.hpp>
+#include <boost/test/tree/test_case_template.hpp>
//____________________________________________________________________________//
Deleted: trunk/boost/test/unit_test_suite_impl.hpp
==============================================================================
--- trunk/boost/test/unit_test_suite_impl.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
+++ (empty file)
@@ -1,432 +0,0 @@
-// (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$
-//
-// Description : defines test_unit, test_case, test_case_results, test_suite and test_tree_visitor
-// ***************************************************************************
-
-#ifndef BOOST_TEST_UNIT_TEST_SUITE_IMPL_HPP_071894GER
-#define BOOST_TEST_UNIT_TEST_SUITE_IMPL_HPP_071894GER
-
-// 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>
-#include <boost/test/tree/decorators.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 <vector> // for std::vector
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-
-namespace unit_test {
-
-// ************************************************************************** //
-// ************** test_unit_fixture ************** //
-// ************************************************************************** //
-
-struct test_unit_fixture {
-};
-
-// ************************************************************************** //
-// ************** test_unit ************** //
-// ************************************************************************** //
-
-class BOOST_TEST_DECL test_unit {
-public:
- enum { type = tut_any };
- typedef std::list<test_unit_id> id_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;
-
- // 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;
-
- 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::for_test_unit_ptr> p_decorators; // automatically assigned decorators; execution is delayed till framework::init function
-
- void increase_exp_fail( unsigned num );
-
-protected:
- ~test_unit();
-
-private:
- // Data members
- std::list<std::string> m_labels;
- decorator::for_test_unit_ptr m_decorators;
-};
-
-// ************************************************************************** //
-// ************** test_case_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;
-};
-
-
-// ************************************************************************** //
-// ************** 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() {}
-};
-
-// ************************************************************************** //
-// ************** 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 );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** 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; }
-};
-
-// ************************************************************************** //
-// ************** test_being_aborted ************** //
-// ************************************************************************** //
-
-struct BOOST_TEST_DECL test_being_aborted {};
-
-// ************************************************************************** //
-// ************** 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 ) );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** auto_test_unit_registrar ************** //
-// ************************************************************************** //
-
-namespace ut_detail {
-
-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
-
-// ************************************************************************** //
-// ************** 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;
-};
-
-// ************************************************************************** //
-// ************** 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_UNIT_TEST_SUITE_IMPL_HPP_071894GER
-
Modified: trunk/boost/test/utils/algorithm.hpp
==============================================================================
--- trunk/boost/test/utils/algorithm.hpp (original)
+++ trunk/boost/test/utils/algorithm.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -216,11 +216,8 @@
//____________________________________________________________________________//
} // namespace unit_test
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_ALGORITHM_HPP_062304GER
Modified: trunk/boost/test/utils/assign_op.hpp
==============================================================================
--- trunk/boost/test/utils/assign_op.hpp (original)
+++ trunk/boost/test/utils/assign_op.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -16,7 +16,6 @@
#define BOOST_TEST_ASSIGN_OP_033005GER
namespace boost {
-
namespace unit_test {
// ************************************************************************** //
@@ -34,7 +33,6 @@
//____________________________________________________________________________//
} // namespace unit_test
-
} // namespace boost
#endif // BOOST_TEST_ASSIGN_OP_033005GER
Modified: trunk/boost/test/utils/class_properties.hpp
==============================================================================
--- trunk/boost/test/utils/class_properties.hpp (original)
+++ trunk/boost/test/utils/class_properties.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -36,7 +36,6 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
// ************************************************************************** //
@@ -209,11 +208,8 @@
//____________________________________________________________________________//
} // unit_test
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#undef BOOST_TEST_NO_PROTECTED_USING
Modified: trunk/boost/test/utils/custom_manip.hpp
==============================================================================
--- trunk/boost/test/utils/custom_manip.hpp (original)
+++ trunk/boost/test/utils/custom_manip.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -23,7 +23,6 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
// ************************************************************************** //
@@ -53,11 +52,8 @@
//____________________________________________________________________________//
} // namespace unit_test
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_CUSTOM_MANIP_HPP_071894GER
Modified: trunk/boost/test/utils/fixed_mapping.hpp
==============================================================================
--- trunk/boost/test/utils/fixed_mapping.hpp (original)
+++ trunk/boost/test/utils/fixed_mapping.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -32,7 +32,6 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
// configurable maximum fixed sized mapping size supported by this header.
@@ -107,11 +106,8 @@
};
} // namespace unit_test
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#undef MAX_MAP_SIZE
Modified: trunk/boost/test/utils/foreach.hpp
==============================================================================
--- trunk/boost/test/utils/foreach.hpp (original)
+++ trunk/boost/test/utils/foreach.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -35,9 +35,7 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
-
namespace for_each {
// ************************************************************************** //
@@ -310,13 +308,9 @@
//____________________________________________________________________________//
} // namespace for_each
-
} // namespace unit_test
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_FOREACH_HPP_021005GER
Modified: trunk/boost/test/utils/lazy_ostream.hpp
==============================================================================
--- trunk/boost/test/utils/lazy_ostream.hpp (original)
+++ trunk/boost/test/utils/lazy_ostream.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -30,7 +30,6 @@
// ************************************************************************** //
namespace boost {
-
namespace unit_test {
class lazy_ostream {
@@ -56,7 +55,7 @@
//____________________________________________________________________________//
-template<typename PrevType, typename T>
+template<typename PrevType, typename T, typename StorageT=T const&>
class lazy_ostream_impl : public lazy_ostream {
public:
lazy_ostream_impl( PrevType const& prev, T const& value )
@@ -73,7 +72,7 @@
private:
// Data members
PrevType m_prev;
- T const& m_value;
+ StorageT m_value;
};
//____________________________________________________________________________//
@@ -100,23 +99,23 @@
#if BOOST_TEST_USE_STD_LOCALE
template<typename R,typename S>
-inline lazy_ostream_impl<lazy_ostream const&,R& (BOOST_TEST_CALL_DECL *)(S&)>
+inline lazy_ostream_impl<lazy_ostream const&,R& (BOOST_TEST_CALL_DECL *)(S&),R& (BOOST_TEST_CALL_DECL *)(S&)>
operator<<( lazy_ostream const& prev, R& (BOOST_TEST_CALL_DECL *man)(S&) )
{
typedef R& (BOOST_TEST_CALL_DECL * ManipType)(S&);
- return lazy_ostream_impl<lazy_ostream const&,ManipType>( prev, man );
+ return lazy_ostream_impl<lazy_ostream const&,ManipType,ManipType>( prev, man );
}
//____________________________________________________________________________//
template<typename PrevPrevType, typename TPrev,typename R,typename S>
-inline lazy_ostream_impl<lazy_ostream_impl<PrevPrevType,TPrev>,R& (BOOST_TEST_CALL_DECL *)(S&)>
+inline lazy_ostream_impl<lazy_ostream_impl<PrevPrevType,TPrev>,R& (BOOST_TEST_CALL_DECL *)(S&),R& (BOOST_TEST_CALL_DECL *)(S&)>
operator<<( lazy_ostream_impl<PrevPrevType,TPrev> const& prev, R& (BOOST_TEST_CALL_DECL *man)(S&) )
{
typedef R& (BOOST_TEST_CALL_DECL * ManipType)(S&);
- return lazy_ostream_impl<lazy_ostream_impl<PrevPrevType,TPrev>,ManipType>( prev, man );
+ return lazy_ostream_impl<lazy_ostream_impl<PrevPrevType,TPrev> const&,ManipType,ManipType>( prev, man );
}
//____________________________________________________________________________//
@@ -124,7 +123,6 @@
#endif
} // namespace unit_test
-
} // namespace boost
//____________________________________________________________________________//
Modified: trunk/boost/test/utils/named_params.hpp
==============================================================================
--- trunk/boost/test/utils/named_params.hpp (original)
+++ trunk/boost/test/utils/named_params.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -30,7 +30,6 @@
//____________________________________________________________________________//
namespace boost {
-
namespace nfp { // named function parameters
// ************************************************************************** //
@@ -320,7 +319,6 @@
//____________________________________________________________________________//
} // namespace nfp
-
} // namespace boost
#include <boost/test/detail/enable_warnings.hpp>
Modified: trunk/boost/test/utils/rtti.hpp
==============================================================================
--- trunk/boost/test/utils/rtti.hpp (original)
+++ trunk/boost/test/utils/rtti.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -18,7 +18,6 @@
#include <cstddef>
namespace boost {
-
namespace rtti {
// ************************************************************************** //
@@ -58,7 +57,6 @@
//____________________________________________________________________________//
} // namespace rtti
-
} // namespace boost
#endif // BOOST_RT_RTTI_HPP_062604GER
Modified: trunk/boost/test/utils/setcolor.hpp
==============================================================================
--- trunk/boost/test/utils/setcolor.hpp (original)
+++ trunk/boost/test/utils/setcolor.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -27,7 +27,6 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
// ************************************************************************** //
@@ -111,11 +110,8 @@
};
} // namespace unit_test
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_SETCOLOR_HPP_121009GER
Modified: trunk/boost/test/utils/trivial_singleton.hpp
==============================================================================
--- trunk/boost/test/utils/trivial_singleton.hpp (original)
+++ trunk/boost/test/utils/trivial_singleton.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -25,7 +25,6 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
// ************************************************************************** //
@@ -41,7 +40,7 @@
~singleton() {}
};
-} // namespace unit_test
+//____________________________________________________________________________//
#define BOOST_TEST_SINGLETON_CONS( type ) \
friend class boost::unit_test::singleton<type>; \
@@ -65,9 +64,11 @@
#endif
+//____________________________________________________________________________//
+
+} // namespace unit_test
} // namespace boost
-//____________________________________________________________________________//
#include <boost/test/detail/enable_warnings.hpp>
Modified: trunk/boost/test/utils/wrap_stringstream.hpp
==============================================================================
--- trunk/boost/test/utils/wrap_stringstream.hpp (original)
+++ trunk/boost/test/utils/wrap_stringstream.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -157,8 +157,6 @@
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_WRAP_STRINGSTREAM_HPP_071894GER
Modified: trunk/boost/test/utils/xml_printer.hpp
==============================================================================
--- trunk/boost/test/utils/xml_printer.hpp (original)
+++ trunk/boost/test/utils/xml_printer.hpp 2011-10-03 02:59:41 EDT (Mon, 03 Oct 2011)
@@ -33,7 +33,6 @@
//____________________________________________________________________________//
namespace boost {
-
namespace unit_test {
// ************************************************************************** //
@@ -108,11 +107,8 @@
//____________________________________________________________________________//
} // namespace unit_test
-
} // namespace boost
-//____________________________________________________________________________//
-
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_XML_PRINTER_HPP_071894GER
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