Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r74640 - in trunk/boost/test: . detail impl included interaction tools tree utils utils/basic_cstring utils/runtime/cla utils/runtime/env
From: gennadiy.rozental_at_[hidden]
Date: 2011-10-02 05:00:21


Author: rogeeff
Date: 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
New Revision: 74640
URL: http://svn.boost.org/trac/boost/changeset/74640

Log:
Removed deprecated headers/interfaces:
    auto_unit_test.hpp
    test_exec_monitor.hpp (Test Execution Monitor)
    unit_test_framework.hpp
    BOOST_BITWISE_EQUAL( L, R )
    BOOST_MESSAGE( M )
    BOOST_CHECKPOINT( M )
Eliminated callback.hpp in favor of boost::function.
Eliminated need for sero_return_wrapper
Eliminated test_func_with_bound_param in favor of boost::bind
Eliminated auto_tc_exp_fail in favor on new decorator based implementation
Started header reorganization.
    introduced subdirectory tools for testing tools related headers
    introduced subdirectory tree for test tree management related headers
    introduced subdirectory interaction for interaction based testing
    test_tools.hpp header split into interface (stay as it was) and implementation places in tools/impl.hpp
Execution monitor: new interface vexecute - to be used to monitor nullary functions with no result values
Introduced notion of auto-registered test unit decorators. General interface and infrastructure put in place. Following decorators already implemented:
    decorator::label - adds labels to a test unit
    decorator::expected_failures - set expected failures for test unit
    decorator::timeout - sets timeout for test unit
    decorator::description - sets test unit description
    decorator::depends_on - sets test unit dependency
New macro BOOST_TEST_DECORATOR is to be used to specify decorators
Added operator+ and operator += for basic_cstring and std::string
Eliminated some old workarounds
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES deprecated use decorator interface instead
test_case::test_func switched back to readonly property
test_tree_visitor interface extended to facilitate visitors applying the same action to all test units. Added:
     virtual bool visit( test_unit const& )
and redirected other interfaces use it as default.
Fixed bug in lazy_ostream_impl construction
Added:
   trunk/boost/test/impl/decorators.ipp (contents, props changed)
   trunk/boost/test/interaction/
   trunk/boost/test/interaction/exception_safety.hpp
      - copied, changed from r74298, /trunk/boost/test/exception_safety.hpp
   trunk/boost/test/interaction/interaction_based.hpp
      - copied, changed from r74298, /trunk/boost/test/interaction_based.hpp
   trunk/boost/test/interaction/logged_expectations.hpp
      - copied, changed from r74298, /trunk/boost/test/logged_expectations.hpp
   trunk/boost/test/interaction/mock_object.hpp
      - copied, changed from r74298, /trunk/boost/test/mock_object.hpp
   trunk/boost/test/tools/
   trunk/boost/test/tools/floating_point_comparison.hpp
      - copied, changed from r74298, /trunk/boost/test/floating_point_comparison.hpp
   trunk/boost/test/tools/impl.hpp (contents, props changed)
   trunk/boost/test/tools/output_test_stream.hpp
      - copied, changed from r74638, /trunk/boost/test/output_test_stream.hpp
   trunk/boost/test/tools/predicate_result.hpp
      - copied unchanged from r74298, /trunk/boost/test/predicate_result.hpp
   trunk/boost/test/tools/prod_tools.hpp
      - copied unchanged from r74298, /trunk/boost/test/prod_tools.hpp
   trunk/boost/test/tree/
   trunk/boost/test/tree/decorators.hpp (contents, props changed)
   trunk/boost/test/tree/observer.hpp
      - copied, changed from r74638, /trunk/boost/test/test_observer.hpp
Removed:
   trunk/boost/test/auto_unit_test.hpp
   trunk/boost/test/exception_safety.hpp
   trunk/boost/test/floating_point_comparison.hpp
   trunk/boost/test/included/test_exec_monitor.hpp
   trunk/boost/test/included/unit_test_framework.hpp
   trunk/boost/test/interaction_based.hpp
   trunk/boost/test/logged_expectations.hpp
   trunk/boost/test/mock_object.hpp
   trunk/boost/test/output_test_stream.hpp
   trunk/boost/test/predicate_result.hpp
   trunk/boost/test/prod_tools.hpp
   trunk/boost/test/test_case_template.hpp
   trunk/boost/test/test_exec_monitor.hpp
   trunk/boost/test/test_observer.hpp
   trunk/boost/test/utils/callback.hpp
Text files modified:
   trunk/boost/test/debug.hpp | 8
   trunk/boost/test/debug_config.hpp | 2
   trunk/boost/test/detail/config.hpp | 6
   trunk/boost/test/execution_monitor.hpp | 18
   trunk/boost/test/framework.hpp | 5
   trunk/boost/test/impl/cpp_main.ipp | 11
   trunk/boost/test/impl/exception_safety.ipp | 8
   trunk/boost/test/impl/execution_monitor.ipp | 22 +
   trunk/boost/test/impl/framework.ipp | 143 +++++------
   trunk/boost/test/impl/interaction_based.ipp | 5
   trunk/boost/test/impl/logged_expectations.ipp | 6
   trunk/boost/test/impl/test_tools.ipp | 2
   trunk/boost/test/impl/unit_test_monitor.ipp | 22 -
   trunk/boost/test/impl/unit_test_suite.ipp | 47 +--
   trunk/boost/test/included/unit_test.hpp | 1
   trunk/boost/test/interaction/exception_safety.hpp | 14
   trunk/boost/test/interaction/interaction_based.hpp | 2
   trunk/boost/test/interaction/logged_expectations.hpp | 13
   trunk/boost/test/interaction/mock_object.hpp | 4
   trunk/boost/test/minimal.hpp | 6
   trunk/boost/test/parameterized_test.hpp | 46 +--
   trunk/boost/test/prg_exec_monitor.hpp | 2
   trunk/boost/test/progress_monitor.hpp | 4
   trunk/boost/test/results_collector.hpp | 4
   trunk/boost/test/results_reporter.hpp | 2
   trunk/boost/test/test_tools.hpp | 462 ---------------------------------------
   trunk/boost/test/tools/floating_point_comparison.hpp | 2
   trunk/boost/test/tools/output_test_stream.hpp | 2
   trunk/boost/test/tree/observer.hpp | 2
   trunk/boost/test/unit_test.hpp | 2
   trunk/boost/test/unit_test_log.hpp | 4
   trunk/boost/test/unit_test_log_formatter.hpp | 2
   trunk/boost/test/unit_test_monitor.hpp | 3
   trunk/boost/test/unit_test_suite.hpp | 71 +++---
   trunk/boost/test/unit_test_suite_impl.hpp | 86 +++----
   trunk/boost/test/utils/basic_cstring/basic_cstring.hpp | 22 +
   trunk/boost/test/utils/lazy_ostream.hpp | 8
   trunk/boost/test/utils/runtime/cla/argument_factory.hpp | 10
   trunk/boost/test/utils/runtime/env/environment.hpp | 3
   39 files changed, 294 insertions(+), 788 deletions(-)

Deleted: trunk/boost/test/auto_unit_test.hpp
==============================================================================
--- trunk/boost/test/auto_unit_test.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
+++ (empty file)
@@ -1,20 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001-2010.
-// 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 : deprecated
-// ***************************************************************************
-
-#ifndef BOOST_TEST_AUTO_UNIT_TEST_HPP_071894GER
-#define BOOST_TEST_AUTO_UNIT_TEST_HPP_071894GER
-
-#include <boost/test/unit_test.hpp>
-
-#endif // BOOST_TEST_AUTO_UNIT_TEST_HPP_071894GER

Modified: trunk/boost/test/debug.hpp
==============================================================================
--- trunk/boost/test/debug.hpp (original)
+++ trunk/boost/test/debug.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2006-2010.
+// (C) Copyright Gennadiy Rozental 2006-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)
@@ -17,9 +17,11 @@
 
 // Boost.Test
 #include <boost/test/detail/config.hpp>
-#include <boost/test/utils/callback.hpp>
 #include <boost/test/utils/basic_cstring/basic_cstring.hpp>
 
+// Boost
+#include <boost/function/function1.hpp>
+
 // STL
 #include <string>
 
@@ -56,7 +58,7 @@
     unit_test::const_string init_done_lock;
 };
 
-typedef unit_test::callback1<dbg_startup_info const&> dbg_starter;
+typedef boost::function<void (dbg_startup_info const&)> dbg_starter;
 
 // ************************************************************************** //
 // ************** debugger setup ************** //

Modified: trunk/boost/test/debug_config.hpp
==============================================================================
--- trunk/boost/test/debug_config.hpp (original)
+++ trunk/boost/test/debug_config.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2006-2010.
+// (C) Copyright Gennadiy Rozental 2006-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)

Modified: trunk/boost/test/detail/config.hpp
==============================================================================
--- trunk/boost/test/detail/config.hpp (original)
+++ trunk/boost/test/detail/config.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -85,6 +85,12 @@
 
 //____________________________________________________________________________//
 
+#if !defined(__BORLANDC__) && !BOOST_WORKAROUND( BOOST_MSVC, < 1300 ) && !BOOST_WORKAROUND( __SUNPRO_CC, < 0x5100 )
+#define BOOST_TEST_SUPPORT_TOKEN_ITERATOR 1
+#endif
+
+//____________________________________________________________________________//
+
 #if defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_TEST_DYN_LINK)
 # define BOOST_TEST_DYN_LINK
 #endif

Deleted: trunk/boost/test/exception_safety.hpp
==============================================================================
--- trunk/boost/test/exception_safety.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
+++ (empty file)
@@ -1,191 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2005-2010.
-// 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 : Facilities to perform exception safety tests
-// ***************************************************************************
-
-#ifndef BOOST_TEST_EXCEPTION_SAFETY_HPP_111705GER
-#define BOOST_TEST_EXCEPTION_SAFETY_HPP_111705GER
-
-// Boost.Test
-#include <boost/test/detail/config.hpp>
-
-#include <boost/test/utils/callback.hpp>
-#include <boost/test/utils/basic_cstring/basic_cstring.hpp>
-#include <boost/test/unit_test_suite.hpp>
-
-// Boost
-#include <boost/bind.hpp>
-
-// STL
-#include <memory>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** BOOST_TEST_EXCEPTION_SAFETY ************** //
-// ************************************************************************** //
-
-#define BOOST_TEST_EXCEPTION_SAFETY( test_name ) \
-struct test_name : public BOOST_AUTO_TEST_CASE_FIXTURE \
-{ void test_method(); }; \
- \
-static void BOOST_AUTO_TC_INVOKER( test_name )() \
-{ \
- test_name t; \
- ::boost::itest::exception_safety( \
- boost::bind( &test_name::test_method, t ), \
- BOOST_STRINGIZE(test_name) ); \
-} \
- \
-struct BOOST_AUTO_TC_UNIQUE_ID( test_name ) {}; \
- \
-BOOST_AUTO_TU_REGISTRAR( test_name )( \
- boost::unit_test::make_test_case( \
- &BOOST_AUTO_TC_INVOKER( test_name ), #test_name ), \
- boost::unit_test::ut_detail::auto_tc_exp_fail< \
- BOOST_AUTO_TC_UNIQUE_ID( test_name )>::instance()->value() ); \
- \
-void test_name::test_method() \
-/**/
-
-namespace boost {
-
-namespace itest {
-
-// ************************************************************************** //
-// ************** exception safety test ************** //
-// ************************************************************************** //
-
-void BOOST_TEST_DECL exception_safety( unit_test::callback0<> const& F,
- unit_test::const_string test_name = "" );
-
-} // namespace itest
-
-} // namespace boost
-
-// ************************************************************************** //
-// ************** global operator new/delete overloads ************** //
-// ************************************************************************** //
-
-#ifndef BOOST_ITEST_NO_NEW_OVERLOADS
-
-#include <boost/test/interaction_based.hpp>
-
-# ifdef BOOST_NO_STDC_NAMESPACE
-namespace std { using ::isprint; using ::malloc; using ::free; }
-# endif
-
-inline void*
-operator new( std::size_t s ) throw(std::bad_alloc)
-{
- void* res = std::malloc(s ? s : 1);
-
- if( res )
- ::boost::itest::manager::instance().allocated( 0, 0, res, s );
- else
- throw std::bad_alloc();
-
- return res;
-}
-
-//____________________________________________________________________________//
-
-inline void*
-operator new( std::size_t s, std::nothrow_t const& ) throw()
-{
- void* res = std::malloc(s ? s : 1);
-
- if( res )
- ::boost::itest::manager::instance().allocated( 0, 0, res, s );
-
- return res;
-}
-
-//____________________________________________________________________________//
-
-inline void*
-operator new[]( std::size_t s ) throw(std::bad_alloc)
-{
- void* res = std::malloc(s ? s : 1);
-
- if( res )
- ::boost::itest::manager::instance().allocated( 0, 0, res, s );
- else
- throw std::bad_alloc();
-
- return res;
-}
-
-//____________________________________________________________________________//
-
-inline void*
-operator new[]( std::size_t s, std::nothrow_t const& ) throw()
-{
- void* res = std::malloc(s ? s : 1);
-
- if( res )
- ::boost::itest::manager::instance().allocated( 0, 0, res, s );
-
- return res;
-}
-
-//____________________________________________________________________________//
-
-inline void
-operator delete( void* p ) throw()
-{
- ::boost::itest::manager::instance().freed( p );
-
- std::free( p );
-}
-
-//____________________________________________________________________________//
-
-inline void
-operator delete( void* p, std::nothrow_t const& ) throw()
-{
- ::boost::itest::manager::instance().freed( p );
-
- std::free( p );
-}
-
-//____________________________________________________________________________//
-
-inline void
-operator delete[]( void* p ) throw()
-{
- ::boost::itest::manager::instance().freed( p );
-
- std::free( p );
-}
-
-//____________________________________________________________________________//
-
-inline void
-operator delete[]( void* p, std::nothrow_t const& ) throw()
-{
- ::boost::itest::manager::instance().freed( p );
-
- std::free( p );
-}
-
-//____________________________________________________________________________//
-
-#endif // BOOST_ITEST_NO_NEW_OVERLOADS
-
-//____________________________________________________________________________//
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_EXCEPTION_SAFETY_HPP_111705GER

Modified: trunk/boost/test/execution_monitor.hpp
==============================================================================
--- trunk/boost/test/execution_monitor.hpp (original)
+++ trunk/boost/test/execution_monitor.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2001-2010.
+// (C) Copyright Gennadiy Rozental 2001-2011.
 // (C) Copyright Beman Dawes 2001.
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt or copy at
@@ -35,7 +35,6 @@
 // Boost.Test
 #include <boost/test/detail/global_typedef.hpp>
 #include <boost/test/detail/fwd_decl.hpp>
-#include <boost/test/utils/callback.hpp>
 #include <boost/test/utils/class_properties.hpp>
 
 // Boost
@@ -43,6 +42,7 @@
 #include <boost/scoped_array.hpp>
 #include <boost/type.hpp>
 #include <boost/cstdlib.hpp>
+#include <boost/function/function0.hpp>
 
 #include <boost/test/detail/suppress_warnings.hpp>
 
@@ -103,7 +103,7 @@
     // Constructor
     translator_holder_base( translator_holder_base_ptr next, const_string tag )
     : m_next( next )
- , m_tag( tag.begin(), tag.end() )
+ , m_tag( std::string() + tag )
     {
     }
 
@@ -112,7 +112,8 @@
 
     // translator holder interface
     // invokes the function F inside the try/catch guarding against specific exception
- virtual int operator()( unit_test::callback0<int> const& F ) = 0;
+ virtual int operator()( boost::function<int ()> const& F ) = 0;
+
     // erases specific translator holder from the chain
     translator_holder_base_ptr erase( translator_holder_base_ptr this_, const_string tag )
     {
@@ -234,7 +235,7 @@
     // try to detect hardware floating point exceptions (!= 0), and which specific exception to catch
     unit_test::readwrite_property<unsigned> p_detect_fp_exceptions;
 
- int execute( unit_test::callback0<int> const& F );
+ int execute( boost::function<int ()> const& F );
     // Returns: Value returned by function call F().
     //
     // Effects: Calls executes supplied function F inside a try/catch block which also may
@@ -244,6 +245,9 @@
     // a hardware or software signal, trap, or other exception.
     //
     // Note: execute() doesn't consider it an error for F to return a non-zero value.
+
+ void vexecute( boost::function<void ()> const& F );
+ // Effects: Same as above, but returns nothing
     
     // register custom (user supplied) exception translator
     template<typename ExceptionType, typename ExceptionTranslator>
@@ -262,7 +266,7 @@
 
 private:
     // implementation helpers
- int catch_signals( unit_test::callback0<int> const& F );
+ int catch_signals( boost::function<int ()> const& F );
 
     // Data members
     detail::translator_holder_base_ptr m_custom_translators;
@@ -283,7 +287,7 @@
     : translator_holder_base( next, tag ), m_translator( tr ) {}
 
     // translator holder interface
- virtual int operator()( unit_test::callback0<int> const& F )
+ virtual int operator()( boost::function<int ()> const& F )
     {
         try {
             return m_next ? (*m_next)( F ) : F();

Deleted: trunk/boost/test/floating_point_comparison.hpp
==============================================================================
--- trunk/boost/test/floating_point_comparison.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
+++ (empty file)
@@ -1,339 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001-2010.
-// 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 algoirthms for comparing 2 floating point values
-// ***************************************************************************
-
-#ifndef BOOST_TEST_FLOATING_POINT_COMPARISON_HPP_071894GER
-#define BOOST_TEST_FLOATING_POINT_COMPARISON_HPP_071894GER
-
-// Boost.Test
-#include <boost/test/detail/global_typedef.hpp>
-#include <boost/test/predicate_result.hpp>
-
-// Boost
-#include <boost/limits.hpp> // for std::numeric_limits
-#include <boost/numeric/conversion/conversion_traits.hpp> // for numeric::conversion_traits
-#include <boost/static_assert.hpp>
-#include <boost/assert.hpp>
-
-// STL
-#include <iosfwd>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-
-namespace math { namespace fpc {
-
-// ************************************************************************** //
-// ************** fpc::strength ************** //
-// ************************************************************************** //
-
-enum strength {
- FPC_STRONG, // "Very close" - equation 1' in docs, the default
- FPC_WEAK // "Close enough" - equation 2' in docs.
-};
-
-// ************************************************************************** //
-// ************** details ************** //
-// ************************************************************************** //
-
-namespace fpc_detail {
-
-// FPT is Floating-Point Type: float, double, long double or User-Defined.
-template<typename FPT>
-inline FPT
-fpt_abs( FPT fpv )
-{
- return fpv < static_cast<FPT>(0) ? -fpv : fpv;
-}
-
-//____________________________________________________________________________//
-
-template<typename FPT>
-struct fpt_limits {
- static FPT min_value()
- {
- return std::numeric_limits<FPT>::is_specialized
- ? (std::numeric_limits<FPT>::min)()
- : 0;
- }
- static FPT max_value()
- {
- return std::numeric_limits<FPT>::is_specialized
- ? (std::numeric_limits<FPT>::max)()
- : static_cast<FPT>(1000000); // for the our purposes it doesn't really matter what value is returned here
- }
-};
-
-//____________________________________________________________________________//
-
-// both f1 and f2 are unsigned here
-template<typename FPT>
-inline FPT
-safe_fpt_division( FPT f1, FPT f2 )
-{
- // Avoid overflow.
- if( (f2 < static_cast<FPT>(1)) && (f1 > f2*fpt_limits<FPT>::max_value()) )
- return fpt_limits<FPT>::max_value();
-
- // Avoid underflow.
- if( (f1 == static_cast<FPT>(0)) ||
- ((f2 > static_cast<FPT>(1)) && (f1 < f2*fpt_limits<FPT>::min_value())) )
- return static_cast<FPT>(0);
-
- return f1/f2;
-}
-
-//____________________________________________________________________________//
-
-} // namespace fpc_detail
-
-// ************************************************************************** //
-// ************** tolerance presentation types ************** //
-// ************************************************************************** //
-
-template<typename ToleranceType>
-struct tolerance_traits {
- template<typename FPT>
- static ToleranceType actual_tolerance( FPT fraction_tolerance )
- {
- return static_cast<ToleranceType>( fraction_tolerance );
- }
- template<typename FPT>
- static FPT fraction_tolerance( ToleranceType tolerance )
- {
- return static_cast<FPT>(tolerance);
- }
-};
-
-//____________________________________________________________________________//
-
-template<typename FPT>
-struct percent_tolerance_t {
- explicit percent_tolerance_t( FPT v ) : m_value( v ) {}
-
- FPT m_value;
-};
-
-//____________________________________________________________________________//
-
-template<typename FPT>
-struct tolerance_traits<percent_tolerance_t<FPT> > {
- template<typename FPT2>
- static percent_tolerance_t<FPT> actual_tolerance( FPT2 fraction_tolerance )
- {
- return percent_tolerance_t<FPT>( fraction_tolerance * static_cast<FPT2>(100.) );
- }
-
- template<typename FPT2>
- static FPT2 fraction_tolerance( percent_tolerance_t<FPT> tolerance )
- {
- return static_cast<FPT2>(tolerance.m_value)*static_cast<FPT2>(0.01);
- }
-};
-
-//____________________________________________________________________________//
-
-template<typename FPT>
-std::ostream& operator<<( std::ostream& out, percent_tolerance_t<FPT> t )
-{
- return out << t.m_value;
-}
-
-//____________________________________________________________________________//
-
-template<typename FPT>
-inline percent_tolerance_t<FPT>
-percent_tolerance( FPT v )
-{
- return percent_tolerance_t<FPT>( v );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** close_at_tolerance ************** //
-// ************************************************************************** //
-
-template<typename FPT>
-class close_at_tolerance {
-public:
- // Public typedefs
- typedef bool result_type;
-
- // Constructor
- template<typename ToleranceType>
- explicit close_at_tolerance( ToleranceType tolerance, fpc::strength fpc_strength = FPC_STRONG )
- : m_fraction_tolerance( tolerance_traits<ToleranceType>::template fraction_tolerance<FPT>( tolerance ) )
- , m_strength( fpc_strength )
- {
- BOOST_ASSERT( m_fraction_tolerance >= 0 ); // no reason for tolerance to be negative
- }
-
- // Access methods
- FPT fraction_tolerance() const { return m_fraction_tolerance; }
- fpc::strength strength() const { return m_strength; }
- FPT failed_fraction() const { return m_failed_fraction; }
-
- // Action method
- bool operator()( FPT left, FPT right ) const
- {
- FPT diff = fpc_detail::fpt_abs( left - right );
- FPT fraction_of_right = fpc_detail::safe_fpt_division( diff, fpc_detail::fpt_abs( right ) );
- FPT fraction_of_left = fpc_detail::safe_fpt_division( diff, fpc_detail::fpt_abs( left ) );
-
- bool res( m_strength == FPC_STRONG
- ? (fraction_of_right <= m_fraction_tolerance && fraction_of_left <= m_fraction_tolerance)
- : (fraction_of_right <= m_fraction_tolerance || fraction_of_left <= m_fraction_tolerance) );
-
- if( !res )
- m_failed_fraction = (fraction_of_right > m_fraction_tolerance ? fraction_of_right : fraction_of_left);
-
- return res;
- }
-
-private:
- // Data members
- FPT m_fraction_tolerance;
- fpc::strength m_strength;
- mutable FPT m_failed_fraction;
-};
-
-// ************************************************************************** //
-// ************** is_close_to ************** //
-// ************************************************************************** //
-
-template<typename FPT1, typename FPT2, typename ToleranceType>
-bool
-is_close_to( FPT1 left, FPT2 right, ToleranceType tolerance )
-{
- // deduce "better" type from types of arguments being compared
- // if one type is floating and the second integral we use floating type and
- // value of integral type is promoted to the floating. The same for float and double
- // But we don't want to compare two values of integral types using this tool.
- typedef typename numeric::conversion_traits<FPT1,FPT2>::supertype FPT;
- BOOST_STATIC_ASSERT( !is_integral<FPT>::value );
-
- return fpc::close_at_tolerance<FPT>( tolerance, FPC_STRONG )( left, right );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** close_at_tolerance ************** //
-// ************************************************************************** //
-
-template<typename FPT>
-class small_with_tolerance {
-public:
- // Public typedefs
- typedef bool result_type;
-
- // Constructor
- explicit small_with_tolerance( FPT tolerance )
- : m_tolerance( tolerance )
- {
- BOOST_ASSERT( m_tolerance >= 0 ); // no reason for the tolerance to be negative
- }
-
- // Action method
- bool operator()( FPT fpv ) const
- {
- return fpc::fpc_detail::fpt_abs( fpv ) < m_tolerance;
- }
-
-private:
- // Data members
- FPT m_tolerance;
-};
-
-// ************************************************************************** //
-// ************** is_small ************** //
-// ************************************************************************** //
-
-template<typename FPT>
-bool
-is_small( FPT fpv, FPT tolerance )
-{
- return small_with_tolerance<FPT>( tolerance )( fpv );
-}
-
-//____________________________________________________________________________//
-
-} // namespace fpc
-} // namespace math
-
-namespace test_tools {
-
-namespace fpc = math::fpc;
-
-// ************************************************************************** //
-// ************** check_is_close ************** //
-// ************************************************************************** //
-
-struct BOOST_TEST_DECL check_is_close_t {
- // Public typedefs
- typedef bool result_type;
-
- template<typename FPT1, typename FPT2, typename ToleranceType>
- predicate_result
- operator()( FPT1 left, FPT2 right, ToleranceType tolerance ) const
- {
- predicate_result pr( fpc::is_close_to( left, right, tolerance ) );
-
- if( !pr )
- pr.message() << tolerance;
-
- return pr;
- }
-};
-
-namespace {
-check_is_close_t const& check_is_close = unit_test::ut_detail::static_constant<check_is_close_t>::value;
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** check_is_small ************** //
-// ************************************************************************** //
-
-struct BOOST_TEST_DECL check_is_small_t {
- // Public typedefs
- typedef bool result_type;
-
- template<typename FPT>
- bool
- operator()( FPT fpv, FPT tolerance ) const
- {
- return fpc::is_small( fpv, tolerance );
- }
-};
-
-namespace {
-check_is_small_t const& check_is_small = unit_test::ut_detail::static_constant<check_is_small_t>::value;
-}
-
-//____________________________________________________________________________//
-
-} // namespace test_tools
-
-} // namespace boost
-
-//____________________________________________________________________________//
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_FLOATING_POINT_COMAPARISON_HPP_071894GER

Modified: trunk/boost/test/framework.hpp
==============================================================================
--- trunk/boost/test/framework.hpp (original)
+++ trunk/boost/test/framework.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2005-2010.
+// (C) Copyright Gennadiy Rozental 2005-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)
@@ -20,7 +20,6 @@
 #include <boost/test/detail/fwd_decl.hpp>
 #include <boost/test/utils/trivial_singleton.hpp>
 
-
 #include <boost/test/detail/suppress_warnings.hpp>
 
 // STL
@@ -105,7 +104,7 @@
 
 namespace impl { // publisized to facilitate internal unit test only
 
-void apply_filters( test_unit_id );
+void apply_filters( test_unit_id );
 
 } // namespace impl
 

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-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -46,13 +46,13 @@
     , m_argc( argc )
     , m_argv( argv ) {}
     
- int operator()() { return (*m_cpp_main_func)( m_argc, m_argv ); }
+ int operator()() { return (*m_cpp_main_func)( m_argc, m_argv ); }
   
 private:
     // Data members
- int (*m_cpp_main_func)( int argc, char* argv[] );
- int m_argc;
- char** m_argv;
+ int (*m_cpp_main_func)( int argc, char* argv[] );
+ int m_argc;
+ char** m_argv;
 };
 
 } // local namespace
@@ -74,8 +74,7 @@
 
         ex_mon.p_catch_system_errors.value = p != "no";
         
- result = ex_mon.execute(
- ::boost::unit_test::callback0<int>( cpp_main_caller( cpp_main, argc, argv ) ) );
+ result = ex_mon.execute( cpp_main_caller( cpp_main, argc, argv ) );
         
         if( result == 0 )
             result = ::boost::exit_success;

Added: 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-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -23,21 +23,21 @@
 #include <boost/test/detail/global_typedef.hpp>
 #include <boost/test/detail/unit_test_parameters.hpp>
 
-#include <boost/test/utils/callback.hpp>
 #include <boost/test/utils/wrap_stringstream.hpp>
 #include <boost/test/utils/iterator/token_iterator.hpp>
 
-#include <boost/test/interaction_based.hpp>
+#include <boost/test/interaction/interaction_based.hpp>
 #include <boost/test/test_tools.hpp>
 #include <boost/test/unit_test_log.hpp>
 #include <boost/test/framework.hpp>
-#include <boost/test/test_observer.hpp>
+#include <boost/test/tree/observer.hpp>
 #include <boost/test/debug.hpp>
 
 #include <boost/test/detail/suppress_warnings.hpp>
 
 // Boost
 #include <boost/lexical_cast.hpp>
+#include <boost/function/function0.hpp>
 
 // STL
 #include <vector>
@@ -509,7 +509,7 @@
 // ************************************************************************** //
 
 void BOOST_TEST_DECL
-exception_safety( callback0<> const& F, const_string test_name )
+exception_safety( boost::function<void ()> const& F, const_string test_name )
 {
     exception_safety_tester est( test_name );
 

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-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -791,7 +791,7 @@
 // ************************************************************************** //
 
 int
-execution_monitor::catch_signals( unit_test::callback0<int> const& F )
+execution_monitor::catch_signals( boost::function<int ()> const& F )
 {
     using namespace detail;
 
@@ -1071,7 +1071,7 @@
 // ************************************************************************** //
 
 int
-execution_monitor::catch_signals( unit_test::callback0<int> const& F )
+execution_monitor::catch_signals( boost::function<int ()> const& F )
 {
     _invalid_parameter_handler old_iph = _invalid_parameter_handler();
     BOOST_TEST_CRT_HOOK_TYPE old_crt_hook = 0;
@@ -1124,7 +1124,7 @@
 } // namespace detail
 
 int
-execution_monitor::catch_signals( unit_test::callback0<int> const& F )
+execution_monitor::catch_signals( boost::function<int ()> const& F )
 {
     return detail::do_invoke( m_custom_translators , F );
 }
@@ -1148,7 +1148,7 @@
 //____________________________________________________________________________//
 
 int
-execution_monitor::execute( unit_test::callback0<int> const& F )
+execution_monitor::execute( boost::function<int ()> const& F )
 {
     if( debug::under_debugger() )
         p_catch_system_errors.value = false;
@@ -1273,6 +1273,20 @@
 
 //____________________________________________________________________________//
 
+void
+execution_monitor::vexecute( boost::function<void ()> const& F )
+{
+ struct forward {
+ explicit forward( boost::function<void ()> const& F ) : m_F( F ) {}
+
+ int operator()() { m_F(); return 0; }
+
+ boost::function<void ()> const& m_F;
+ };
+
+ execute( forward( F ) );
+}
+
 // ************************************************************************** //
 // ************** system_error ************** //
 // ************************************************************************** //

Modified: trunk/boost/test/impl/framework.ipp
==============================================================================
--- trunk/boost/test/impl/framework.ipp (original)
+++ trunk/boost/test/impl/framework.ipp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -22,14 +22,13 @@
 #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/test_observer.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>
 
-#if !defined(__BORLANDC__) && !BOOST_WORKAROUND( BOOST_MSVC, < 1300 ) && !BOOST_WORKAROUND( __SUNPRO_CC, < 0x5100 )
-#define BOOST_TEST_SUPPORT_RUN_BY_NAME
+#if BOOST_TEST_SUPPORT_TOKEN_ITERATOR
 #include <boost/test/utils/iterator/token_iterator.hpp>
 #endif
 
@@ -61,33 +60,13 @@
 namespace unit_test {
 
 // ************************************************************************** //
-// ************** test_start calls wrapper ************** //
+// ************** test_init call wrapper ************** //
 // ************************************************************************** //
 
 namespace ut_detail {
 
-struct test_start_caller {
- test_start_caller( test_observer* to, counter_t tc_amount )
- : m_to( to )
- , m_tc_amount( tc_amount )
- {}
-
- int operator()()
- {
- m_to->test_start( m_tc_amount );
- return 0;
- }
-
-private:
- // Data members
- test_observer* m_to;
- counter_t m_tc_amount;
-};
-
-//____________________________________________________________________________//
-
-struct test_init_caller {
- explicit test_init_caller( init_unit_test_func init_func )
+struct test_init_invoker {
+ explicit test_init_invoker( init_unit_test_func init_func )
     : m_init_func( init_func )
     {}
     int operator()()
@@ -109,20 +88,6 @@
 };
 
 // ************************************************************************** //
-// ************** tu_enabler ************** //
-// ************************************************************************** //
-
-struct tu_enabler : public test_tree_visitor {
- explicit tu_enabler( bool on_off ) : m_on_off( on_off ) {}
-private:
- virtual void visit( test_case const& tc ) { tc.p_enabled.value = m_on_off; }
- virtual bool test_suite_start( test_suite const& ts ) { ts.p_enabled.value = m_on_off; return true; }
-
- // Data members
- bool m_on_off;
-};
-
-// ************************************************************************** //
 // ************** name_filter ************** //
 // ************************************************************************** //
 
@@ -180,7 +145,7 @@
     // Constructor
     name_filter( tu_enable_list& tu_to_enable, const_string tc_to_run ) : m_tu_to_enable( tu_to_enable ), m_depth( 0 )
     {
-#ifdef BOOST_TEST_SUPPORT_RUN_BY_NAME
+#ifdef BOOST_TEST_SUPPORT_TOKEN_ITERATOR
         string_token_iterator tit( tc_to_run, (dropped_delimeters = "/", kept_delimeters = dt_none) );
 
         while( tit != string_token_iterator() ) {
@@ -246,21 +211,12 @@
     {}
 
 private:
- bool filter_unit( test_unit const& tu )
- {
- return tu.has_label( m_label );
- }
-
     // test_tree_visitor interface
- virtual void visit( test_case const& tc )
+ virtual bool visit( test_unit const& tu )
     {
- if( filter_unit( tc ) )
- m_tu_to_enable.push_back( std::make_pair( tc.p_id, false ) ); // found a test case; add it to enable list without children
- }
- virtual bool test_suite_start( test_suite const& ts )
- {
- if( filter_unit( ts ) ) {
- m_tu_to_enable.push_back( std::make_pair( ts.p_id, true ) ); // found a test suite; add it to enable list with children and stop recursion
+ if( tu.has_label( m_label ) ) {
+ // found a test unit; add it to list of tu to enable with children and stop recursion in case of suites
+ m_tu_to_enable.push_back( std::make_pair( tu.p_id, tu.p_type == tut_suite ) );
             return false;
         }
 
@@ -268,29 +224,40 @@
     }
 
     // Data members
- const_string m_label;
     tu_enable_list& m_tu_to_enable;
+ const_string m_label;
 };
 
 // ************************************************************************** //
-// ************** tu_collector ************** //
+// ************** change_status ************** //
 // ************************************************************************** //
 
-class tu_collector : public test_tree_visitor {
+class change_status : public test_tree_visitor {
 public:
- explicit tu_collector( tu_enable_list& tu_to_enable ) : m_tu_to_enable( tu_to_enable ) {}
+ explicit change_status( bool enable_or_disable ) : m_new_status( enable_or_disable ) {}
 
 private:
     // test_tree_visitor interface
- virtual void visit( test_case const& tc )
- {
- if( !tc.p_enabled )
- m_tu_to_enable.push_back( std::make_pair( tc.p_id, false ) );
- }
- virtual bool test_suite_start( test_suite const& ts )
+ virtual bool visit( test_unit const& tu ) { tu.p_enabled.value = m_new_status; return true; }
+
+ // Data members
+ 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( !ts.p_enabled )
- m_tu_to_enable.push_back( std::make_pair( ts.p_id, false ) );
+ if( !tu.p_enabled )
+ m_tu_to_enable.push_back( std::make_pair( tu.p_id, false ) );
 
         return true;
     }
@@ -299,6 +266,22 @@
     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 +343,6 @@
 
         unsigned long elapsed = static_cast<unsigned long>( tc_timer.elapsed() * 1e6 );
 
-
         // notify all observers about abortion
         if( unit_test_monitor.is_critical_error( run_result ) ) {
             BOOST_TEST_FOREACH( test_observer*, to, m_observers )
@@ -487,7 +469,7 @@
     try {
         boost::execution_monitor em;
 
- ut_detail::test_init_caller tic( init_func );
+ ut_detail::test_init_invoker tic( init_func );
 
         em.execute( tic );
     }
@@ -495,6 +477,9 @@
         throw setup_error( ex.what() );
     }
 
+ ut_detail::apply_decorators ad;
+ traverse_test_tree( master_test_suite().p_id, ad, true );
+
     impl::apply_filters( master_test_suite().p_id );
 
     s_frk_impl().m_is_initialized = true;
@@ -507,14 +492,14 @@
 apply_filters( test_unit_id tu_id )
 {
     if( runtime_config::test_to_run().empty() ) {
- ut_detail::tu_enabler enable( true );
-
- traverse_test_tree( tu_id, enable );
+ // enable all test units for this run
+ ut_detail::change_status enabler( true );
+ traverse_test_tree( tu_id, enabler, true );
     }
     else {
- // 10. first disable all tu
- ut_detail::tu_enabler disable( false );
- traverse_test_tree( tu_id, disable );
+ // 10. First disable all test units. We'll re-enable only those that pass the filters
+ ut_detail::change_status disabler( false );
+ traverse_test_tree( tu_id, disabler, true );
 
         // 20. collect tu to enable based on filters
         ut_detail::tu_enable_list tu_to_enable;
@@ -568,17 +553,17 @@
 
             // 35. add all children to the list recursively
             if( data.second && tu.p_type == tut_suite ) {
- ut_detail::tu_collector collect( tu_to_enable );
- traverse_test_tree( tu.p_id, collect, true );
+ ut_detail::collect_disabled V( tu_to_enable );
+ traverse_test_tree( tu.p_id, V, true );
             }
         }
     }
 }
 
-} // namespace impl
-
 //____________________________________________________________________________//
 
+} // namespace impl
+
 bool
 is_initialized()
 {
@@ -787,7 +772,7 @@
             boost::execution_monitor em;
 
             try {
- em.execute( ut_detail::test_start_caller( to, tcc.p_count ) );
+ em.vexecute( boost::bind( &test_observer::test_start, to, tcc.p_count ) );
             }
             catch( execution_exception const& ex ) {
                 throw setup_error( ex.what() );

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-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -22,9 +22,8 @@
 
 // Boost.Test
 #include <boost/test/detail/config.hpp>
-#include <boost/test/utils/callback.hpp>
-#include <boost/test/interaction_based.hpp>
-#include <boost/test/mock_object.hpp>
+#include <boost/test/interaction/interaction_based.hpp>
+#include <boost/test/interaction/mock_object.hpp>
 #include <boost/test/framework.hpp> // for setup_error
 
 #include <boost/test/detail/suppress_warnings.hpp>

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-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -22,16 +22,16 @@
 
 #include <boost/test/detail/global_typedef.hpp>
 
-#include <boost/test/utils/callback.hpp>
 #include <boost/test/utils/iterator/token_iterator.hpp>
 
-#include <boost/test/interaction_based.hpp>
+#include <boost/test/interaction/interaction_based.hpp>
 #include <boost/test/test_tools.hpp>
 
 #include <boost/test/detail/suppress_warnings.hpp>
 
 // Boost
 #include <boost/lexical_cast.hpp>
+#include <boost/function/function0.hpp>
 
 // STL
 #include <fstream>
@@ -224,7 +224,7 @@
 // ************************************************************************** //
 
 void BOOST_TEST_DECL
-logged_expectations( callback0<> const& F, const_string log_file_name, bool test_or_log )
+logged_expectations( boost::function<void ()> const& F, const_string log_file_name, bool test_or_log )
 {
     expectations_logger el( log_file_name, test_or_log );
 

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-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -18,7 +18,7 @@
 // Boost.Test
 #include <boost/test/test_tools.hpp>
 #include <boost/test/unit_test_log.hpp>
-#include <boost/test/output_test_stream.hpp>
+#include <boost/test/tools/output_test_stream.hpp>
 #include <boost/test/framework.hpp>
 #include <boost/test/execution_monitor.hpp> // execution_aborted
 #include <boost/test/unit_test_suite_impl.hpp>

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-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -32,26 +32,6 @@
 
 namespace unit_test {
 
-namespace {
-
-template<typename F>
-struct zero_return_wrapper_t {
- explicit zero_return_wrapper_t( F const& f ) : m_f( f ) {}
-
- int operator()() { m_f(); return 0; }
-
- F const& m_f;
-};
-
-template<typename F>
-zero_return_wrapper_t<F>
-zero_return_wrapper( F const& f )
-{
- return zero_return_wrapper_t<F>( f );
-}
-
-}
-
 // ************************************************************************** //
 // ************** unit_test_monitor ************** //
 // ************************************************************************** //
@@ -66,7 +46,7 @@
         p_use_alt_stack.value = runtime_config::use_alt_stack();
         p_detect_fp_exceptions.value = runtime_config::detect_fp_exceptions();
 
- execute( callback0<int>( zero_return_wrapper( tc.test_func() ) ) );
+ vexecute( tc.p_test_func );
     }
     catch( execution_exception const& ex ) {
         framework::exception_caught( ex );

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-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -102,7 +102,7 @@
 void
 test_unit::add_label( const_string l )
 {
- m_labels.push_back( std::string( l.begin(), l.end() ) );
+ m_labels.push_back( std::string() + l );
 }
 
 //____________________________________________________________________________//
@@ -119,14 +119,10 @@
 // ************** test_case ************** //
 // ************************************************************************** //
 
-test_case::test_case( const_string name, callback0<> const& test_func )
+test_case::test_case( const_string name, boost::function<void ()> const& test_func )
 : test_unit( name, static_cast<test_unit_type>(type) )
-, m_test_func( test_func )
+, p_test_func( test_func )
 {
- // !! weirdest MSVC BUG; try to remove this statement; looks like it eats first token of next statement
-#if BOOST_WORKAROUND(BOOST_MSVC,<1300)
- 0;
-#endif
     framework::register_test_unit( this );
 }
 
@@ -155,7 +151,7 @@
     m_members.push_back( tu->p_id );
     tu->p_parent_id.value = p_id;
 
- if( tu->p_expected_failures )
+ if( tu->p_expected_failures != 0 )
         increase_exp_fail( tu->p_expected_failures );
 
     if( expected_failures )
@@ -214,7 +210,7 @@
 void
 traverse_test_tree( test_suite const& suite, test_tree_visitor& V, bool ignore_status )
 {
- if( (!suite.p_enabled && !ignore_status) || !V.test_suite_start( suite ) )
+ if( (!ignore_status && !suite.p_enabled) || !V.test_suite_start( suite ) )
         return;
 
     try {
@@ -253,19 +249,6 @@
 //____________________________________________________________________________//
 
 // ************************************************************************** //
-// ************** test_case_counter ************** //
-// ************************************************************************** //
-
-void
-test_case_counter::visit( test_case const& tc )
-{
- if( tc.p_enabled )
- ++p_count.value;
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
 // ************** object generators ************** //
 // ************************************************************************** //
 
@@ -285,21 +268,24 @@
 // ************** auto_test_unit_registrar ************** //
 // ************************************************************************** //
 
-auto_test_unit_registrar::auto_test_unit_registrar( test_case* tc, counter_t exp_fail )
+auto_test_unit_registrar::auto_test_unit_registrar( test_case* tc, decorator::collector* decorators, counter_t exp_fail )
 {
     curr_ts_store().back()->add( tc, exp_fail );
+
+ if( decorators )
+ decorators->store_in( *tc );
 }
 
 //____________________________________________________________________________//
 
-auto_test_unit_registrar::auto_test_unit_registrar( const_string ts_name )
+auto_test_unit_registrar::auto_test_unit_registrar( const_string ts_name, decorator::collector* decorators )
 {
     test_unit_id id = curr_ts_store().back()->get( ts_name );
 
     test_suite* ts;
 
     if( id != INV_TEST_UNIT_ID ) {
- ts = &framework::get<test_suite>( id ); // !! test for invalid tu type
+ ts = &framework::get<test_suite>( id );
         BOOST_ASSERT( ts->p_parent_id == curr_ts_store().back()->p_id );
     }
     else {
@@ -307,14 +293,21 @@
         curr_ts_store().back()->add( ts );
     }
 
+ if( decorators )
+ decorators->store_in( *ts );
+
     curr_ts_store().push_back( ts );
 }
 
 //____________________________________________________________________________//
 
-auto_test_unit_registrar::auto_test_unit_registrar( test_unit_generator const& tc_gen )
+auto_test_unit_registrar::auto_test_unit_registrar( test_unit_generator const& tc_gen, decorator::collector* decorators )
 {
     curr_ts_store().back()->add( tc_gen );
+
+ // !! ??if( decorators )
+ // decorators->apply( *tc );
+
 }
 
 //____________________________________________________________________________//
@@ -355,8 +348,6 @@
 
 } // namespace boost
 
-//____________________________________________________________________________//
-
 #include <boost/test/detail/enable_warnings.hpp>
 
 #endif // BOOST_TEST_UNIT_TEST_SUITE_IPP_012205GER

Deleted: trunk/boost/test/included/test_exec_monitor.hpp
==============================================================================
--- trunk/boost/test/included/test_exec_monitor.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
+++ (empty file)
@@ -1,39 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001-2010.
-// 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 : included (vs. linked) version of Test Execution Monitor
-// ***************************************************************************
-
-#ifndef BOOST_INCLUDED_TEST_EXEC_MONITOR_HPP_071894GER
-#define BOOST_INCLUDED_TEST_EXEC_MONITOR_HPP_071894GER
-
-#include <boost/test/impl/compiler_log_formatter.ipp>
-#include <boost/test/impl/debug.ipp>
-#include <boost/test/impl/execution_monitor.ipp>
-#include <boost/test/impl/framework.ipp>
-#include <boost/test/impl/plain_report_formatter.ipp>
-#include <boost/test/impl/progress_monitor.ipp>
-#include <boost/test/impl/results_collector.ipp>
-#include <boost/test/impl/results_reporter.ipp>
-#include <boost/test/impl/test_main.ipp>
-#include <boost/test/impl/test_tools.ipp>
-#include <boost/test/impl/unit_test_log.ipp>
-#include <boost/test/impl/unit_test_main.ipp>
-#include <boost/test/impl/unit_test_monitor.ipp>
-#include <boost/test/impl/unit_test_parameters.ipp>
-#include <boost/test/impl/unit_test_suite.ipp>
-#include <boost/test/impl/xml_log_formatter.ipp>
-#include <boost/test/impl/xml_report_formatter.ipp>
-
-#define BOOST_TEST_INCLUDED
-#include <boost/test/test_exec_monitor.hpp>
-
-#endif // BOOST_INCLUDED_TEST_EXEC_MONITOR_HPP_071894GER

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-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -17,6 +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/framework.ipp>
 #include <boost/test/impl/exception_safety.ipp>
 #include <boost/test/impl/execution_monitor.ipp>

Deleted: trunk/boost/test/included/unit_test_framework.hpp
==============================================================================
--- trunk/boost/test/included/unit_test_framework.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
+++ (empty file)
@@ -1,2 +0,0 @@
-// deprecated
-#include <boost/test/included/unit_test.hpp>

Copied: trunk/boost/test/interaction/exception_safety.hpp (from r74298, /trunk/boost/test/exception_safety.hpp)
==============================================================================
--- /trunk/boost/test/exception_safety.hpp (original)
+++ trunk/boost/test/interaction/exception_safety.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2005-2010.
+// (C) Copyright Gennadiy Rozental 2005-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)
@@ -18,12 +18,12 @@
 // Boost.Test
 #include <boost/test/detail/config.hpp>
 
-#include <boost/test/utils/callback.hpp>
 #include <boost/test/utils/basic_cstring/basic_cstring.hpp>
 #include <boost/test/unit_test_suite.hpp>
 
 // Boost
 #include <boost/bind.hpp>
+#include <boost/function/function0.hpp>
 
 // STL
 #include <memory>
@@ -53,8 +53,7 @@
 BOOST_AUTO_TU_REGISTRAR( test_name )( \
     boost::unit_test::make_test_case( \
         &BOOST_AUTO_TC_INVOKER( test_name ), #test_name ), \
- boost::unit_test::ut_detail::auto_tc_exp_fail< \
- BOOST_AUTO_TC_UNIQUE_ID( test_name )>::instance()->value() ); \
+ boost::unit_test::decorator::collector::instance() ); \
                                                                         \
 void test_name::test_method() \
 /**/
@@ -67,8 +66,7 @@
 // ************** exception safety test ************** //
 // ************************************************************************** //
 
-void BOOST_TEST_DECL exception_safety( unit_test::callback0<> const& F,
- unit_test::const_string test_name = "" );
+void BOOST_TEST_DECL exception_safety( boost::function<void ()> const& F, unit_test::const_string test_name = "" );
 
 } // namespace itest
 
@@ -80,7 +78,7 @@
 
 #ifndef BOOST_ITEST_NO_NEW_OVERLOADS
 
-#include <boost/test/interaction_based.hpp>
+#include <boost/test/interaction/interaction_based.hpp>
 
 # ifdef BOOST_NO_STDC_NAMESPACE
 namespace std { using ::isprint; using ::malloc; using ::free; }
@@ -184,8 +182,6 @@
 
 #endif // BOOST_ITEST_NO_NEW_OVERLOADS
 
-//____________________________________________________________________________//
-
 #include <boost/test/detail/enable_warnings.hpp>
 
 #endif // BOOST_TEST_EXCEPTION_SAFETY_HPP_111705GER

Copied: trunk/boost/test/interaction/interaction_based.hpp (from r74298, /trunk/boost/test/interaction_based.hpp)
==============================================================================
--- /trunk/boost/test/interaction_based.hpp (original)
+++ trunk/boost/test/interaction/interaction_based.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2005-2010.
+// (C) Copyright Gennadiy Rozental 2005-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)

Copied: trunk/boost/test/interaction/logged_expectations.hpp (from r74298, /trunk/boost/test/logged_expectations.hpp)
==============================================================================
--- /trunk/boost/test/logged_expectations.hpp (original)
+++ trunk/boost/test/interaction/logged_expectations.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2005-2010.
+// (C) Copyright Gennadiy Rozental 2005-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)
@@ -18,7 +18,9 @@
 // Boost.Test
 #include <boost/test/detail/config.hpp>
 #include <boost/test/detail/unit_test_parameters.hpp>
-#include <boost/test/utils/callback.hpp>
+
+// Boost
+#include <boost/function/function0.hpp>
 
 #include <boost/test/detail/suppress_warnings.hpp>
 
@@ -46,8 +48,7 @@
 BOOST_AUTO_TU_REGISTRAR( test_name )( \
     boost::unit_test::make_test_case( \
         &BOOST_AUTO_TC_INVOKER( test_name ), #test_name ), \
- boost::unit_test::ut_detail::auto_tc_exp_fail< \
- BOOST_AUTO_TC_UNIQUE_ID( test_name )>::instance()->value() ); \
+ boost::unit_test::decorator::collector::instance() ); \
                                                                         \
 void test_name::test_method() \
 /**/
@@ -61,9 +62,7 @@
 // ************************************************************************** //
 
 void BOOST_TEST_DECL
-logged_expectations( unit_test::callback0<> const& F,
- unit_test::const_string log_file_name,
- bool test_or_log = true );
+logged_expectations( boost::function<void ()> const& F, unit_test::const_string log_file_name, bool test_or_log = true );
 
 } // namespace itest
 

Copied: trunk/boost/test/interaction/mock_object.hpp (from r74298, /trunk/boost/test/mock_object.hpp)
==============================================================================
--- /trunk/boost/test/mock_object.hpp (original)
+++ trunk/boost/test/interaction/mock_object.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2005-2010.
+// (C) Copyright Gennadiy Rozental 2005-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)
@@ -17,7 +17,7 @@
 
 // Boost.Test
 #include <boost/test/detail/config.hpp>
-#include <boost/test/interaction_based.hpp>
+#include <boost/test/interaction/interaction_based.hpp>
 
 // Boost
 #include <boost/preprocessor/punctuation/comma.hpp>

Deleted: trunk/boost/test/interaction_based.hpp
==============================================================================
--- trunk/boost/test/interaction_based.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
+++ (empty file)
@@ -1,262 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2005-2010.
-// 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 : Facilities to perform interaction-based testing
-// ***************************************************************************
-
-#ifndef BOOST_TEST_INTERACTION_BASED_HPP_112105GER
-#define BOOST_TEST_INTERACTION_BASED_HPP_112105GER
-
-// Boost.Test
-#include <boost/test/detail/config.hpp>
-#include <boost/test/detail/global_typedef.hpp>
-
-#include <boost/test/utils/wrap_stringstream.hpp>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-// Boost
-#include <boost/lexical_cast.hpp>
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** BOOST_ITEST_EPOINT ************** //
-// ************************************************************************** //
-
-#define BOOST_ITEST_EPOINT( description ) \
- ::boost::itest::manager::instance().exception_point( BOOST_TEST_L(__FILE__), __LINE__, description )
-/**/
-
-// ************************************************************************** //
-// ************** BOOST_ITEST_DPOINT ************** //
-// ************************************************************************** //
-
-#define BOOST_ITEST_DPOINT() \
- ::boost::itest::manager::instance().decision_point( BOOST_TEST_L(__FILE__), __LINE__ )
-/**/
-
-// ************************************************************************** //
-// ************** BOOST_ITEST_SCOPE ************** //
-// ************************************************************************** //
-
-#define BOOST_ITEST_SCOPE( scope_name ) \
- ::boost::itest::scope_guard itest_scope_guard ## __LINE__( BOOST_TEST_L(__FILE__), __LINE__, BOOST_STRINGIZE(scope_name) )
-/**/
-
-// ************************************************************************** //
-// ************** BOOST_ITEST_NEW ************** //
-// ************************************************************************** //
-
-#define BOOST_ITEST_NEW( type_name ) \
- new ( ::boost::itest::location( BOOST_TEST_L(__FILE__), __LINE__ ) ) type_name
-/**/
-
-// ************************************************************************** //
-// ************** BOOST_ITEST_DATA_FLOW ************** //
-// ************************************************************************** //
-
-#define BOOST_ITEST_DATA_FLOW( v ) \
- ::boost::itest::manager::instance().generic_data_flow( v )
-/**/
-
-// ************************************************************************** //
-// ************** BOOST_ITEST_RETURN ************** //
-// ************************************************************************** //
-
-#define BOOST_ITEST_RETURN( type, default_value ) \
- ::boost::itest::manager::instance().generic_return<type>( default_value )
-/**/
-
-// ************************************************************************** //
-// ************** BOOST_ITEST_MOCK_FUNC ************** //
-// ************************************************************************** //
-
-#define BOOST_ITEST_MOCK_FUNC( function_name ) \
- BOOST_ITEST_SCOPE( function_name ); \
- BOOST_ITEST_EPOINT( 0 ); \
- return ::boost::itest::mock_object<>::prototype(); \
-/**/
-
-namespace boost {
-
-namespace itest { // interaction-based testing
-
-using unit_test::const_string;
-
-// ************************************************************************** //
-// ************** manager ************** //
-// ************************************************************************** //
-
-class BOOST_TEST_DECL manager {
-public:
- // instance access
- static manager& instance() { return *instance_ptr(); }
-
- // Mock objects interface hooks
- virtual void exception_point( const_string /*file*/,
- std::size_t /*line_num*/,
- const_string /*descr*/ ){}
- virtual bool decision_point( const_string /*file*/,
- std::size_t /*line_num*/ ) { return true; }
- virtual unsigned enter_scope( const_string /*file*/,
- std::size_t /*line_num*/,
- const_string /*scope_name*/){ return 0; }
- virtual void leave_scope( unsigned ) {}
- virtual void allocated( const_string /*file*/,
- std::size_t /*line_num*/,
- void* /*p*/, std::size_t /*s*/ ) {}
- virtual void freed( void* /*p*/ ) {}
- virtual void data_flow( const_string /*d*/ ) {}
- virtual std::string return_value( const_string /*default_value */ ) { return ""; }
-
- template<typename T>
- void generic_data_flow( T const& t )
- {
- wrap_stringstream ws;
-
- data_flow( (ws << t).str() );
- }
- template<typename T, typename DefaultValueType>
- T generic_return( DefaultValueType const& dv )
- {
- wrap_stringstream ws;
-
- std::string const& res = return_value( (ws << dv).str() );
-
- if( res.empty() )
- return dv;
-
- return lexical_cast<T>( res );
- }
-
-protected:
- manager();
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
-public:
-#endif
- BOOST_TEST_PROTECTED_VIRTUAL ~manager();
-
-private:
- struct dummy_constr{};
- explicit manager( dummy_constr* ) {}
-
- static manager* instance_ptr( bool reset = false, manager* ptr = 0 );
-}; // manager
-
-// ************************************************************************** //
-// ************** scope_guard ************** //
-// ************************************************************************** //
-
-class scope_guard {
-public:
- // Constructor
- scope_guard( const_string file, std::size_t line_num, const_string scope_name )
- {
- m_scope_index = manager::instance().enter_scope( file, line_num, scope_name );
- }
- ~scope_guard()
- {
- manager::instance().leave_scope( m_scope_index );
- }
-
- unsigned m_scope_index;
-};
-
-// ************************************************************************** //
-// ************** location ************** //
-// ************************************************************************** //
-
-struct location {
- location( const_string file, std::size_t line )
- : m_file_name( file )
- , m_line_num( line )
- {}
-
- const_string m_file_name;
- std::size_t m_line_num;
-};
-
-} // namespace itest
-
-} // namespace boost
-
-// ************************************************************************** //
-// ************** operator new overload ************** //
-// ************************************************************************** //
-
-#if !defined(BOOST_ITEST_NO_NEW_OVERLOADS)
-
-// STL
-#include <cstdlib>
-
-# ifdef BOOST_NO_STDC_NAMESPACE
-namespace std { using ::malloc; using ::free; }
-# endif
-# ifdef _CRTDBG_MAP_ALLOC
-namespace std { using ::_malloc_dbg; using ::_free_dbg; }
-# endif
-
-inline void*
-operator new( std::size_t s, ::boost::itest::location const& l )
-{
- void* res = std::malloc(s ? s : 1);
-
- if( res )
- ::boost::itest::manager::instance().allocated( l.m_file_name, l.m_line_num, res, s );
- else
- throw std::bad_alloc();
-
- return res;
-}
-
-//____________________________________________________________________________//
-
-inline void*
-operator new[]( std::size_t s, ::boost::itest::location const& l )
-{
- void* res = std::malloc(s ? s : 1);
-
- if( res )
- ::boost::itest::manager::instance().allocated( l.m_file_name, l.m_line_num, res, s );
- else
- throw std::bad_alloc();
-
- return res;
-}
-
-//____________________________________________________________________________//
-
-inline void
-operator delete( void* p, ::boost::itest::location const& )
-{
- ::boost::itest::manager::instance().freed( p );
-
- std::free( p );
-}
-
-//____________________________________________________________________________//
-
-inline void
-operator delete[]( void* p, ::boost::itest::location const& )
-{
- ::boost::itest::manager::instance().freed( p );
-
- std::free( p );
-}
-
-//____________________________________________________________________________//
-
-#endif
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_INTERACTION_BASED_HPP_112105GER

Deleted: trunk/boost/test/logged_expectations.hpp
==============================================================================
--- trunk/boost/test/logged_expectations.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
+++ (empty file)
@@ -1,74 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2005-2010.
-// 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 : Facilities to perform interaction based testng of logged expectations
-// ***************************************************************************
-
-#ifndef BOOST_TEST_LOGGED_EXPECTATIONS_HPP_120905GER
-#define BOOST_TEST_LOGGED_EXPECTATIONS_HPP_120905GER
-
-// Boost.Test
-#include <boost/test/detail/config.hpp>
-#include <boost/test/detail/unit_test_parameters.hpp>
-#include <boost/test/utils/callback.hpp>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** BOOST_TEST_LOGGED_EXPECTATIONS ************** //
-// ************************************************************************** //
-
-#define BOOST_TEST_LOGGED_EXPECTATIONS( test_name ) \
-struct test_name : public BOOST_AUTO_TEST_CASE_FIXTURE \
-{ void test_method(); }; \
- \
-static void BOOST_AUTO_TC_INVOKER( test_name )() \
-{ \
- test_name t; \
- ::boost::itest::logged_expectations( \
- boost::bind( &test_name::test_method, t ), \
- BOOST_STRINGIZE(test_name) ".elog", \
- !::boost::unit_test::runtime_config::save_pattern() ); \
-} \
- \
-struct BOOST_AUTO_TC_UNIQUE_ID( test_name ) {}; \
- \
-BOOST_AUTO_TU_REGISTRAR( test_name )( \
- boost::unit_test::make_test_case( \
- &BOOST_AUTO_TC_INVOKER( test_name ), #test_name ), \
- boost::unit_test::ut_detail::auto_tc_exp_fail< \
- BOOST_AUTO_TC_UNIQUE_ID( test_name )>::instance()->value() ); \
- \
-void test_name::test_method() \
-/**/
-
-namespace boost {
-
-namespace itest {
-
-// ************************************************************************** //
-// ************** logged expectations test ************** //
-// ************************************************************************** //
-
-void BOOST_TEST_DECL
-logged_expectations( unit_test::callback0<> 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>
-
-#endif // BOOST_TEST_LOGGED_EXPECTATIONS_HPP_120905GER

Modified: trunk/boost/test/minimal.hpp
==============================================================================
--- trunk/boost/test/minimal.hpp (original)
+++ trunk/boost/test/minimal.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2002-2010.
+// (C) Copyright Gennadiy Rozental 2002-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)
@@ -118,9 +118,7 @@
     }
     catch( boost::execution_exception const& exex ) {
         if( exex.code() != boost::execution_exception::no_error )
- BOOST_ERROR( (std::string( "exception \"" ).
- append( exex.what().begin(), exex.what().end() ).
- append( "\" caught" ) ).c_str() );
+ BOOST_ERROR( (std::string( "exception \"" ) + exex.what() + "\" caught").c_str() );
         std::cerr << "\n**** Testing aborted.";
     }
 

Deleted: trunk/boost/test/mock_object.hpp
==============================================================================
--- trunk/boost/test/mock_object.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
+++ (empty file)
@@ -1,328 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2005-2010.
-// 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 : Facilities to perform exception safety_tests
-// ***************************************************************************
-
-#ifndef BOOST_TEST_MOCK_OBJECT_HPP_112205GER
-#define BOOST_TEST_MOCK_OBJECT_HPP_112205GER
-
-// Boost.Test
-#include <boost/test/detail/config.hpp>
-#include <boost/test/interaction_based.hpp>
-
-// Boost
-#include <boost/preprocessor/punctuation/comma.hpp>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-
-namespace itest {
-
-// ************************************************************************** //
-// ************** mock_object_base ************** //
-// ************************************************************************** //
-
-class mock_object_base {
-public:
- mock_object_base() {}
-
- template<typename T1>
- mock_object_base( T1 const& ) {}
-
- template<typename T1, typename T2>
- mock_object_base( T1 const&, T2 const& ) {}
-
- template<typename T1, typename T2, typename T3>
- mock_object_base( T1 const&, T2 const&, T3 const& ) {}
-
- template<typename T1, typename T2, typename T3, typename T4>
- mock_object_base( T1 const&, T2 const&, T3 const&, T4 const& ) {}
-
- template<typename T1, typename T2, typename T3, typename T4, typename T5>
- mock_object_base( T1 const&, T2 const&, T3 const&, T4 const&, T5 const& ) {}
-};
-
-// ************************************************************************** //
-// ************** mock_object implementation helpers ************** //
-// ************************************************************************** //
-
-#define MO_OP_IMPL( op, descr, ret ) \
- BOOST_ITEST_SCOPE( mock_object::operator op ); \
- BOOST_ITEST_EPOINT( descr ); \
- return ret \
-/**/
-
-#define MO_UNARY_OP( op, descr ) \
-self_type const& operator op() const \
-{ \
- MO_OP_IMPL( op, descr, prototype() ); \
-} \
-/**/
-
-#define MO_UNARY_BOOL_OP( op, descr ) \
-bool operator op() const \
-{ \
- MO_OP_IMPL( op, descr, (!!BOOST_ITEST_DPOINT()) ); \
-} \
-/**/
-
-#define MO_BINARY_OP( op, descr ) \
-template<int i1, typename Base1,int i2, typename Base2> \
-inline mock_object<i1,Base1> const& \
-operator op( mock_object<i1,Base1> const& mo, \
- mock_object<i2,Base2> const& ) \
-{ \
- MO_OP_IMPL( op, descr, mo ); \
-} \
- \
-template<int i, typename Base, typename T> \
-inline mock_object<i,Base> const& \
-operator op( mock_object<i,Base> const& mo, T const& ) \
-{ \
- MO_OP_IMPL( op, descr, mo ); \
-} \
- \
-template<int i, typename Base, typename T> \
-inline mock_object<i,Base> const& \
-operator op( T const&, mock_object<i,Base> const& mo ) \
-{ \
- MO_OP_IMPL( op, descr, mo ); \
-} \
-/**/
-
-#define MO_BINARY_BOOL_OP( op, descr ) \
-template<int i1, typename Base1,int i2, typename Base2> \
-inline bool \
-operator op( mock_object<i1,Base1> const&, \
- mock_object<i2,Base2> const& ) \
-{ \
- MO_OP_IMPL( op, descr, BOOST_ITEST_DPOINT() ); \
-} \
- \
-template<int i, typename Base, typename T> \
-inline bool \
-operator op( mock_object<i,Base> const&, T const& ) \
-{ \
- MO_OP_IMPL( op, descr, BOOST_ITEST_DPOINT() ); \
-} \
- \
-template<int i, typename Base, typename T> \
-inline bool \
-operator op( T const&, mock_object<i,Base> const& ) \
-{ \
- MO_OP_IMPL( op, descr, BOOST_ITEST_DPOINT() ); \
-} \
-/**/
-
-// ************************************************************************** //
-// ************** mock_object ************** //
-// ************************************************************************** //
-
-template<int i = 0, typename Base=mock_object_base>
-class mock_object;
-
-template<int i, typename Base>
-class mock_object : public Base {
- // Private typeefs
- typedef mock_object<i,Base> self_type;
- struct dummy { void nonnull() {}; };
- typedef void (dummy::*safe_bool)();
-
- // prototype constructor
- mock_object( dummy* ) {}
-
-public:
- static mock_object& prototype()
- {
- static mock_object p( reinterpret_cast<dummy*>(0) );
- return p;
- }
-
- // Constructors
- mock_object()
- {
- BOOST_ITEST_SCOPE( mock_object::mock_object );
- BOOST_ITEST_EPOINT( "Mock object default constructor" );
- }
-
- template<typename T1>
- mock_object( T1 const& arg1 )
- : mock_object_base( arg1 )
- {
- BOOST_ITEST_SCOPE( mock_object::mock_object );
- BOOST_ITEST_EPOINT( "Mock object constructor" );
- }
-
- template<typename T1, typename T2>
- mock_object( T1 const& arg1, T2 const& arg2 )
- : mock_object_base( arg1, arg2 )
- {
- BOOST_ITEST_SCOPE( mock_object::mock_object );
- BOOST_ITEST_EPOINT( "Mock object constructor" );
- }
-
- template<typename T1, typename T2, typename T3>
- mock_object( T1 const& arg1, T2 const& arg2, T3 const& arg3 )
- : mock_object_base( arg1, arg2, arg3 )
- {
- BOOST_ITEST_SCOPE( mock_object::mock_object );
- BOOST_ITEST_EPOINT( "Mock object constructor" );
- }
-
- template<typename T1, typename T2, typename T3, typename T4>
- mock_object( T1 const& arg1, T2 const& arg2, T3 const& arg3, T4 const& arg4 )
- : mock_object_base( arg1, arg2, arg3, arg4 )
- {
- BOOST_ITEST_SCOPE( mock_object::mock_object );
- BOOST_ITEST_EPOINT( "Mock object constructor" );
- }
-
- template<typename T1, typename T2, typename T3, typename T4, typename T5>
- mock_object( T1 const& arg1, T2 const& arg2, T3 const& arg3, T4 const& arg4, T5 const& arg5 )
- : mock_object_base( arg1, arg2, arg3, arg4, arg5 )
- {
- BOOST_ITEST_SCOPE( mock_object::mock_object );
- BOOST_ITEST_EPOINT( "Mock object constructor" );
- }
-
- mock_object( mock_object const& )
- {
- BOOST_ITEST_SCOPE( mock_object::mock_object );
- BOOST_ITEST_EPOINT( "Mock object copy constructor" );
- }
-
- // assignment
- self_type const& operator =( mock_object const& ) const
- {
- MO_OP_IMPL( =, "Copy assignment", prototype() );
- }
-
- template <typename T>
- self_type const& operator =( T const& ) const
- {
- MO_OP_IMPL( =, "Copy assignment", prototype() );
- }
-
- // Unary operators
- MO_UNARY_BOOL_OP( !, "Logical NOT operator" )
- MO_UNARY_OP( &, "Address-of operator" )
- MO_UNARY_OP( ~, "One's complement operator" )
- MO_UNARY_OP( *, "Pointer dereference" )
- MO_UNARY_OP( +, "Unary plus" )
-
- // Increment and Decrement
- MO_UNARY_OP( ++, "Prefix increment" )
- MO_UNARY_OP( --, "Prefix decrement" )
- self_type const& operator ++(int) const
- {
- MO_OP_IMPL( ++, "Postfix increment", prototype() );
- }
- self_type const& operator --(int) const
- {
- MO_OP_IMPL( --, "Postfix decrement", prototype() );
- }
-
- // Bool context convertion
- operator safe_bool() const
- {
- MO_OP_IMPL( safe_bool, "Bool context conversion",
- (BOOST_ITEST_DPOINT() ? 0 : &dummy::nonnull) );
- }
-
- // Function-call operators
- self_type const& operator ()() const
- {
- MO_OP_IMPL( (), "0-arity function-call", prototype() );
- }
- template<typename T1>
- self_type const& operator ()( T1 const& arg1 ) const
- {
- MO_OP_IMPL( (), "1-arity function-call", prototype() );
- }
- template<typename T1, typename T2>
- self_type const& operator ()( T1 const&, T2 const& ) const
- {
- MO_OP_IMPL( (), "2-arity function-call", prototype() );
- }
- template<typename T1, typename T2, typename T3>
- self_type const& operator ()( T1 const&, T2 const&, T3 const& ) const
- {
- MO_OP_IMPL( (), "3-arity function-call", prototype() );
- }
- template<typename T1, typename T2, typename T3, typename T4>
- self_type const& operator ()( T1 const&, T2 const&, T3 const&, T4 const& ) const
- {
- MO_OP_IMPL( (), "4-arity function-call", prototype() );
- }
- template<typename T1, typename T2, typename T3, typename T4, typename T5>
- self_type const& operator ()( T1 const&, T2 const&, T3 const&, T4 const&, T5 const& ) const
- {
- MO_OP_IMPL( (), "5-arity function-call", prototype() );
- }
-
- // Substripting
- template<typename T>
- self_type const& operator []( T const& ) const
- {
- MO_OP_IMPL( [], "Substripting", prototype() );
- }
-
- // Class member access
- self_type const* operator->() const
- {
- MO_OP_IMPL( ->, "Class member access", this );
- }
-};
-
-// !! MO_BINARY_OP( BOOST_PP_COMMA(), "Comma operator" )
-
-MO_BINARY_BOOL_OP( !=, "Inequality" )
-MO_BINARY_OP( %, "Modulus" )
-MO_BINARY_OP( %=, "Modulus/assignment" )
-MO_BINARY_OP( &, "Bitwise AND" )
-MO_BINARY_BOOL_OP( &&, "Logical AND" )
-MO_BINARY_OP( &=, "Bitwise AND/assignment" )
-MO_BINARY_OP( *, "Multiplication" )
-MO_BINARY_OP( *=, "Multiplication/assignment" )
-MO_BINARY_OP( +, "Addition" )
-MO_BINARY_OP( +=, "Addition/assignment" )
-//MO_BINARY_OP( -, "Subtraction" )
-MO_BINARY_OP( -=, "Subtraction/assignment" )
-MO_BINARY_OP( ->*, "Pointer-to-member selection" )
-MO_BINARY_OP( /, "Division" )
-MO_BINARY_OP( /=, "Division/assignment" )
-MO_BINARY_BOOL_OP( <, "Less than" )
-MO_BINARY_OP( <<=, "Left shift/assignment" )
-MO_BINARY_BOOL_OP( <=, "Less than or equal to" )
-MO_BINARY_BOOL_OP( ==, "Equality" )
-MO_BINARY_BOOL_OP( >, "Greater than" )
-MO_BINARY_BOOL_OP( >=, "Greater than or equal to" )
-MO_BINARY_OP( >>=, "Right shift/assignment" )
-MO_BINARY_OP( ^, "Exclusive OR" )
-MO_BINARY_OP( ^=, "Exclusive OR/assignment" )
-MO_BINARY_OP( |, "Bitwise inclusive OR" )
-MO_BINARY_OP( |=, "Bitwise inclusive OR/assignment" )
-MO_BINARY_BOOL_OP( ||, "Logical OR" )
-
-MO_BINARY_OP( <<, "Left shift" )
-MO_BINARY_OP( >>, "Right shift" )
-
-} // namespace itest
-
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_MOCK_OBJECT_HPP_112205GER

Deleted: trunk/boost/test/output_test_stream.hpp
==============================================================================
--- trunk/boost/test/output_test_stream.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
+++ (empty file)
@@ -1,78 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001-2010.
-// 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 : output_test_stream class definition
-// ***************************************************************************
-
-#ifndef BOOST_TEST_OUTPUT_TEST_STREAM_HPP_012705GER
-#define BOOST_TEST_OUTPUT_TEST_STREAM_HPP_012705GER
-
-// Boost.Test
-#include <boost/test/detail/global_typedef.hpp>
-#include <boost/test/utils/wrap_stringstream.hpp>
-#include <boost/test/predicate_result.hpp>
-
-// STL
-#include <cstddef> // for std::size_t
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** output_test_stream ************** //
-// ************************************************************************** //
-
-// 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 {
- typedef unit_test::const_string const_string;
- typedef predicate_result result_type;
-public:
- // Constructor
- explicit output_test_stream( const_string pattern_file_name = const_string(),
- bool match_or_save = true,
- bool text_or_binary = true );
-
- // Destructor
- ~output_test_stream();
-
- // checking function
- result_type is_empty( bool flush_stream = true );
- result_type check_length( std::size_t length, bool flush_stream = true );
- result_type is_equal( const_string arg_, bool flush_stream = true );
- result_type match_pattern( bool flush_stream = true );
-
- // explicit flush
- void flush();
-
-private:
- // helper functions
- std::size_t length();
- void sync();
-
- struct Impl;
- Impl* m_pimpl;
-};
-
-} // namespace test_tools
-
-} // namespace boost
-
-//____________________________________________________________________________//
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_OUTPUT_TEST_STREAM_HPP_012705GER

Modified: trunk/boost/test/parameterized_test.hpp
==============================================================================
--- trunk/boost/test/parameterized_test.hpp (original)
+++ trunk/boost/test/parameterized_test.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2001-2010.
+// (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)
@@ -17,12 +17,14 @@
 
 // Boost.Test
 #include <boost/test/unit_test_suite.hpp>
-#include <boost/test/utils/callback.hpp>
 
 // Boost
 #include <boost/type_traits/remove_reference.hpp>
 #include <boost/type_traits/remove_const.hpp>
 
+#include <boost/bind.hpp>
+#include <boost/function/function1.hpp>
+
 #include <boost/test/detail/suppress_warnings.hpp>
 
 //____________________________________________________________________________//
@@ -44,27 +46,8 @@
 
 namespace unit_test {
 
-// ************************************************************************** //
-// ************** test_func_with_bound_param ************** //
-// ************************************************************************** //
-
 namespace ut_detail {
 
-template<typename ParamType>
-struct test_func_with_bound_param {
- template<typename T>
- test_func_with_bound_param( callback1<ParamType> test_func, T const& param )
- : m_test_func( test_func )
- , m_param( param )
- {}
-
- void operator()() { m_test_func( m_param ); }
-
-private:
- callback1<ParamType> m_test_func;
- ParamType m_param;
-};
-
 // ************************************************************************** //
 // ************** param_test_case_generator ************** //
 // ************************************************************************** //
@@ -72,10 +55,10 @@
 template<typename ParamType, typename ParamIter>
 class param_test_case_generator : public test_unit_generator {
 public:
- param_test_case_generator( callback1<ParamType> const& test_func,
- const_string tc_name,
- ParamIter par_begin,
- ParamIter par_end )
+ param_test_case_generator( boost::function<void (ParamType)> const& test_func,
+ const_string tc_name,
+ ParamIter par_begin,
+ ParamIter par_end )
     : m_test_func( test_func )
     , m_tc_name( ut_detail::normalize_test_case_name( tc_name ) )
     , m_par_begin( par_begin )
@@ -87,8 +70,7 @@
         if( m_par_begin == m_par_end )
             return (test_unit*)0;
 
- test_func_with_bound_param<ParamType> bound_test_func( m_test_func, *m_par_begin );
- test_unit* res = new test_case( m_tc_name, bound_test_func );
+ test_unit* res = new test_case( m_tc_name, boost::bind( m_test_func, *m_par_begin ) );
 
         ++m_par_begin;
 
@@ -97,7 +79,7 @@
 
 private:
     // Data members
- callback1<ParamType> m_test_func;
+ boost::function<void (ParamType)> m_test_func;
     std::string m_tc_name;
     mutable ParamIter m_par_begin;
     ParamIter m_par_end;
@@ -126,10 +108,10 @@
 
 template<typename ParamType, typename ParamIter>
 inline ut_detail::param_test_case_generator<ParamType,ParamIter>
-make_test_case( callback1<ParamType> const& test_func,
- const_string tc_name,
- ParamIter par_begin,
- ParamIter par_end )
+make_test_case( boost::function<void (ParamType)> const& test_func,
+ const_string tc_name,
+ ParamIter par_begin,
+ ParamIter par_end )
 {
     return ut_detail::param_test_case_generator<ParamType,ParamIter>( test_func, tc_name, par_begin, par_end );
 }

Deleted: trunk/boost/test/predicate_result.hpp
==============================================================================
--- trunk/boost/test/predicate_result.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
+++ (empty file)
@@ -1,88 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001-2010.
-// 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 : enhanced result for test predicate that include message explaining failure
-// ***************************************************************************
-
-#ifndef BOOST_TEST_PREDICATE_RESULT_HPP_012705GER
-#define BOOST_TEST_PREDICATE_RESULT_HPP_012705GER
-
-// Boost.Test
-#include <boost/test/utils/class_properties.hpp>
-#include <boost/test/utils/wrap_stringstream.hpp>
-#include <boost/test/utils/basic_cstring/basic_cstring.hpp>
-
-// Boost
-#include <boost/shared_ptr.hpp>
-#include <boost/detail/workaround.hpp>
-
-// STL
-#include <cstddef> // for std::size_t
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-
-namespace test_tools {
-
-// ************************************************************************** //
-// ************** predicate_result ************** //
-// ************************************************************************** //
-
-class BOOST_TEST_DECL predicate_result {
- typedef unit_test::const_string const_string;
- struct dummy { void nonnull() {}; };
- typedef void (dummy::*safe_bool)();
-
-public:
- // Constructor
- predicate_result( bool pv_ )
- : p_predicate_value( pv_ )
- {}
-
- template<typename BoolConvertable>
- predicate_result( BoolConvertable const& pv_ ) : p_predicate_value( !!pv_ ) {}
-
- // Access methods
- bool operator!() const { return !p_predicate_value; }
- void operator=( bool pv_ ) { p_predicate_value.value = pv_; }
- operator safe_bool() const { return !!p_predicate_value ? &dummy::nonnull : 0; }
-
- // Public properties
- BOOST_READONLY_PROPERTY( bool, (predicate_result) ) p_predicate_value;
-
- // Access methods
- bool has_empty_message() const { return !m_message; }
- wrap_stringstream& message()
- {
- if( !m_message )
- m_message.reset( new wrap_stringstream );
-
- return *m_message;
- }
- const_string message() const { return !m_message ? const_string() : const_string( m_message->str() ); }
-
-private:
- // Data members
- shared_ptr<wrap_stringstream> m_message;
-};
-
-} // namespace test_tools
-
-} // namespace boost
-
-//____________________________________________________________________________//
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_PREDICATE_RESULT_HPP_012705GER

Modified: trunk/boost/test/prg_exec_monitor.hpp
==============================================================================
--- trunk/boost/test/prg_exec_monitor.hpp (original)
+++ trunk/boost/test/prg_exec_monitor.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2001-2010.
+// (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)

Deleted: trunk/boost/test/prod_tools.hpp
==============================================================================
--- trunk/boost/test/prod_tools.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
+++ (empty file)
@@ -1,209 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2009-2010.
-// 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 : contains implementation of test tools usable in production
-// ***************************************************************************
-
-#ifndef BOOST_TEST_PROD_TOOLS_HPP_122109GER
-#define BOOST_TEST_PROD_TOOLS_HPP_122109GER
-
-// Boost.Test
-#define BOOST_TEST_PROD
-#include <boost/test/test_tools.hpp>
-
-// Boost
-#include <boost/throw_exception.hpp>
-#include <boost/assert.hpp>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** TOOL BOX ************** //
-// ************************************************************************** //
-
-//____________________________________________________________________________//
-
-#ifndef BOOST_TEST_TOOL_REPORT_WARN_FAILURE
-#define BOOST_TEST_TOOL_REPORT_WARN_FAILURE( failure_descr )
-#endif
-
-//____________________________________________________________________________//
-
-#ifndef BOOST_TEST_TOOL_REPORT_CHECK_FAILURE
-#define BOOST_TEST_TOOL_REPORT_CHECK_FAILURE( failure_descr ) \
- BOOST_THROW_EXCEPTION( std::runtime_error( failure_descr ) )
-#endif
-
-//____________________________________________________________________________//
-
-#ifndef BOOST_TEST_TOOL_REPORT_REQUIRE_FAILURE
-#define BOOST_TEST_TOOL_REPORT_REQUIRE_FAILURE( failure_descr ) \
- BOOST_ASSERT( false )
-#endif
-
-//____________________________________________________________________________//
-
-#ifndef BOOST_TEST_TOOL_REPORT_FORMAT
-
-#define BOOST_TEST_TOOL_REPORT_ARG( r, _, arg ) , arg, BOOST_STRINGIZE( arg )
-#define BOOST_TEST_TOOL_REPORT_ARG_DESCR( r, _, arg ) , BOOST_STRINGIZE( arg )
-
-#define BOOST_TEST_TOOL_REPORT_ARGS1(ARGS) \
- BOOST_PP_SEQ_SIZE(ARGS) BOOST_PP_SEQ_FOR_EACH( BOOST_TEST_TOOL_REPORT_ARG_DESCR, _, ARGS )
-#define BOOST_TEST_TOOL_REPORT_ARGS2(ARGS) 0
-
-#define BOOST_TEST_TOOL_REPORT_FORMAT( frwd_type, pred_res, assertion_descr, CT, ARGS ) \
- ::boost::test_tools::tt_detail::prod_report_format( pred_res, \
- ::boost::unit_test::lazy_ostream::instance() << assertion_descr, \
- ::boost::test_tools::tt_detail::CT, \
- BOOST_JOIN( BOOST_TEST_TOOL_REPORT_ARGS, frwd_type )( ARGS ) ) \
-/**/
-
-#endif
-
-//____________________________________________________________________________//
-
-// 0 - args exists and need to be forwarded; call prod_check_frwd
-#define BOOST_TEST_TOOL_IMPL0( P, assertion_descr, TL, CT, ARGS ) \
- if( BOOST_TEST_TOOL_PRED_HOLDER( P, assertion_descr, CT, ARGS ) ) \
- ((void)0); \
- else BOOST_JOIN( BOOST_JOIN( BOOST_TEST_TOOL_REPORT_, TL), _FAILURE)( \
- PH.failure_descr() ) \
-/**/
-
-//____________________________________________________________________________//
-
-// 1 - args exists, but do not need to be forwarded
-#define BOOST_TEST_TOOL_IMPL1( P, assertion_descr, TL, CT, ARGS ) \
- if( ::boost::test_tools::predicate_result const& pr = P BOOST_PP_SEQ_TO_TUPLE( ARGS ) ) \
- ((void)0); \
- else BOOST_JOIN( BOOST_JOIN( BOOST_TEST_TOOL_REPORT_, TL), _FAILURE)( \
- BOOST_TEST_TOOL_REPORT_FORMAT( 1, pr, assertion_descr, CT, ARGS ) ) \
-/**/
-
-//____________________________________________________________________________//
-
-// 2 - assertion with no arguments;
-#define BOOST_TEST_TOOL_IMPL2( P, assertion_descr, TL, CT, _ ) \
- if( ::boost::test_tools::predicate_result const& pr = P ) \
- ((void)0); \
- else BOOST_JOIN( BOOST_JOIN( BOOST_TEST_TOOL_REPORT_, TL), _FAILURE)( \
- BOOST_TEST_TOOL_REPORT_FORMAT( 2, pr, assertion_descr, CT, _ ) ) \
-/**/
-
-//____________________________________________________________________________//
-
-#define BOOST_TEST_TOOL_IMPL( frwd_type, P, check_descr, TL, CT, ARGS ) \
- BOOST_JOIN( BOOST_TEST_TOOL_IMPL, frwd_type )( P, check_descr, TL, CT, ARGS )
-
-//____________________________________________________________________________//
-
-namespace boost {
-
-namespace test_tools {
-
-namespace tt_detail {
-
-// ************************************************************************** //
-// ************** prod_report_format ************** //
-// ************************************************************************** //
-
-BOOST_TEST_DECL std::string
-prod_report_format( predicate_result const& pr,
- unit_test::lazy_ostream const& assertion_descr,
- check_type ct, std::size_t num_args, ... );
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** predicate_holder ************** //
-// ************************************************************************** //
-
-#define BOOST_TEST_TOOL_PASS_ARG( r, _, arg ) , arg, BOOST_STRINGIZE( arg )
-
-#define BOOST_TEST_TOOL_PRED_HOLDER( P, assertion_descr, CT, ARGS ) \
-::boost::test_tools::tt_detail::predicate_holder const& PH = \
-::boost::test_tools::tt_detail::predicate_holder( P, assertion_descr, \
- ::boost::test_tools::tt_detail::CT \
- BOOST_PP_SEQ_FOR_EACH( BOOST_TEST_TOOL_PASS_ARG, _, ARGS ) ) \
-/**/
-
-#define TEMPL_PARAMS( z, m, dummy ) , typename BOOST_JOIN( Arg, m )
-
-#define FUNC_PARAMS( z, m, dummy ) \
- , BOOST_JOIN( Arg, m ) const& BOOST_JOIN( arg, m ) \
- , char const* BOOST_JOIN( BOOST_JOIN( arg, m ), _descr ) \
-/**/
-
-#define PRED_PARAMS( z, m, dummy ) BOOST_PP_COMMA_IF( m ) BOOST_JOIN( arg, m )
-
-#define ARG_INFO( z, m, dummy ) \
- , BOOST_JOIN( BOOST_JOIN( arg, m ), _descr ) \
- , &static_cast<const unit_test::lazy_ostream&>(unit_test::lazy_ostream::instance() \
- << ::boost::test_tools::tt_detail::print_helper( BOOST_JOIN( arg, m ) )) \
-/**/
-
-#define CONSTRUCTOR_IMPL( z, n, dummy ) \
-template<typename Pred \
- BOOST_PP_REPEAT_ ## z( BOOST_PP_ADD( n, 1 ), TEMPL_PARAMS, _ )> \
-predicate_holder( Pred P, char const* assertion_descr, check_type ct \
- BOOST_PP_REPEAT_ ## z( BOOST_PP_ADD( n, 1 ), FUNC_PARAMS, _ ) ) \
-: m_failure_descr( 0 ) \
-{ \
- predicate_result const& pr = \
- P( BOOST_PP_REPEAT_ ## z( BOOST_PP_ADD( n, 1 ), PRED_PARAMS, _ ) ); \
- if( pr ) return; \
- \
- m_failure_descr = new std::string; \
- *m_failure_descr = prod_report_format( pr, \
- ::boost::unit_test::lazy_ostream::instance() << assertion_descr, \
- ct, \
- BOOST_PP_ADD( n, 1 ) \
- BOOST_PP_REPEAT_ ## z( BOOST_PP_ADD( n, 1 ), ARG_INFO, _ ) ); \
-} \
-/**/
-
-#ifndef BOOST_TEST_MAX_PREDICATE_ARITY
-#define BOOST_TEST_MAX_PREDICATE_ARITY 5
-#endif
-
-struct predicate_holder {
- BOOST_PP_REPEAT( BOOST_TEST_MAX_PREDICATE_ARITY, CONSTRUCTOR_IMPL, _ )
-
- ~predicate_holder() { if( m_failure_descr ) delete m_failure_descr; }
- std::string const& failure_descr() const { return *m_failure_descr; }
- operator bool() const { return !m_failure_descr; }
-private:
- // Data members
- std::string* m_failure_descr;
-};
-
-#undef TEMPL_PARAMS
-#undef FUNC_PARAMS
-#undef PRED_INFO
-#undef ARG_INFO
-#undef CONSTRUCTOR_IMPL
-
-//____________________________________________________________________________//
-
-} // namespace tt_detail
-
-} // namespace test_tools
-
-} // namespace boost
-
-//____________________________________________________________________________//
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_PROD_TOOLS_HPP_122109GER

Modified: trunk/boost/test/progress_monitor.hpp
==============================================================================
--- trunk/boost/test/progress_monitor.hpp (original)
+++ trunk/boost/test/progress_monitor.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2005-2010.
+// (C) Copyright Gennadiy Rozental 2005-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)
@@ -16,7 +16,7 @@
 #define BOOST_TEST_PROGRESS_MONITOR_HPP_020105GER
 
 // Boost.Test
-#include <boost/test/test_observer.hpp>
+#include <boost/test/tree/observer.hpp>
 #include <boost/test/utils/trivial_singleton.hpp>
 
 // STL

Modified: trunk/boost/test/results_collector.hpp
==============================================================================
--- trunk/boost/test/results_collector.hpp (original)
+++ trunk/boost/test/results_collector.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2001-2010.
+// (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)
@@ -17,7 +17,7 @@
 #define BOOST_TEST_RESULTS_COLLECTOR_HPP_071894GER
 
 // Boost.Test
-#include <boost/test/test_observer.hpp>
+#include <boost/test/tree/observer.hpp>
 
 #include <boost/test/detail/global_typedef.hpp>
 #include <boost/test/detail/fwd_decl.hpp>

Modified: trunk/boost/test/results_reporter.hpp
==============================================================================
--- trunk/boost/test/results_reporter.hpp (original)
+++ trunk/boost/test/results_reporter.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2001-2010.
+// (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)

Deleted: trunk/boost/test/test_case_template.hpp
==============================================================================
--- trunk/boost/test/test_case_template.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
+++ (empty file)
@@ -1,15 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2003-2010.
-// 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 : deprecated
-// ***************************************************************************
-
-#include <boost/test/unit_test.hpp>

Deleted: trunk/boost/test/test_exec_monitor.hpp
==============================================================================
--- trunk/boost/test/test_exec_monitor.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
+++ (empty file)
@@ -1,36 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001-2010.
-// 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 : Entry point for the end user into the Test Execution Monitor.
-// ***************************************************************************
-
-#ifndef BOOST_TEST_EXEC_MONITOR_HPP_071894GER
-#define BOOST_TEST_EXEC_MONITOR_HPP_071894GER
-
-// Boost.Test
-#include <boost/test/test_tools.hpp>
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** Auto Linking ************** //
-// ************************************************************************** //
-
-// Automatically link to the correct build variant where possible.
-#if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_TEST_NO_LIB) && \
- !defined(BOOST_TEST_SOURCE) && !defined(BOOST_TEST_INCLUDED)
-
-# define BOOST_LIB_NAME boost_test_exec_monitor
-# include <boost/config/auto_link.hpp>
-
-#endif // auto-linking disabled
-
-#endif // BOOST_TEST_EXEC_MONITOR_HPP_071894GER

Deleted: trunk/boost/test/test_observer.hpp
==============================================================================
--- trunk/boost/test/test_observer.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
+++ (empty file)
@@ -1,65 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2005-2010.
-// 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 abstract interface for test observer
-// ***************************************************************************
-
-#ifndef BOOST_TEST_TEST_OBSERVER_HPP_021005GER
-#define BOOST_TEST_TEST_OBSERVER_HPP_021005GER
-
-// Boost.Test
-#include <boost/test/detail/fwd_decl.hpp>
-#include <boost/test/detail/global_typedef.hpp>
-#include <boost/test/detail/config.hpp>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-
-namespace unit_test {
-
-// ************************************************************************** //
-// ************** test_observer ************** //
-// ************************************************************************** //
-
-class BOOST_TEST_DECL test_observer {
-public:
- // test observer interface
- virtual void test_start( counter_t /* test_cases_amount */ ) {}
- virtual void test_finish() {}
- virtual void test_aborted() {}
-
- virtual void test_unit_start( test_unit const& ) {}
- virtual void test_unit_finish( test_unit const&, unsigned long /* elapsed */ ) {}
- virtual void test_unit_skipped( test_unit const& ) {}
- virtual void test_unit_aborted( test_unit const& ) {}
-
- virtual void assertion_result( bool /* passed */ ) {}
- virtual void exception_caught( execution_exception const& ) {}
-
- virtual int priority() { return 0; }
-
-protected:
- BOOST_TEST_PROTECTED_VIRTUAL ~test_observer() {}
-};
-
-} // unit_test
-
-} // namespace boost
-
-//____________________________________________________________________________//
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_TEST_OBSERVER_HPP_021005GER
-

Modified: trunk/boost/test/test_tools.hpp
==============================================================================
--- trunk/boost/test/test_tools.hpp (original)
+++ trunk/boost/test/test_tools.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2001-2010.
+// (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)
@@ -16,7 +16,6 @@
 #define BOOST_TEST_TEST_TOOLS_HPP_012705GER
 
 // Boost.Test
-#include <boost/test/predicate_result.hpp>
 #ifndef BOOST_TEST_PROD
 #include <boost/test/unit_test_log.hpp>
 #define BOOST_TEST_TOOLS_STRINGIZE( arg ) BOOST_TEST_STRINGIZE( arg )
@@ -24,15 +23,6 @@
 #define BOOST_TEST_PASSPOINT()
 #define BOOST_TEST_TOOLS_STRINGIZE( arg ) BOOST_STRINGIZE( arg )
 #endif
-#include <boost/test/floating_point_comparison.hpp>
-
-#include <boost/test/detail/config.hpp>
-#include <boost/test/detail/global_typedef.hpp>
-#include <boost/test/detail/workaround.hpp>
-
-#include <boost/test/utils/wrap_stringstream.hpp>
-#include <boost/test/utils/basic_cstring/io.hpp>
-#include <boost/test/utils/lazy_ostream.hpp>
 
 // Boost
 #include <boost/preprocessor/seq/for_each.hpp>
@@ -42,24 +32,6 @@
 #include <boost/preprocessor/punctuation/comma_if.hpp>
 #include <boost/preprocessor/arithmetic/add.hpp>
 
-#include <boost/limits.hpp>
-
-#include <boost/type_traits/is_array.hpp>
-#include <boost/type_traits/is_function.hpp>
-#include <boost/type_traits/is_abstract.hpp>
-
-#include <boost/mpl/or.hpp>
-
-// STL
-#include <cstddef> // for std::size_t
-#include <iosfwd>
-#include <ios> // for std::boolalpha
-#include <climits> // for CHAR_BIT
-
-#ifdef BOOST_MSVC
-# pragma warning(disable: 4127) // conditional expression is constant
-#endif
-
 #include <boost/test/detail/suppress_warnings.hpp>
 
 //____________________________________________________________________________//
@@ -303,50 +275,6 @@
 
 //____________________________________________________________________________//
 
-// ***************************** //
-// deprecated interface
-
-#define BOOST_BITWISE_EQUAL( L, R ) BOOST_CHECK_BITWISE_EQUAL( L, R )
-#define BOOST_MESSAGE( M ) BOOST_TEST_MESSAGE( M )
-#define BOOST_CHECKPOINT( M ) BOOST_TEST_CHECKPOINT( M )
-
-namespace boost {
-
-namespace test_tools {
-
-typedef unit_test::const_string const_string;
-
-namespace { bool dummy_cond = false; }
-
-// ************************************************************************** //
-// ************** print_log_value ************** //
-// ************************************************************************** //
-
-template<typename T>
-struct print_log_value {
- void operator()( std::ostream& ostr, T const& t )
- {
- // avoid warning: 'boost::test_tools::<unnamed>::dummy_cond' defined but not used
- if (::boost::test_tools::dummy_cond) {}
-
- typedef typename mpl::or_<is_array<T>,is_function<T>,is_abstract<T> >::type cant_use_nl;
-
- set_precision( ostr, cant_use_nl() );
-
- ostr << t; // by default print the value
- }
-
- void set_precision( std::ostream& ostr, mpl::false_ )
- {
- if( std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::radix == 2 )
- ostr.precision( 2 + std::numeric_limits<T>::digits * 301/1000 );
- }
-
- void set_precision( std::ostream&, mpl::true_ ) {}
-};
-
-//____________________________________________________________________________//
-
 #define BOOST_TEST_DONT_PRINT_LOG_VALUE( the_type ) \
 namespace boost { namespace test_tools { \
 template<> \
@@ -358,393 +286,7 @@
 
 //____________________________________________________________________________//
 
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
-template<typename T, std::size_t N >
-struct print_log_value< T[N] > {
- void operator()( std::ostream& ostr, T const* t )
- {
- ostr << t;
- }
-};
-#endif
-
-//____________________________________________________________________________//
-
-template<>
-struct BOOST_TEST_DECL print_log_value<bool> {
- void operator()( std::ostream& ostr, bool t )
- {
- ostr << std::boolalpha << t;
- }
-};
-
-//____________________________________________________________________________//
-
-template<>
-struct BOOST_TEST_DECL print_log_value<char> {
- void operator()( std::ostream& ostr, char t );
-};
-
-//____________________________________________________________________________//
-
-template<>
-struct BOOST_TEST_DECL print_log_value<unsigned char> {
- void operator()( std::ostream& ostr, unsigned char t );
-};
-
-//____________________________________________________________________________//
-
-template<>
-struct BOOST_TEST_DECL print_log_value<char const*> {
- void operator()( std::ostream& ostr, char const* t );
-};
-
-//____________________________________________________________________________//
-
-template<>
-struct BOOST_TEST_DECL print_log_value<wchar_t const*> {
- void operator()( std::ostream& ostr, wchar_t const* t );
-};
-
-//____________________________________________________________________________//
-
-namespace tt_detail {
-
-// ************************************************************************** //
-// ************** tools classification ************** //
-// ************************************************************************** //
-
-enum check_type {
- CHECK_PRED,
- CHECK_MSG,
- CHECK_EQUAL,
- CHECK_NE,
- CHECK_LT,
- CHECK_LE,
- CHECK_GT,
- CHECK_GE,
- CHECK_CLOSE,
- CHECK_CLOSE_FRACTION,
- CHECK_SMALL,
- CHECK_BITWISE_EQUAL,
- CHECK_PRED_WITH_ARGS,
- CHECK_EQUAL_COLL
-};
-
-enum tool_level {
- WARN, CHECK, REQUIRE, PASS
-};
-
-// ************************************************************************** //
-// ************** print_helper ************** //
-// ************************************************************************** //
-// Adds level of indirection to the output operation, allowing us to customize
-// it for types that do not support operator << directly or for any other reason
-
-template<typename T>
-struct print_helper_t {
- explicit print_helper_t( T const& t ) : m_t( t ) {}
-
- T const& m_t;
-};
-
-//____________________________________________________________________________//
-
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
-// Borland suffers premature pointer decay passing arrays by reference
-template<typename T, std::size_t N >
-struct print_helper_t< T[N] > {
- explicit print_helper_t( T const * t ) : m_t( t ) {}
-
- T const * m_t;
-};
-#endif
-
-//____________________________________________________________________________//
-
-template<typename T>
-inline print_helper_t<T> print_helper( T const& t )
-{
- return print_helper_t<T>( t );
-}
-
-//____________________________________________________________________________//
-
-template<typename T>
-inline std::ostream&
-operator<<( std::ostream& ostr, print_helper_t<T> const& ph )
-{
- print_log_value<T>()( ostr, ph.m_t );
-
- return ostr;
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** TOOL BOX Implementation ************** //
-// ************************************************************************** //
-
-BOOST_TEST_DECL
-bool check_impl( predicate_result const& pr, ::boost::unit_test::lazy_ostream const& assertion_descr,
- const_string file_name, std::size_t line_num,
- tool_level tl, check_type ct,
- std::size_t num_args, ... );
-
-//____________________________________________________________________________//
-// This function adds level of indirection, but it makes sure we evaluate predicate
-// arguments only once
-
-#ifndef BOOST_TEST_PROD
-#define TEMPL_PARAMS( z, m, dummy ) , typename BOOST_JOIN( Arg, m )
-
-#define FUNC_PARAMS( z, m, dummy ) \
- , BOOST_JOIN( Arg, m ) const& BOOST_JOIN( arg, m ) \
- , char const* BOOST_JOIN( BOOST_JOIN( arg, m ), _descr ) \
-/**/
-
-#define PRED_PARAMS( z, m, dummy ) BOOST_PP_COMMA_IF( m ) BOOST_JOIN( arg, m )
-
-#define ARG_INFO( z, m, dummy ) \
- , BOOST_JOIN( BOOST_JOIN( arg, m ), _descr ) \
- , &static_cast<const unit_test::lazy_ostream&>(unit_test::lazy_ostream::instance() \
- << ::boost::test_tools::tt_detail::print_helper( BOOST_JOIN( arg, m ) )) \
-/**/
-
-#define IMPL_FRWD( z, n, dummy ) \
-template<typename Pred \
- BOOST_PP_REPEAT_ ## z( BOOST_PP_ADD( n, 1 ), TEMPL_PARAMS, _ )> \
-inline bool \
-check_frwd( Pred P, unit_test::lazy_ostream const& assertion_descr, \
- const_string file_name, std::size_t line_num, \
- tool_level tl, check_type ct \
- BOOST_PP_REPEAT_ ## z( BOOST_PP_ADD( n, 1 ), FUNC_PARAMS, _ ) \
-) \
-{ \
- return \
- check_impl( P( BOOST_PP_REPEAT_ ## z( BOOST_PP_ADD( n, 1 ), PRED_PARAMS, _ ) ), \
- assertion_descr, file_name, line_num, tl, ct, \
- BOOST_PP_ADD( n, 1 ) \
- BOOST_PP_REPEAT_ ## z( BOOST_PP_ADD( n, 1 ), ARG_INFO, _ ) \
- ); \
-} \
-/**/
-
-#ifndef BOOST_TEST_MAX_PREDICATE_ARITY
-#define BOOST_TEST_MAX_PREDICATE_ARITY 5
-#endif
-
-BOOST_PP_REPEAT( BOOST_TEST_MAX_PREDICATE_ARITY, IMPL_FRWD, _ )
-
-#undef TEMPL_PARAMS
-#undef FUNC_PARAMS
-#undef PRED_INFO
-#undef ARG_INFO
-#undef IMPL_FRWD
-
-#endif
-
-//____________________________________________________________________________//
-
-template <class Left, class Right>
-predicate_result equal_impl( Left const& left, Right const& right )
-{
- return left == right;
-}
-
-//____________________________________________________________________________//
-
-predicate_result BOOST_TEST_DECL equal_impl( char const* left, char const* right );
-inline predicate_result equal_impl( char* left, char const* right ) { return equal_impl( static_cast<char const*>(left), static_cast<char const*>(right) ); }
-inline predicate_result equal_impl( char const* left, char* right ) { return equal_impl( static_cast<char const*>(left), static_cast<char const*>(right) ); }
-inline predicate_result equal_impl( char* left, char* right ) { return equal_impl( static_cast<char const*>(left), static_cast<char const*>(right) ); }
-
-#if !defined( BOOST_NO_CWCHAR )
-predicate_result BOOST_TEST_DECL equal_impl( wchar_t const* left, wchar_t const* right );
-inline predicate_result equal_impl( wchar_t* left, wchar_t const* right ) { return equal_impl( static_cast<wchar_t const*>(left), static_cast<wchar_t const*>(right) ); }
-inline predicate_result equal_impl( wchar_t const* left, wchar_t* right ) { return equal_impl( static_cast<wchar_t const*>(left), static_cast<wchar_t const*>(right) ); }
-inline predicate_result equal_impl( wchar_t* left, wchar_t* right ) { return equal_impl( static_cast<wchar_t const*>(left), static_cast<wchar_t const*>(right) ); }
-#endif
-
-//____________________________________________________________________________//
-
-struct equal_impl_frwd {
- template <typename Left, typename Right>
- inline predicate_result
- call_impl( Left const& left, Right const& right, mpl::false_ ) const
- {
- return equal_impl( left, right );
- }
-
- template <typename Left, typename Right>
- inline predicate_result
- call_impl( Left const& left, Right const& right, mpl::true_ ) const
- {
- return (*this)( right, &left[0] );
- }
-
- template <typename Left, typename Right>
- inline predicate_result
- operator()( Left const& left, Right const& right ) const
- {
- typedef typename is_array<Left>::type left_is_array;
- return call_impl( left, right, left_is_array() );
- }
-};
-
-//____________________________________________________________________________//
-
-struct ne_impl {
- template <class Left, class Right>
- predicate_result operator()( Left const& left, Right const& right )
- {
- return !equal_impl_frwd()( left, right );
- }
-};
-
-//____________________________________________________________________________//
-
-struct lt_impl {
- template <class Left, class Right>
- predicate_result operator()( Left const& left, Right const& right )
- {
- return left < right;
- }
-};
-
-//____________________________________________________________________________//
-
-struct le_impl {
- template <class Left, class Right>
- predicate_result operator()( Left const& left, Right const& right )
- {
- return left <= right;
- }
-};
-
-//____________________________________________________________________________//
-
-struct gt_impl {
- template <class Left, class Right>
- predicate_result operator()( Left const& left, Right const& right )
- {
- return left > right;
- }
-};
-
-//____________________________________________________________________________//
-
-struct ge_impl {
- template <class Left, class Right>
- predicate_result operator()( Left const& left, Right const& right )
- {
- return left >= right;
- }
-};
-
-//____________________________________________________________________________//
-
-struct equal_coll_impl {
- template <typename Left, typename Right>
- predicate_result operator()( Left left_begin, Left left_end, Right right_begin, Right right_end )
- {
- predicate_result pr( true );
- std::size_t pos = 0;
-
- for( ; left_begin != left_end && right_begin != right_end; ++left_begin, ++right_begin, ++pos ) {
- if( *left_begin != *right_begin ) {
- pr = false;
- pr.message() << "\nMismatch in a position " << pos << ": " << *left_begin << " != " << *right_begin;
- }
- }
-
- if( left_begin != left_end ) {
- std::size_t r_size = pos;
- while( left_begin != left_end ) {
- ++pos;
- ++left_begin;
- }
-
- pr = false;
- pr.message() << "\nCollections size mismatch: " << pos << " != " << r_size;
- }
-
- if( right_begin != right_end ) {
- std::size_t l_size = pos;
- while( right_begin != right_end ) {
- ++pos;
- ++right_begin;
- }
-
- pr = false;
- pr.message() << "\nCollections size mismatch: " << l_size << " != " << pos;
- }
-
- return pr;
- }
-};
-
-//____________________________________________________________________________//
-
-struct bitwise_equal_impl {
- template <class Left, class Right>
- predicate_result operator()( Left const& left, Right const& right )
- {
- predicate_result pr( true );
-
- std::size_t left_bit_size = sizeof(Left)*CHAR_BIT;
- std::size_t right_bit_size = sizeof(Right)*CHAR_BIT;
-
- static Left const leftOne( 1 );
- static Right const rightOne( 1 );
-
- std::size_t total_bits = left_bit_size < right_bit_size ? left_bit_size : right_bit_size;
-
- for( std::size_t counter = 0; counter < total_bits; ++counter ) {
- if( ( left & ( leftOne << counter ) ) != ( right & ( rightOne << counter ) ) ) {
- pr = false;
- pr.message() << "\nMismatch in a position " << counter;
- }
- }
-
- if( left_bit_size != right_bit_size ) {
- pr = false;
- pr.message() << "\nOperands bit sizes mismatch: " << left_bit_size << " != " << right_bit_size;
- }
-
- return pr;
- }
-};
-
-//____________________________________________________________________________//
-
-bool BOOST_TEST_DECL is_defined_impl( const_string symbol_name, const_string symbol_value );
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** context_frame ************** //
-// ************************************************************************** //
-
-struct BOOST_TEST_DECL context_frame {
- explicit context_frame( ::boost::unit_test::lazy_ostream const& context_descr );
- ~context_frame();
-
- operator bool();
-
-private:
- int m_frame_id;
-};
-
-} // namespace tt_detail
-
-} // namespace test_tools
-
-namespace test_toolbox = test_tools;
-
-} // namespace boost
-
-//____________________________________________________________________________//
+#include <boost/test/tools/impl.hpp>
 
 #include <boost/test/detail/enable_warnings.hpp>
 

Copied: trunk/boost/test/tools/floating_point_comparison.hpp (from r74298, /trunk/boost/test/floating_point_comparison.hpp)
==============================================================================
--- /trunk/boost/test/floating_point_comparison.hpp (original)
+++ trunk/boost/test/tools/floating_point_comparison.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -17,7 +17,7 @@
 
 // Boost.Test
 #include <boost/test/detail/global_typedef.hpp>
-#include <boost/test/predicate_result.hpp>
+#include <boost/test/tools/predicate_result.hpp>
 
 // Boost
 #include <boost/limits.hpp> // for std::numeric_limits

Added: trunk/boost/test/tools/impl.hpp
==============================================================================
Binary file. No diff available.

Copied: trunk/boost/test/tools/output_test_stream.hpp (from r74638, /trunk/boost/test/output_test_stream.hpp)
==============================================================================
--- /trunk/boost/test/output_test_stream.hpp (original)
+++ trunk/boost/test/tools/output_test_stream.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -18,7 +18,7 @@
 // Boost.Test
 #include <boost/test/detail/global_typedef.hpp>
 #include <boost/test/utils/wrap_stringstream.hpp>
-#include <boost/test/predicate_result.hpp>
+#include <boost/test/tools/predicate_result.hpp>
 
 // STL
 #include <cstddef> // for std::size_t

Added: trunk/boost/test/tree/decorators.hpp
==============================================================================
Binary file. No diff available.

Copied: trunk/boost/test/tree/observer.hpp (from r74638, /trunk/boost/test/test_observer.hpp)
==============================================================================
--- /trunk/boost/test/test_observer.hpp (original)
+++ trunk/boost/test/tree/observer.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2005-2010.
+// (C) Copyright Gennadiy Rozental 2005-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)

Modified: trunk/boost/test/unit_test.hpp
==============================================================================
--- trunk/boost/test/unit_test.hpp (original)
+++ trunk/boost/test/unit_test.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2001-2010.
+// (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)

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-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2001-2010.
+// (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)
@@ -18,7 +18,7 @@
 #define BOOST_TEST_UNIT_TEST_LOG_HPP_071894GER
 
 // Boost.Test
-#include <boost/test/test_observer.hpp>
+#include <boost/test/tree/observer.hpp>
 
 #include <boost/test/detail/global_typedef.hpp>
 #include <boost/test/detail/log_level.hpp>

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-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2003-2010.
+// (C) Copyright Gennadiy Rozental 2003-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)

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-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2001-2010.
+// (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)
@@ -20,7 +20,6 @@
 #include <boost/test/execution_monitor.hpp>
 #include <boost/test/detail/fwd_decl.hpp>
 #include <boost/test/utils/trivial_singleton.hpp>
-#include <boost/test/utils/callback.hpp>
 
 #include <boost/test/detail/suppress_warnings.hpp>
 

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-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2001-2010.
+// (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)
@@ -26,7 +26,7 @@
 // ************************************************************************** //
 
 #define BOOST_TEST_CASE( test_function ) \
-boost::unit_test::make_test_case( boost::unit_test::callback0<>(test_function), BOOST_TEST_STRINGIZE( test_function ) )
+boost::unit_test::make_test_case( boost::function<void ()>(test_function), BOOST_TEST_STRINGIZE( test_function ) )
 #define BOOST_CLASS_TEST_CASE( test_function, tc_instance ) \
 boost::unit_test::make_test_case((test_function), BOOST_TEST_STRINGIZE( test_function ), tc_instance )
 
@@ -43,7 +43,9 @@
 
 #define BOOST_AUTO_TEST_SUITE( suite_name ) \
 namespace suite_name { \
-BOOST_AUTO_TU_REGISTRAR( suite_name )( BOOST_STRINGIZE( suite_name ) ); \
+BOOST_AUTO_TU_REGISTRAR( suite_name )( \
+ BOOST_STRINGIZE( suite_name ), \
+ boost::unit_test::decorator::collector::instance() ); \
 /**/
 
 // ************************************************************************** //
@@ -67,20 +69,10 @@
 // ************************************************************************** //
 // ************** BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES ************** //
 // ************************************************************************** //
+// deprecated; use decorator instead
 
 #define BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES( test_name, n ) \
-struct BOOST_AUTO_TC_UNIQUE_ID( test_name ); \
- \
-static struct BOOST_JOIN( test_name, _exp_fail_num_spec ) \
-: boost::unit_test::ut_detail:: \
- auto_tc_exp_fail<BOOST_AUTO_TC_UNIQUE_ID( test_name ) > \
-{ \
- BOOST_JOIN( test_name, _exp_fail_num_spec )() \
- : boost::unit_test::ut_detail:: \
- auto_tc_exp_fail<BOOST_AUTO_TC_UNIQUE_ID( test_name ) >( n ) \
- {} \
-} BOOST_JOIN( test_name, _exp_fail_num_spec_inst ); \
- \
+BOOST_TEST_DECORATOR( boost::unit_test::expected_failures( n ) )
 /**/
 
 // ************************************************************************** //
@@ -101,8 +93,7 @@
 BOOST_AUTO_TU_REGISTRAR( test_name )( \
     boost::unit_test::make_test_case( \
         &BOOST_AUTO_TC_INVOKER( test_name ), #test_name ), \
- boost::unit_test::ut_detail::auto_tc_exp_fail< \
- BOOST_AUTO_TC_UNIQUE_ID( test_name )>::instance()->value() ); \
+ boost::unit_test::decorator::collector::instance() ); \
                                                                         \
 void test_name::test_method() \
 /**/
@@ -136,7 +127,8 @@
 BOOST_AUTO_TU_REGISTRAR( test_name )( \
     boost::unit_test::ut_detail::template_test_case_gen< \
         BOOST_AUTO_TC_INVOKER( test_name ),TL >( \
- BOOST_STRINGIZE( test_name ) ) ); \
+ BOOST_STRINGIZE( test_name ) ), \
+ boost::unit_test::decorator::collector::instance() ); \
                                                                         \
 template<typename type_name> \
 void test_name<type_name>::test_method() \
@@ -153,29 +145,29 @@
 // ************** BOOST_TEST_CASE_TEMPLATE ************** //
 // ************************************************************************** //
 
-#define BOOST_TEST_CASE_TEMPLATE( name, typelist ) \
- boost::unit_test::ut_detail::template_test_case_gen<name,typelist >( \
- BOOST_TEST_STRINGIZE( name ) ) \
+#define BOOST_TEST_CASE_TEMPLATE( name, typelist ) \
+ boost::unit_test::ut_detail::template_test_case_gen<name,typelist >(\
+ BOOST_TEST_STRINGIZE( name ) ) \
 /**/
 
 // ************************************************************************** //
 // ************** BOOST_TEST_CASE_TEMPLATE_FUNCTION ************** //
 // ************************************************************************** //
 
-#define BOOST_TEST_CASE_TEMPLATE_FUNCTION( name, type_name ) \
-template<typename type_name> \
-void BOOST_JOIN( name, _impl )( boost::type<type_name>* ); \
- \
-struct name { \
- template<typename TestType> \
- static void run( boost::type<TestType>* frwrd = 0 ) \
- { \
- BOOST_JOIN( name, _impl )( frwrd ); \
- } \
-}; \
- \
-template<typename type_name> \
-void BOOST_JOIN( name, _impl )( boost::type<type_name>* ) \
+#define BOOST_TEST_CASE_TEMPLATE_FUNCTION( name, type_name ) \
+template<typename type_name> \
+void BOOST_JOIN( name, _impl )( boost::type<type_name>* ); \
+ \
+struct name { \
+ template<typename TestType> \
+ static void run( boost::type<TestType>* frwrd = 0 ) \
+ { \
+ BOOST_JOIN( name, _impl )( frwrd ); \
+ } \
+}; \
+ \
+template<typename type_name> \
+void BOOST_JOIN( name, _impl )( boost::type<type_name>* ) \
 /**/
 
 // ************************************************************************** //
@@ -187,6 +179,15 @@
 /**/
 
 // ************************************************************************** //
+// ************** BOOST_TEST_DECORATOR ************** //
+// ************************************************************************** //
+
+#define BOOST_TEST_DECORATOR( D ) \
+static boost::unit_test::decorator::collector \
+BOOST_JOIN(decorator_collector,__LINE__)( D ); \
+/**/
+
+// ************************************************************************** //
 // ************** BOOST_AUTO_TEST_CASE_FIXTURE ************** //
 // ************************************************************************** //
 

Modified: trunk/boost/test/unit_test_suite_impl.hpp
==============================================================================
--- trunk/boost/test/unit_test_suite_impl.hpp (original)
+++ trunk/boost/test/unit_test_suite_impl.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2001-2010.
+// (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)
@@ -18,11 +18,13 @@
 // Boost.Test
 #include <boost/test/detail/config.hpp>
 #include <boost/test/detail/global_typedef.hpp>
-#include <boost/test/utils/class_properties.hpp>
-#include <boost/test/utils/callback.hpp>
 #include <boost/test/detail/fwd_decl.hpp>
 #include <boost/test/detail/workaround.hpp>
-#include <boost/test/test_observer.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>
@@ -30,6 +32,7 @@
 #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
@@ -46,6 +49,13 @@
 namespace unit_test {
 
 // ************************************************************************** //
+// ************** test_unit_fixture ************** //
+// ************************************************************************** //
+
+struct test_unit_fixture {
+};
+
+// ************************************************************************** //
 // ************** test_unit ************** //
 // ************************************************************************** //
 
@@ -78,9 +88,12 @@
 
     // 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 status for this 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 );
 
@@ -90,6 +103,7 @@
 private:
     // Data members
     std::list<std::string> m_labels;
+ decorator::for_test_unit_ptr m_decorators;
 };
 
 // ************************************************************************** //
@@ -113,18 +127,16 @@
     enum { type = tut_case };
 
     // Constructor
- test_case( const_string tc_name, callback0<> const& test_func );
+ test_case( const_string tc_name, boost::function<void ()> const& test_func );
 
- // Access methods
- callback0<> const& test_func() const { return m_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() {}
-
- // BOOST_MSVC <= 1200 have problems with callback as property
- // Data members
- callback0<> m_test_func;
 };
 
 // ************************************************************************** //
@@ -181,8 +193,9 @@
 class BOOST_TEST_DECL test_tree_visitor {
 public:
     // test tree visitor interface
- virtual void visit( test_case const& ) {}
- virtual bool test_suite_start( test_suite const& ) { return true; }
+ 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:
@@ -222,18 +235,18 @@
     BOOST_READONLY_PROPERTY( counter_t, (test_case_counter)) p_count;
 private:
     // test tree visitor interface
- virtual void visit( test_case const& );
+ 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 ************** //
+// ************** test_being_aborted ************** //
 // ************************************************************************** //
 
 struct BOOST_TEST_DECL test_being_aborted {};
 
 // ************************************************************************** //
-// ************** object generators ************** //
+// ************** user_tc_method_invoker ************** //
 // ************************************************************************** //
 
 namespace ut_detail {
@@ -257,8 +270,12 @@
 
 //____________________________________________________________________________//
 
+// ************************************************************************** //
+// ************** make_test_case ************** //
+// ************************************************************************** //
+
 inline test_case*
-make_test_case( callback0<> const& test_func, const_string tc_name )
+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 );
 }
@@ -286,9 +303,9 @@
 struct BOOST_TEST_DECL auto_test_unit_registrar
 {
     // Constructors
- auto_test_unit_registrar( test_case* tc, counter_t exp_fail );
- explicit auto_test_unit_registrar( const_string ts_name );
- explicit auto_test_unit_registrar( test_unit_generator const& tc_gen );
+ 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:
@@ -297,33 +314,6 @@
 
 //____________________________________________________________________________//
 
-template<typename T>
-struct auto_tc_exp_fail {
- auto_tc_exp_fail() : m_value( 0 ) {}
-
- explicit auto_tc_exp_fail( unsigned v )
- : m_value( v )
- {
- instance() = this;
- }
-
- static auto_tc_exp_fail*& instance()
- {
- static auto_tc_exp_fail inst;
- static auto_tc_exp_fail* inst_ptr = &inst;
-
- return inst_ptr;
- }
-
- unsigned value() const { return m_value; }
-
-private:
- // Data members
- unsigned m_value;
-};
-
-//____________________________________________________________________________//
-
 } // namespace ut_detail
 
 // ************************************************************************** //

Modified: trunk/boost/test/utils/basic_cstring/basic_cstring.hpp
==============================================================================
--- trunk/boost/test/utils/basic_cstring/basic_cstring.hpp (original)
+++ trunk/boost/test/utils/basic_cstring/basic_cstring.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -720,6 +720,28 @@
 
 //____________________________________________________________________________//
 
+template<typename CharT1, typename CharT2>
+inline std::basic_string<CharT1>&
+operator+=( std::basic_string<CharT1>& target, basic_cstring<CharT2> const& str )
+{
+ target.append( str.begin(), str.end() );
+ return target;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT1, typename CharT2>
+inline std::basic_string<CharT1>
+operator+( std::basic_string<CharT1> const& lhs, basic_cstring<CharT2> const& rhs )
+{
+ std::basic_string<CharT1> res( lhs );
+
+ res.append( rhs.begin(), rhs.end() );
+ return res;
+}
+
+//____________________________________________________________________________//
+
 } // namespace unit_test
 
 } // namespace boost

Deleted: trunk/boost/test/utils/callback.hpp
==============================================================================
--- trunk/boost/test/utils/callback.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
+++ (empty file)
@@ -1,310 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2005-2010.
-// Use, modification, and distribution are subject to 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 :
-// ***************************************************************************
-
-#ifndef BOOST_TEST_CALLBACK_020505GER
-#define BOOST_TEST_CALLBACK_020505GER
-
-// Boost
-#include <boost/config.hpp>
-#include <boost/detail/workaround.hpp>
-#include <boost/shared_ptr.hpp>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) || BOOST_WORKAROUND(BOOST_INTEL, <= 700)
-# define BOOST_CALLBACK_EXPLICIT_COPY_CONSTRUCTOR
-#endif
-
-//____________________________________________________________________________//
-
-namespace boost {
-
-namespace unit_test {
-
-namespace ut_detail {
-
-struct unused {};
-
-template<typename R>
-struct invoker {
- template<typename Functor>
- R invoke( Functor& f ) { return f(); }
- template<typename Functor, typename T1>
- R invoke( Functor& f, T1 t1 ) { return f( t1 ); }
- template<typename Functor, typename T1, typename T2>
- R invoke( Functor& f, T1 t1, T2 t2 ) { return f( t1, t2 ); }
- template<typename Functor, typename T1, typename T2, typename T3>
- R invoke( Functor& f, T1 t1, T2 t2, T3 t3 ) { return f( t1, t2, t3 ); }
-};
-
-//____________________________________________________________________________//
-
-template<>
-struct invoker<unused> {
- template<typename Functor>
- unused invoke( Functor& f ) { f(); return unused(); }
- template<typename Functor, typename T1>
- unused invoke( Functor& f, T1 t1 ) { f( t1 ); return unused(); }
- template<typename Functor, typename T1, typename T2>
- unused invoke( Functor& f, T1 t1, T2 t2 ) { f( t1, t2 ); return unused(); }
- template<typename Functor, typename T1, typename T2, typename T3>
- unused invoke( Functor& f, T1 t1, T2 t2, T3 t3 ) { f( t1, t2, t3 ); return unused(); }
-};
-
-//____________________________________________________________________________//
-
-} // namespace ut_detail
-
-// ************************************************************************** //
-// ************** unit_test::callback0 ************** //
-// ************************************************************************** //
-
-namespace ut_detail {
-
-template<typename R>
-struct callback0_impl {
- virtual ~callback0_impl() {}
-
- virtual R invoke() = 0;
-};
-
-//____________________________________________________________________________//
-
-template<typename R, typename Functor>
-struct callback0_impl_t : callback0_impl<R> {
- // Constructor
- explicit callback0_impl_t( Functor f ) : m_f( f ) {}
-
- virtual R invoke() { return invoker<R>().invoke( m_f ); }
-
-private:
- // Data members
- Functor m_f;
-};
-
-//____________________________________________________________________________//
-
-} // namespace ut_detail
-
-template<typename R = ut_detail::unused>
-class callback0 {
-public:
- // Constructors
- callback0() {}
-#ifdef BOOST_CALLBACK_EXPLICIT_COPY_CONSTRUCTOR
- callback0( callback0 const& rhs ) : m_impl( rhs.m_impl ) {}
-#endif
-
- template<typename Functor>
- callback0( Functor f )
- : m_impl( new ut_detail::callback0_impl_t<R,Functor>( f ) ) {}
-
- void operator=( callback0 const& rhs ) { m_impl = rhs.m_impl; }
-
- template<typename Functor>
- void operator=( Functor f ) { m_impl.reset( new ut_detail::callback0_impl_t<R,Functor>( f ) ); }
-
- R operator()() const { return m_impl->invoke(); }
-
- bool operator!() const { return !m_impl; }
-
-private:
- // Data members
- boost::shared_ptr<ut_detail::callback0_impl<R> > m_impl;
-};
-
-// ************************************************************************** //
-// ************** unit_test::callback1 ************** //
-// ************************************************************************** //
-
-namespace ut_detail {
-
-template<typename R, typename T1>
-struct callback1_impl {
- virtual ~callback1_impl() {}
-
- virtual R invoke( T1 t1 ) = 0;
-};
-
-//____________________________________________________________________________//
-
-template<typename R, typename T1,typename Functor>
-struct callback1_impl_t : callback1_impl<R,T1> {
- // Constructor
- explicit callback1_impl_t( Functor f ) : m_f( f ) {}
-
- virtual R invoke( T1 t1 ) { return invoker<R>().invoke( m_f, t1 ); }
-
-private:
- // Data members
- Functor m_f;
-};
-
-//____________________________________________________________________________//
-
-} // namespace ut_detail
-
-template<typename T1,typename R = ut_detail::unused>
-class callback1 {
-public:
- // Constructors
- callback1() {}
-#ifdef BOOST_CALLBACK_EXPLICIT_COPY_CONSTRUCTOR
- callback1( callback1 const& rhs ) : m_impl( rhs.m_impl ) {}
-#endif
-
- template<typename Functor>
- callback1( Functor f )
- : m_impl( new ut_detail::callback1_impl_t<R,T1,Functor>( f ) ) {}
-
- void operator=( callback1 const& rhs ) { m_impl = rhs.m_impl; }
-
- template<typename Functor>
- void operator=( Functor f ) { m_impl.reset( new ut_detail::callback1_impl_t<R,T1,Functor>( f ) ); }
-
- R operator()( T1 t1 ) const { return m_impl->invoke( t1 ); }
-
- bool operator!() const { return !m_impl; }
-
-private:
- // Data members
- boost::shared_ptr<ut_detail::callback1_impl<R,T1> > m_impl;
-};
-
-// ************************************************************************** //
-// ************** unit_test::callback2 ************** //
-// ************************************************************************** //
-
-namespace ut_detail {
-
-template<typename R, typename T1,typename T2>
-struct callback2_impl {
- virtual ~callback2_impl() {}
-
- virtual R invoke( T1 t1, T2 t2 ) = 0;
-};
-
-//____________________________________________________________________________//
-
-template<typename R, typename T1, typename T2, typename Functor>
-struct callback2_impl_t : callback2_impl<R,T1,T2> {
- // Constructor
- explicit callback2_impl_t( Functor f ) : m_f( f ) {}
-
- virtual R invoke( T1 t1, T2 t2 ) { return invoker<R>().template invoke<Functor,T1,T2>( m_f, t1, t2 ); }
-
-private:
- // Data members
- Functor m_f;
-};
-
-//____________________________________________________________________________//
-
-} // namespace ut_detail
-
-template<typename T1,typename T2, typename R = ut_detail::unused>
-class callback2 {
-public:
- // Constructors
- callback2() {}
-#ifdef BOOST_CALLBACK_EXPLICIT_COPY_CONSTRUCTOR
- callback2( callback2 const& rhs ) : m_impl( rhs.m_impl ) {}
-#endif
-
- template<typename Functor>
- callback2( Functor f ) : m_impl( new ut_detail::callback2_impl_t<R,T1,T2,Functor>( f ) ) {}
-
- void operator=( callback2 const& rhs ) { m_impl = rhs.m_impl; }
-
- template<typename Functor>
- void operator=( Functor f ) { m_impl.reset( new ut_detail::callback2_impl_t<R,T1,T2,Functor>( f ) ); }
-
- R operator()( T1 t1, T2 t2 ) const { return m_impl->invoke( t1, t2 ); }
-
- bool operator!() const { return !m_impl; }
-
-private:
- // Data members
- boost::shared_ptr<ut_detail::callback2_impl<R,T1,T2> > m_impl;
-};
-
-// ************************************************************************** //
-// ************** unit_test::callback3 ************** //
-// ************************************************************************** //
-
-namespace ut_detail {
-
-template<typename R, typename T1, typename T2, typename T3>
-struct callback3_impl {
- virtual ~callback3_impl() {}
-
- virtual R invoke( T1 t1, T2 t2, T3 t3 ) = 0;
-};
-
-//____________________________________________________________________________//
-
-template<typename R, typename T1, typename T2, typename T3, typename Functor>
-struct callback3_impl_t : callback3_impl<R,T1,T2,T3> {
- // Constructor
- explicit callback3_impl_t( Functor f ) : m_f( f ) {}
-
- virtual R invoke( T1 t1, T2 t2, T3 t3 ) { return invoker<R>().invoke( m_f, t1, t2, t3 ); }
-
-private:
- // Data members
- Functor m_f;
-};
-
-//____________________________________________________________________________//
-
-} // namespace ut_detail
-
-template<typename T1,typename T2, typename T3, typename R = ut_detail::unused>
-class callback3 {
-public:
- // Constructors
- callback3() {}
-#ifdef BOOST_CALLBACK_EXPLICIT_COPY_CONSTRUCTOR
- callback3( callback3 const& rhs ) : m_impl( rhs.m_impl ) {}
-#endif
-
- template<typename Functor>
- callback3( Functor f )
- : m_impl( new ut_detail::callback3_impl_t<R,T1,T2,T3,Functor>( f ) ) {}
-
- void operator=( callback3 const& rhs ) { m_impl = rhs.m_impl; }
-
- template<typename Functor>
- void operator=( Functor f ) { m_impl.reset( new ut_detail::callback3_impl_t<R,T1,T2,T3,Functor>( f ) ); }
-
- R operator()( T1 t1, T2 t2, T3 t3 ) const { return m_impl->invoke( t1, t2, t3 ); }
-
- bool operator!() const { return !m_impl; }
-
-private:
- // Data members
- boost::shared_ptr<ut_detail::callback3_impl<R,T1,T2,T3> > m_impl;
-};
-
-} // namespace unit_test
-
-} // namespace boost
-
-#undef BOOST_CALLBACK_EXPLICIT_COPY_CONSTRUCTOR
-
-//____________________________________________________________________________//
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_CALLBACK_020505GER

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-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -79,10 +79,10 @@
 //____________________________________________________________________________//
 
 template<typename T>
-inline lazy_ostream_impl<lazy_ostream,T>
+inline lazy_ostream_impl<lazy_ostream const&,T>
 operator<<( lazy_ostream const& prev, T const& v )
 {
- return lazy_ostream_impl<lazy_ostream,T>( prev, v );
+ return lazy_ostream_impl<lazy_ostream const&,T>( prev, v );
 }
 
 //____________________________________________________________________________//
@@ -103,7 +103,9 @@
 inline lazy_ostream_impl<lazy_ostream_impl<PrevPrevType,TPrev>,R& (BOOST_TEST_CALL_DECL *)(S&)>
 operator<<( lazy_ostream_impl<PrevPrevType,TPrev> const& prev, R& (BOOST_TEST_CALL_DECL *man)(S&) )
 {
- return lazy_ostream_impl<lazy_ostream_impl<PrevPrevType,TPrev>,R& (BOOST_TEST_CALL_DECL *)(S&)>( prev, man );
+ typedef R& (BOOST_TEST_CALL_DECL * ManipType)(S&);
+
+ return lazy_ostream_impl<lazy_ostream_impl<PrevPrevType,TPrev>,ManipType>( prev, man );
 }
 
 //____________________________________________________________________________//

Modified: trunk/boost/test/utils/runtime/cla/argument_factory.hpp
==============================================================================
--- trunk/boost/test/utils/runtime/cla/argument_factory.hpp (original)
+++ trunk/boost/test/utils/runtime/cla/argument_factory.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -33,11 +33,9 @@
 
 #include <boost/test/utils/runtime/cla/iface/argument_factory.hpp>
 
-// Boost.Test
-#include <boost/test/utils/callback.hpp>
-
 // Boost
 #include <boost/optional.hpp>
+#include <boost/function/function2.hpp>
 
 namespace boost {
 
@@ -112,9 +110,9 @@
 
 // !! private?
     // Data members
- unit_test::callback2<parameter const&,T&> m_value_handler;
- unit_test::callback2<parser const&,boost::optional<T>&> m_value_generator;
- unit_test::callback2<argv_traverser&,boost::optional<T>&> m_value_interpreter;
+ boost::function<void (parameter const&,T&)> m_value_handler;
+ boost::function<void (parser const&,boost::optional<T>&)> m_value_generator;
+ boost::function<void (argv_traverser&,boost::optional<T>&)> m_value_interpreter;
 };
 
 //____________________________________________________________________________//

Modified: trunk/boost/test/utils/runtime/env/environment.hpp
==============================================================================
--- trunk/boost/test/utils/runtime/env/environment.hpp (original)
+++ trunk/boost/test/utils/runtime/env/environment.hpp 2011-10-02 05:00:16 EDT (Sun, 02 Oct 2011)
@@ -29,9 +29,6 @@
 #include <boost/test/utils/runtime/env/modifier.hpp>
 #include <boost/test/utils/runtime/env/variable.hpp>
 
-// Boost.Test
-#include <boost/test/utils/callback.hpp>
-
 // Boost
 #include <boost/optional.hpp>
 


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