diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 86019e8d..631bee29 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -25,6 +25,7 @@ PRG_EXEC_MON_SOURCES = TEST_EXEC_MON_SOURCES = compiler_log_formatter + debug execution_monitor framework plain_report_formatter @@ -44,6 +45,7 @@ TEST_EXEC_MON_SOURCES = UTF_SOURCES = compiler_log_formatter + debug exception_safety execution_monitor framework diff --git a/example/est_example2.cpp b/example/est_example2.cpp index b963ed98..44a0a9f7 100644 --- a/example/est_example2.cpp +++ b/example/est_example2.cpp @@ -17,7 +17,7 @@ using namespace boost::itest; //____________________________________________________________________________// -// Here is an exampt from simple (incorrect) stack implementation +// Here is an example of simple (incorrect) stack implementation template class stack { diff --git a/example/logged_exp_example.cpp b/example/logged_exp_example.cpp index 52a7588d..8b0e2538 100644 --- a/example/logged_exp_example.cpp +++ b/example/logged_exp_example.cpp @@ -17,7 +17,7 @@ using namespace boost::itest; //____________________________________________________________________________// -// Callaborators interfaces +// Collaborators interfaces class Stove { public: virtual void light() = 0; @@ -41,7 +41,7 @@ public: //____________________________________________________________________________// -// Callaborators mocks +// Collaborators mocks class MockStove : public ::boost::itest::mock_object<0,Stove> { public: virtual void light() diff --git a/example/unit_test_example_04.cpp b/example/unit_test_example_04.cpp index 43968e05..fb7995e3 100644 --- a/example/unit_test_example_04.cpp +++ b/example/unit_test_example_04.cpp @@ -11,7 +11,7 @@ //____________________________________________________________________________// -// automatically registerred test cases could be organized in test suites +// automatically registered test cases could be organized in test suites BOOST_AUTO_TEST_SUITE( my_suite1 ) BOOST_AUTO_TEST_CASE( my_test1 ) diff --git a/example/unit_test_example_07.cpp b/example/unit_test_example_07.cpp index b38c6fd5..da232402 100644 --- a/example/unit_test_example_07.cpp +++ b/example/unit_test_example_07.cpp @@ -26,7 +26,7 @@ BOOST_FIXTURE_TEST_SUITE( s, F ) typedef boost::mpl::list test_types; // this test case template produce a separate test case for each type listed in test_types -// each produced test case uses strct F as a fixture +// each produced test case uses struct F as a fixture BOOST_AUTO_TEST_CASE_TEMPLATE( my_test, T, test_types ) { T t = i; diff --git a/example/unit_test_example_09_1.cpp b/example/unit_test_example_09_1.cpp index 3f47bef8..fce91b06 100644 --- a/example/unit_test_example_09_1.cpp +++ b/example/unit_test_example_09_1.cpp @@ -19,7 +19,7 @@ struct MyConfig { ~MyConfig() { std::cout << "global teardown part1\n"; } }; -// structure MyConfig is used as a global fixture - it's invoked pre and post any testing is perfrmed +// structure MyConfig is used as a global fixture - it's invoked pre and post any testing is performed BOOST_GLOBAL_FIXTURE( MyConfig ) //____________________________________________________________________________// diff --git a/example/unit_test_example_10.cpp b/example/unit_test_example_10.cpp index 64634a41..9725c8ad 100644 --- a/example/unit_test_example_10.cpp +++ b/example/unit_test_example_10.cpp @@ -66,7 +66,7 @@ struct account_test { BOOST_CHECK_MESSAGE( m_account.balance() > 1.0, "Initial balance should be more then 1, was " << m_account.balance() ); - // equality assertion (not very wise idea use equlality check on floating point values) + // equality assertion (not very wise idea use equality check on floating point values) // reports 'error in "account_test::test_init": test m_account.balance() == 5.0 failed [actual_value != 5]' on error BOOST_CHECK_EQUAL( m_account.balance(), 5.0 ); diff --git a/example/unit_test_example_11.cpp b/example/unit_test_example_11.cpp index ade44446..22b412fc 100644 --- a/example/unit_test_example_11.cpp +++ b/example/unit_test_example_11.cpp @@ -30,7 +30,7 @@ test_suite* init_unit_test_suite( int /*argc*/, char* /*argv*/[] ) { framework::master_test_suite().p_name.value = "Unit test example 11"; - // parameters have no requirements to stay alive beyong the next statement + // parameters have no requirements to stay alive beyond the next statement std::string const params[] = { "hdr1 ", "hdr2", "3 " }; framework::master_test_suite().add( diff --git a/example/unit_test_example_12.cpp b/example/unit_test_example_12.cpp index a80e8667..a7857569 100644 --- a/example/unit_test_example_12.cpp +++ b/example/unit_test_example_12.cpp @@ -163,7 +163,11 @@ struct massive_hash_function_test : test_suite { test_data_store.push_back( test_data ); } - add( BOOST_PARAM_CLASS_TEST_CASE( &hash_function_tester::test, instance, test_data_store.begin(), test_data_store.end() ) ); + add( make_test_case( &hash_function_tester::test, + "hash_function_tester", + instance, + test_data_store.begin(), + test_data_store.end() ) ); } }; diff --git a/include/boost/test/debug.hpp b/include/boost/test/debug.hpp new file mode 100644 index 00000000..49101947 --- /dev/null +++ b/include/boost/test/debug.hpp @@ -0,0 +1,107 @@ +// (C) Copyright Gennadiy Rozental 2006-2007. +// 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 portable debug interfaces +// *************************************************************************** + +#ifndef BOOST_TEST_DEBUG_API_HPP_112006GER +#define BOOST_TEST_DEBUG_API_HPP_112006GER + +// Boost.Test +#include +#include +#include + +// STL +#include + +#include + +//____________________________________________________________________________// + +namespace boost { + +namespace debug { + +// ************************************************************************** // +// ************** check if program is running under debugger ************** // +// ************************************************************************** // + +bool BOOST_TEST_DECL under_debugger(); + +// ************************************************************************** // +// ************** cause program to break execution ************** // +// ************** in debugger at call point ************** // +// ************************************************************************** // + +void BOOST_TEST_DECL debugger_break(); + +// ************************************************************************** // +// ************** gui debugger setup ************** // +// ************************************************************************** // + +struct dbg_startup_info { + long pid; + bool break_or_continue; + unit_test::const_string binary_path; + unit_test::const_string display; + unit_test::const_string init_done_lock; +}; + +typedef unit_test::callback1 dbg_starter; + +// ************************************************************************** // +// ************** debugger setup ************** // +// ************************************************************************** // + +#if BOOST_WORKAROUND( BOOST_MSVC, <1300) + +std::string BOOST_TEST_DECL set_debugger( unit_test::const_string dbg_id ); + +#else + +std::string BOOST_TEST_DECL set_debugger( unit_test::const_string dbg_id, dbg_starter s = dbg_starter() ); + +#endif + + +// ************************************************************************** // +// ************** attach debugger to the current process ************** // +// ************************************************************************** // + +bool BOOST_TEST_DECL attach_debugger( bool break_or_continue = true ); + +// ************************************************************************** // +// ************** switch on/off detect memory leaks feature ************** // +// ************************************************************************** // + +void BOOST_TEST_DECL detect_memory_leaks( bool on_off ); + +// ************************************************************************** // +// ************** cause program to break execution in ************** // +// ************** debugger at specific allocation point ************** // +// ************************************************************************** // + +void BOOST_TEST_DECL break_memory_alloc( long mem_alloc_order_num ); + +} // namespace debug + +} // namespace boost + +#include + +// *************************************************************************** +// Revision History : +// +// $Log$ +// *************************************************************************** + +#endif diff --git a/include/boost/test/debug_config.hpp b/include/boost/test/debug_config.hpp new file mode 100644 index 00000000..38745ae1 --- /dev/null +++ b/include/boost/test/debug_config.hpp @@ -0,0 +1,30 @@ +// (C) Copyright Gennadiy Rozental 2006-2007. +// 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 : user's config for Boost.Test debugging support +// *************************************************************************** + +#ifndef BOOST_TEST_DEBUG_CONFIG_HPP_112006GER +#define BOOST_TEST_DEBUG_CONFIG_HPP_112006GER + +// ';' separated list of supported debuggers +// #define BOOST_TEST_DBG_LIST gdb;dbx + +// maximum size of /proc/pid/stat file +// #define BOOST_TEST_STAT_LINE_MAX + +// *************************************************************************** +// Revision History : +// +// $Log$ +// *************************************************************************** + +#endif diff --git a/include/boost/test/impl/debug.ipp b/include/boost/test/impl/debug.ipp new file mode 100644 index 00000000..c8205cd6 --- /dev/null +++ b/include/boost/test/impl/debug.ipp @@ -0,0 +1,969 @@ +// (C) Copyright Gennadiy Rozental 2006. +// Use, modification, and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// 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 : debug interfaces implementation +// *************************************************************************** + +#ifndef BOOST_TEST_DEBUG_API_IPP_112006GER +#define BOOST_TEST_DEBUG_API_IPP_112006GER + +// Boost.Test +#include +#include +#include + +#include +#include + +// Implementation in windows +#if defined(_WIN32) && !defined(BOOST_DISABLE_WIN32) // ******* WIN32 + +# define BOOST_WIN32_BASED_DEBUG + +// SYSTEM API +# include +# include +# include + +# if !defined(NDEBUG) && defined(_MSC_VER) +# define BOOST_MS_CRT_BASED_DEBUG +# include +# endif + + +# if BOOST_WORKAROUND( BOOST_MSVC, <1300) +# define snprintf _snprintf +# endif + +# ifdef BOOST_NO_STDC_NAMESPACE +namespace std { using ::memset; using ::sprintf; } +# endif + +#elif defined(unix) || defined(__unix) // ********************* UNIX + +# define BOOST_UNIX_BASED_DEBUG + +// Boost.Test +#include +#include + +// STL +#include +#include // !! ?? cstdarg + +// SYSTEM API +# include +# include +# include + +# include +# include +# include + +# if defined(sun) || defined(__sun) + +# define BOOST_SUN_BASED_DEBUG + +# ifndef BOOST_TEST_DBG_LIST +# define BOOST_TEST_DBG_LIST dbx;gdb +# endif + +# define BOOST_TEST_CNL_DBG dbx +# define BOOST_TEST_GUI_DBG dbx-ddd + +# include + +# elif defined(linux) || defined(__linux) + +# define BOOST_LINUX_BASED_DEBUG + +# include + +# ifndef BOOST_TEST_STAT_LINE_MAX +# define BOOST_TEST_STAT_LINE_MAX 500 +# endif + +# ifndef BOOST_TEST_DBG_LIST +# define BOOST_TEST_DBG_LIST gdb +# endif + +# define BOOST_TEST_CNL_DBG gdb +# define BOOST_TEST_GUI_DBG gdb-xterm + +# endif + +#endif + +#include + +//____________________________________________________________________________// + +namespace boost { + +namespace debug { + +using unit_test::const_string; + +// ************************************************************************** // +// ************** debug::info_t ************** // +// ************************************************************************** // + +namespace { + +#if defined(BOOST_WIN32_BASED_DEBUG) // *********************** WIN32 + +template +inline void +dyn_symbol( T& res, char const* module_name, char const* symbol_name ) +{ + HMODULE m = ::GetModuleHandle( module_name ); + + if( !m ) + m = ::LoadLibrary( module_name ); + + res = reinterpret_cast( ::GetProcAddress( m, symbol_name ) ); +} + +//____________________________________________________________________________// + +static struct info_t { + typedef BOOL (WINAPI* IsDebuggerPresentT)(); + typedef LONG (WINAPI* RegQueryValueExT)( HKEY, LPTSTR, LPDWORD, LPDWORD, LPBYTE, LPDWORD ); + typedef LONG (WINAPI* RegOpenKeyT)( HKEY, LPCTSTR, PHKEY ); + typedef LONG (WINAPI* RegCloseKeyT)( HKEY ); + + info_t(); + + IsDebuggerPresentT m_is_debugger_present; + RegOpenKeyT m_reg_open_key; + RegQueryValueExT m_reg_query_value; + RegCloseKeyT m_reg_close_key; + +} s_info; + +//____________________________________________________________________________// + +info_t::info_t() +{ + dyn_symbol( m_is_debugger_present, "kernel32", "IsDebuggerPresent" ); + dyn_symbol( m_reg_open_key, "advapi32", "RegOpenKeyA" ); + dyn_symbol( m_reg_query_value, "advapi32", "RegQueryValueExA" ); + dyn_symbol( m_reg_close_key, "advapi32", "RegCloseKey" ); +} + +//____________________________________________________________________________// + +#elif defined(BOOST_UNIX_BASED_DEBUG) + +// ************************************************************************** // +// ************** fd_holder ************** // +// ************************************************************************** // + +struct fd_holder { + explicit fd_holder( int fd ) : m_fd( fd ) {} + ~fd_holder() + { + if( m_fd != -1 ) + ::close( m_fd ); + } + + operator int() { return m_fd; } + +private: + // Data members + int m_fd; +}; + + +// ************************************************************************** // +// ************** process_info ************** // +// ************************************************************************** // + +struct process_info { + // Constructor + explicit process_info( int pid ); + + // access methods + int parent_pid() const { return m_parent_pid; } + const_string binary_name() const { return m_binary_name; } + const_string binary_path() const { return m_binary_path; } + +private: + // Data members + int m_parent_pid; + const_string m_binary_name; + const_string m_binary_path; + +#if defined(BOOST_SUN_BASED_DEBUG) + struct psinfo m_psi; +#elif defined(BOOST_LINUX_BASED_DEBUG) + char m_stat_line[BOOST_TEST_STAT_LINE_MAX+1]; +#endif + char m_binary_path_buff[500+1]; // !! ?? +}; + +//____________________________________________________________________________// + +process_info::process_info( int pid ) +: m_parent_pid( 0 ) +{ +#if defined(BOOST_SUN_BASED_DEBUG) + char fname_buff[30]; + + ::snprintf( fname_buff, sizeof(fname_buff), "/proc/%d/psinfo", pid ); + + fd_holder psinfo_fd( ::open( fname_buff, O_RDONLY ) ); + + if( psinfo_fd == -1 ) + return; + + if( ::read( psinfo_fd, &m_psi, sizeof(m_psi) ) == -1 ) + return; + + m_parent_pid = m_psi.pr_ppid; + + m_binary_name.assign( m_psi.pr_fname ); + + //-------------------------- // + + ::snprintf( fname_buff, sizeof(fname_buff), "/proc/%d/as", pid ); + + fd_holder as_fd( ::open( fname_buff, O_RDONLY ) ); + uintptr_t binary_name_pos; + + // !! ?? could we avoid reading whole m_binary_path_buff? + if( as_fd == -1 || + ::lseek( as_fd, m_psi.pr_argv, SEEK_SET ) == -1 || + ::read ( as_fd, &binary_name_pos, sizeof(binary_name_pos) ) == -1 || + ::lseek( as_fd, binary_name_pos, SEEK_SET ) == -1 || + ::read ( as_fd, m_binary_path_buff, sizeof(m_binary_path_buff) ) == -1 ) + return; + + m_binary_path.assign( m_binary_path_buff ); + +#elif defined(BOOST_LINUX_BASED_DEBUG) + char fname_buff[30]; + + ::snprintf( fname_buff, sizeof(fname_buff), "/proc/%d/stat", pid ); + + fd_holder psinfo_fd( ::open( fname_buff, O_RDONLY ) ); + + if( psinfo_fd == -1 ) + return; + + ssize_t num_read = ::read( psinfo_fd, m_stat_line, sizeof(m_stat_line)-1 ); + if( num_read == -1 ) + return; + + m_stat_line[num_read] = 0; + + char const* name_beg = m_stat_line; + while( *name_beg && *name_beg != '(' ) + ++name_beg; + + char const* name_end = name_beg+1; + while( *name_end && *name_end != ')' ) + ++name_end; + + std::sscanf( name_end+1, "%*s%d", &m_parent_pid ); + + m_binary_name.assign( name_beg+1, name_end ); + + ::snprintf( fname_buff, sizeof(fname_buff), "/proc/%d/exe", pid ); + num_read = ::readlink( fname_buff, m_binary_path_buff, sizeof(m_binary_path_buff)-1 ); + + if( num_read == -1 ) + return; + + m_binary_path_buff[num_read] = 0; + m_binary_path.assign( m_binary_path_buff, num_read ); +#endif +} + +//____________________________________________________________________________// + +// ************************************************************************** // +// ************** prepare_window_title ************** // +// ************************************************************************** // + +static char* +prepare_window_title( dbg_startup_info const& dsi ) +{ + typedef unit_test::const_string str_t; + + static char title_str[50]; + + str_t path_sep( "\\/" ); + + str_t::iterator it = unit_test::find_last_of( dsi.binary_path.begin(), dsi.binary_path.end(), + path_sep.begin(), path_sep.end() ); + + if( it == dsi.binary_path.end() ) + it = dsi.binary_path.begin(); + else + ++it; + + ::snprintf( title_str, sizeof(title_str), "%*s %ld", dsi.binary_path.end()-it, it, dsi.pid ); + + return title_str; +} + +//____________________________________________________________________________// + +// ************************************************************************** // +// ************** save_execlp ************** // +// ************************************************************************** // + +typedef unit_test::basic_cstring mbuffer; + +inline char* +copy_arg( mbuffer& dest, const_string arg ) +{ + if( dest.size() < arg.size()+1 ) + return 0; + + char* res = dest.begin(); + + std::memcpy( res, arg.begin(), arg.size()+1 ); + + dest.trim_left( arg.size()+1 ); + + return res; +} + +//____________________________________________________________________________// + +bool +safe_execlp( char const* file, ... ) +{ + static char* argv_buff[200]; + + va_list args; + char const* arg; + + // first calculate actual number of arguments + int num_args = 2; // file name and 0 at least + + va_start( args, file ); + while( !!(arg = va_arg( args, char const* )) ) + num_args++; + va_end( args ); + + // reserve space for the argument pointers array + char** argv_it = argv_buff; + mbuffer work_buff( reinterpret_cast(argv_buff), sizeof(argv_buff) ); + work_buff.trim_left( num_args * sizeof(char*) ); + + // copy all the argument values into local storage + if( !(*argv_it++ = copy_arg( work_buff, file )) ) + return false; + + printf( "!! %s\n", file ); + + va_start( args, file ); + while( !!(arg = va_arg( args, char const* )) ) { + printf( "!! %s\n", arg ); + if( !(*argv_it++ = copy_arg( work_buff, arg )) ) + return false; + } + va_end( args ); + + *argv_it = 0; + + return ::execvp( file, argv_buff ) != -1; +} + +//____________________________________________________________________________// + +// ************************************************************************** // +// ************** start_debugger_in_emacs ************** // +// ************************************************************************** // + +static void +start_debugger_in_emacs( dbg_startup_info const& dsi, char const* emacs_name, char const* dbg_command ) +{ + char const* title = prepare_window_title( dsi ); + + if( !title ) + return; + + dsi.display.is_empty() + ? safe_execlp( emacs_name, "-title", title, "--eval", dbg_command, 0 ) + : safe_execlp( emacs_name, "-title", title, "-display", dsi.display.begin(), "--eval", dbg_command, 0 ); +} + +//____________________________________________________________________________// + +// ************************************************************************** // +// ************** gdb starters ************** // +// ************************************************************************** // + +static char const* +prepare_gdb_cmnd_file( dbg_startup_info const& dsi ) +{ + // prepare pid value + char pid_buff[16]; + ::snprintf( pid_buff, sizeof(pid_buff), "%ld", dsi.pid ); + unit_test::const_string pid_str( pid_buff ); + + static char cmd_file_name[] = "/tmp/btl_gdb_cmd_XXXXXX"; // !! ?? + + // prepare commands + fd_holder cmd_fd( ::mkstemp( cmd_file_name ) ); + + if( cmd_fd == -1 ) + return 0; + +#define WRITE_STR( str ) if( ::write( cmd_fd, str.begin(), str.size() ) == -1 ) return 0; +#define WRITE_CSTR( str ) if( ::write( cmd_fd, str, sizeof( str )-1 ) == -1 ) return 0; + + WRITE_CSTR( "file " ); + WRITE_STR( dsi.binary_path ); + WRITE_CSTR( "\nattach " ); + WRITE_STR( pid_str ); + WRITE_CSTR( "\nshell unlink " ); + WRITE_STR( dsi.init_done_lock ); + WRITE_CSTR( "\ncont" ); + if( dsi.break_or_continue ) + WRITE_CSTR( "\nup 4" ); + + WRITE_CSTR( "\necho \\n" ); // !! ?? + WRITE_CSTR( "\nlist -" ); + WRITE_CSTR( "\nlist" ); + WRITE_CSTR( "\nshell unlink " ); + WRITE_CSTR( cmd_file_name ); + + return cmd_file_name; +} + +//____________________________________________________________________________// + +static void +start_gdb_in_console( dbg_startup_info const& dsi ) +{ + char const* cmnd_file_name = prepare_gdb_cmnd_file( dsi ); + + if( !cmnd_file_name ) + return; + + safe_execlp( "gdb", "-q", "-x", cmnd_file_name, 0 ); +} + +//____________________________________________________________________________// + +static void +start_gdb_in_xterm( dbg_startup_info const& dsi ) +{ + char const* title = prepare_window_title( dsi ); + char const* cmnd_file_name = prepare_gdb_cmnd_file( dsi ); + + if( !title || !cmnd_file_name ) + return; + + safe_execlp( "xterm", "-T", title, "-display", dsi.display.begin(), + "-bg", "black", "-fg", "white", "-geometry", "88x30+10+10", "-fn", "9x15", "-e", + "gdb", "-q", "-x", cmnd_file_name, 0 ); +} + +//____________________________________________________________________________// + +static void +start_gdb_in_emacs( dbg_startup_info const& dsi ) +{ + char const* cmnd_file_name = prepare_gdb_cmnd_file( dsi ); + if( !cmnd_file_name ) + return; + + char dbg_cmd_buff[500]; // !! ?? + ::snprintf( dbg_cmd_buff, sizeof(dbg_cmd_buff), "(progn (gdb \"gdb -q -x %s\"))", cmnd_file_name ); + + start_debugger_in_emacs( dsi, "emacs", dbg_cmd_buff ); +} + +//____________________________________________________________________________// + +static void +start_gdb_in_xemacs( dbg_startup_info const& dsi ) +{ + // !! ?? +} + +//____________________________________________________________________________// + +// ************************************************************************** // +// ************** dbx starters ************** // +// ************************************************************************** // + +static char const* +prepare_dbx_cmd_line( dbg_startup_info const& dsi, bool list_source = true ) +{ + static char cmd_line_buff[500]; // !! ?? + + ::snprintf( cmd_line_buff, sizeof(cmd_line_buff), "unlink %s;cont;%s%s", + dsi.init_done_lock.begin(), + dsi.break_or_continue ? "up 2;": "", + list_source ? "echo \" \";list -w3;" : "" ); + + return cmd_line_buff; +} + +//____________________________________________________________________________// + +static void +start_dbx_in_console( dbg_startup_info const& dsi ) +{ + char pid_buff[16]; + ::snprintf( pid_buff, sizeof(pid_buff), "%ld", dsi.pid ); + + safe_execlp( "dbx", "-q", "-c", prepare_dbx_cmd_line( dsi ), dsi.binary_path.begin(), pid_buff, 0 ); +} + +//____________________________________________________________________________// + +static void +start_dbx_in_xterm( dbg_startup_info const& dsi ) +{ + char const* title = prepare_window_title( dsi ); + if( !title ) + return; + + char pid_buff[16]; // !! ?? + ::snprintf( pid_buff, sizeof(pid_buff), "%ld", dsi.pid ); + + safe_execlp( "xterm", "-T", title, "-display", dsi.display.begin(), + "-bg", "black", "-fg", "white", "-geometry", "88x30+10+10", "-fn", "9x15", "-e", + "dbx", "-q", "-c", prepare_dbx_cmd_line( dsi ), dsi.binary_path.begin(), pid_buff, 0 ); +} + +//____________________________________________________________________________// + +static void +start_dbx_in_emacs( dbg_startup_info const& dsi ) +{ +// char dbg_cmd_buff[500]; // !! ?? +// +// ::snprintf( dbg_cmd_buff, sizeof(dbg_cmd_buff), "(progn (dbx \"dbx -q -c cont %s %ld\"))", dsi.binary_path.begin(), dsi.pid ); + +// start_debugger_in_emacs( dsi, "emacs", dbg_cmd_buff ); +} + +//____________________________________________________________________________// + +static void +start_dbx_in_xemacs( dbg_startup_info const& dsi ) +{ + // !! ?? +} + +//____________________________________________________________________________// + +static void +start_dbx_in_ddd( dbg_startup_info const& dsi ) +{ + char const* title = prepare_window_title( dsi ); + if( !title ) + return; + + char pid_buff[16]; // !! ?? + ::snprintf( pid_buff, sizeof(pid_buff), "%ld", dsi.pid ); + + safe_execlp( "ddd", "-display", dsi.display.begin(), + "--dbx", "-q", "-c", prepare_dbx_cmd_line( dsi, false ), dsi.binary_path.begin(), pid_buff, 0 ); +} + +//____________________________________________________________________________// + +// ************************************************************************** // +// ************** debug::info_t ************** // +// ************************************************************************** // + +static struct info_t { + // Constructor + info_t(); + + // Public properties + unit_test::readwrite_property p_dbg; + + // Data members + std::map m_dbg_starter_reg; +} s_info; + +//____________________________________________________________________________// + +info_t::info_t() +{ + p_dbg.value = ::getenv( "DISPLAY" ) + ? std::string( BOOST_STRINGIZE( BOOST_TEST_GUI_DBG ) ) + : std::string( BOOST_STRINGIZE( BOOST_TEST_CNL_DBG ) ); + + m_dbg_starter_reg[std::string("gdb")] = &start_gdb_in_console; + m_dbg_starter_reg[std::string("gdb-emacs")] = &start_gdb_in_emacs; + m_dbg_starter_reg[std::string("gdb-xterm")] = &start_gdb_in_xterm; + m_dbg_starter_reg[std::string("gdb-xemacs")] = &start_gdb_in_xemacs; + + m_dbg_starter_reg[std::string("dbx")] = &start_dbx_in_console; + m_dbg_starter_reg[std::string("dbx-emacs")] = &start_dbx_in_emacs; + m_dbg_starter_reg[std::string("dbx-xterm")] = &start_dbx_in_xterm; + m_dbg_starter_reg[std::string("dbx-xemacs")] = &start_dbx_in_xemacs; + m_dbg_starter_reg[std::string("dbx-ddd")] = &start_dbx_in_ddd; +} + +//____________________________________________________________________________// + +#endif + +} // local namespace + +// ************************************************************************** // +// ************** check if program is running under debugger ************** // +// ************************************************************************** // + +bool +under_debugger() +{ +#if defined(BOOST_WIN32_BASED_DEBUG) // *********************** WIN32 + + return !!s_info.m_is_debugger_present && s_info.m_is_debugger_present(); + +#elif defined(BOOST_UNIX_BASED_DEBUG) // ********************** UNIX + + // !! ?? could/should we cache the result somehow? + const_string dbg_list = BOOST_TEST_STRINGIZE( BOOST_TEST_DBG_LIST ); + + pid_t pid = ::getpid(); + + while( pid != 0 ) { + process_info pi( pid ); + + // !! ?? should we use tokenizer here instead? + if( dbg_list.find( pi.binary_name() ) != const_string::npos ) + return true; + + pid = pi.parent_pid(); + } + + return false; + +#else // ****************************************************** default + + return false; + +#endif +} + +//____________________________________________________________________________// + +// ************************************************************************** // +// ************** cause program to break execution ************** // +// ************** in debugger at call point ************** // +// ************************************************************************** // + +void +debugger_break() +{ + // !! ?? auto-start debugger? + +#if defined(BOOST_WIN32_BASED_DEBUG) // *********************** WIN32 + +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1300) || \ + BOOST_WORKAROUND(__GNUC__, >= 3) && !defined(__MINGW32__) || \ + defined(__INTEL_COMPILER) +# define BOOST_DEBUG_BREAK __debugbreak +#else +# define BOOST_DEBUG_BREAK DebugBreak +#endif + +#ifndef __MINGW32__ + if( !under_debugger() ) { + __try { + __try { + BOOST_DEBUG_BREAK(); + } + __except( UnhandledExceptionFilter(GetExceptionInformation()) ) + { + // User opted to ignore the breakpoint + return; + } + } + __except (EXCEPTION_EXECUTE_HANDLER) + { + // If we got here, the user has pushed Debug. Debugger is already attached to our process and we + // continue to let the another BOOST_DEBUG_BREAK to be called. + } + } +#endif + + BOOST_DEBUG_BREAK(); + +#elif defined(BOOST_UNIX_BASED_DEBUG) // ********************** UNIX + + ::kill( ::getpid(), SIGTRAP ); + +#else // ****************************************************** default + +#endif +} + +//____________________________________________________________________________// + +// ************************************************************************** // +// ************** console debugger setup ************** // +// ************************************************************************** // + +#if BOOST_WORKAROUND( BOOST_MSVC, <1300) +std::string +set_debugger( unit_test::const_string dbg_id ) +{ + dbg_starter s; +#else +std::string +set_debugger( unit_test::const_string dbg_id, dbg_starter s ) +{ +#endif + +#if defined(BOOST_UNIX_BASED_DEBUG) // ************************ UNIX + + std::string old = s_info.p_dbg; + + assign_op( s_info.p_dbg.value, dbg_id, 0 ); + + if( !!s ) + s_info.m_dbg_starter_reg[s_info.p_dbg] = s; + + return old; + +#else // ***************************************************** default + + return std::string(); + +#endif +} + +//____________________________________________________________________________// + +// ************************************************************************** // +// ************** attach debugger to the current process ************** // +// ************************************************************************** // + +bool +attach_debugger( bool break_or_continue ) +{ + if( under_debugger() ) + return false; + +#if defined(BOOST_WIN32_BASED_DEBUG) // *********************** WIN32 + + const int MAX_CMD_LINE = 200; + + // *************************************************** // + // Debugger "ready" event + + SECURITY_ATTRIBUTES attr; + attr.nLength = sizeof(attr); + attr.lpSecurityDescriptor = NULL; + attr.bInheritHandle = true; + + // manual resettable, initially non signaled, unnamed event, + // that will signal me that debugger initialization is done + HANDLE dbg_init_done_ev = ::CreateEvent( + &attr, // pointer to security attributes + true, // flag for manual-reset event + false, // flag for initial state + NULL // pointer to event-object name + ); + + if( !dbg_init_done_ev ) + return false; + + // *************************************************** // + // Debugger command line format + + HKEY reg_key; + + if( !s_info.m_reg_open_key || (*s_info.m_reg_open_key)( + HKEY_LOCAL_MACHINE, // handle of open key + "Software\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug", // name of subkey to open + ®_key ) != ERROR_SUCCESS ) // address of handle of open key + return false; + + char format[MAX_CMD_LINE]; + DWORD format_size = MAX_CMD_LINE; + DWORD type = REG_SZ; + + if( !s_info.m_reg_query_value || (*s_info.m_reg_query_value)( + reg_key, // handle of open key + "Debugger", // name of subkey to query + 0, // reserved + &type, // value type + (LPBYTE)format, // buffer for returned string + &format_size ) != ERROR_SUCCESS ) // in: buffer size; out: actual size of returned string + return false; + + if( !s_info.m_reg_close_key || (*s_info.m_reg_close_key)( reg_key ) != ERROR_SUCCESS ) + return false; + + // *************************************************** // + // Debugger command line + + char cmd_line[MAX_CMD_LINE]; + std::sprintf( cmd_line, format, ::GetCurrentProcessId(), dbg_init_done_ev ); + + // *************************************************** // + // Debugger window parameters + + STARTUPINFOA startup_info; + std::memset( &startup_info, 0, sizeof(startup_info) ); + + startup_info.cb = sizeof(startup_info); + startup_info.dwFlags = STARTF_USESHOWWINDOW; + startup_info.wShowWindow = SW_SHOWNORMAL; + + // debugger process s_info + PROCESS_INFORMATION debugger_info; + + bool created = !!::CreateProcess( + NULL, // pointer to name of executable module; NULL - use the one in command line + cmd_line, // pointer to command line string + NULL, // pointer to process security attributes; NULL - debugger's handle couldn't be inherited + NULL, // pointer to thread security attributes; NULL - debugger's handle couldn't be inherited + true, // debugger inherit opened handles + 0, // priority flags; 0 - normal priority + NULL, // pointer to new environment block; NULL - use this process environment + NULL, // pointer to current directory name; NULL - use this process correct directory + &startup_info, // pointer to STARTUPINFO that specifies main window appearance + &debugger_info // pointer to PROCESS_INFORMATION that will contain the new process identification + ); + + if( created ) + ::WaitForSingleObject( dbg_init_done_ev, INFINITE ); + + ::CloseHandle( dbg_init_done_ev ); + + if( !created ) + return false; + +#elif defined(BOOST_UNIX_BASED_DEBUG) // ********************** UNIX + + char init_done_lock_fn[] = "/tmp/btl_dbg_init_done_XXXXXX"; + fd_holder init_done_lock_fd( ::mkstemp( init_done_lock_fn ) ); + + if( init_done_lock_fd == -1 ) + return false; + + pid_t child_pid = fork(); + + if( child_pid == -1 ) + return false; + + if( child_pid != 0 ) { // parent process - here we will start the debugger + dbg_startup_info dsi; + + process_info pi( child_pid ); + if( pi.binary_path().is_empty() ) + ::exit( -1 ); + + dsi.pid = child_pid; + dsi.break_or_continue = break_or_continue; + dsi.binary_path = pi.binary_path(); + dsi.display = ::getenv( "DISPLAY" ); + dsi.init_done_lock = init_done_lock_fn; + + dbg_starter starter = s_info.m_dbg_starter_reg[s_info.p_dbg]; + if( !!starter ) + starter( dsi ); + + ::perror( "Boost.Test execution monitor failed to start a debugger:" ); + + ::exit( -1 ); + } + + // child process - here we will continue our test module execution ; // !! ?? should it be vice versa + + while( ::access( init_done_lock_fn, F_OK ) == 0 ) { + struct timeval to = { 0, 100 }; + + ::select( 0, 0, 0, 0, &to ); + } + +// char dummy; +// while( ::read( init_done_lock_fd, &dummy, sizeof(char) ) == 0 ); + +#else // ****************************************************** default + + return false; + +#endif + + if( break_or_continue ) + debugger_break(); + + return true; +} + +//____________________________________________________________________________// + +// ************************************************************************** // +// ************** switch on/off detect memory leaks feature ************** // +// ************************************************************************** // + +void +detect_memory_leaks( bool on_off ) +{ + unit_test::ut_detail::ignore_unused_variable_warning( on_off ); + +#ifdef BOOST_MS_CRT_BASED_DEBUG + int flags = _CrtSetDbgFlag( _CRTDBG_REPORT_FLAG ); + + if( !on_off ) + flags &= ~_CRTDBG_LEAK_CHECK_DF; + else { + flags |= _CRTDBG_LEAK_CHECK_DF; + _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE); + _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDOUT); + } + + _CrtSetDbgFlag ( flags ); +#endif // BOOST_MS_CRT_BASED_DEBUG +} + +//____________________________________________________________________________// + +// ************************************************************************** // +// ************** cause program to break execution in ************** // +// ************** debugger at specific allocation point ************** // +// ************************************************************************** // + +void +break_memory_alloc( long mem_alloc_order_num ) +{ + unit_test::ut_detail::ignore_unused_variable_warning( mem_alloc_order_num ); + +#ifdef BOOST_MS_CRT_BASED_DEBUG + _CrtSetBreakAlloc( mem_alloc_order_num ); +#endif // BOOST_MS_CRT_BASED_DEBUG +} + +} // namespace debug + +} // namespace boost + +//____________________________________________________________________________// + +#include + + +// *************************************************************************** +// Revision History : +// +// $Log$ +// *************************************************************************** + +#endif // BOOST_TEST_DEBUG_API_IPP_112006GER diff --git a/include/boost/test/impl/exception_safety.ipp b/include/boost/test/impl/exception_safety.ipp index f8c95445..5e1c43e3 100644 --- a/include/boost/test/impl/exception_safety.ipp +++ b/include/boost/test/impl/exception_safety.ipp @@ -35,6 +35,7 @@ #include #include #include +#include #include @@ -390,7 +391,7 @@ void exception_safety_tester::failure_point() { if( m_exec_path_counter == m_break_exec_path ) - BOOST_ASSERT( false ); + debug::debugger_break(); throw unique_exception(); } diff --git a/include/boost/test/impl/execution_monitor.ipp b/include/boost/test/impl/execution_monitor.ipp index 575aba05..5264d7e7 100644 --- a/include/boost/test/impl/execution_monitor.ipp +++ b/include/boost/test/impl/execution_monitor.ipp @@ -28,6 +28,7 @@ #include #include #include +#include // Boost #include // for exit codes @@ -687,7 +688,11 @@ static void execution_monitor_jumping_signal_handler( int sig, siginfo_t* info, static void execution_monitor_attaching_signal_handler( int sig, siginfo_t* info, void* context ) { + if( !debug::attach_debugger( false ) ) execution_monitor_jumping_signal_handler( sig, info, context ); + + // debugger attached; it will handle the signal + BOOST_TEST_SYS_ASSERT( ::signal( sig, SIG_DFL ) != SIG_ERR ); } //____________________________________________________________________________// @@ -781,6 +786,13 @@ system_signal_exception::operator()( unsigned int id, _EXCEPTION_POINTERS* exps if( !m_em->p_catch_system_errors || (id == MSFT_CPP_EXCEPT) ) return EXCEPTION_CONTINUE_SEARCH; + if( !!m_em->p_auto_start_dbg && debug::attach_debugger( false ) ) { + m_em->p_catch_system_errors.value = false; + _set_se_translator( &seh_catch_preventer ); + + return EXCEPTION_CONTINUE_EXECUTION; + } + m_se_id = id; if( m_se_id == EXCEPTION_ACCESS_VIOLATION && exps->ExceptionRecord->NumberParameters == 2 ) { m_fault_address = (void*)exps->ExceptionRecord->ExceptionInformation[1]; @@ -1038,6 +1050,9 @@ execution_monitor::catch_signals( unit_test::callback0 const& F ) int execution_monitor::execute( unit_test::callback0 const& F ) { + if( debug::under_debugger() ) + p_catch_system_errors.value = false; + try { return catch_signals( F ); } diff --git a/include/boost/test/impl/framework.ipp b/include/boost/test/impl/framework.ipp index a568ba45..c1782b53 100644 --- a/include/boost/test/impl/framework.ipp +++ b/include/boost/test/impl/framework.ipp @@ -18,6 +18,7 @@ // Boost.Test #include #include +#include #include #include #include @@ -241,8 +242,8 @@ init( init_unit_test_func init_func, int argc, char* argv[] ) register_observer( progress_monitor ); if( runtime_config::detect_memory_leaks() > 0 ) { -// detect_memory_leaks( true ); -// break_memory_alloc( runtime_config::detect_memory_leaks() ); + debug::detect_memory_leaks( true ); + debug::break_memory_alloc( runtime_config::detect_memory_leaks() ); } // init master unit test suite diff --git a/include/boost/test/impl/unit_test_parameters.ipp b/include/boost/test/impl/unit_test_parameters.ipp index 3cc7016b..5266d517 100644 --- a/include/boost/test/impl/unit_test_parameters.ipp +++ b/include/boost/test/impl/unit_test_parameters.ipp @@ -24,6 +24,7 @@ #include #include #include +#include // Boost #include @@ -235,8 +236,11 @@ init( int* argc, char** argv ) if( dbg.is_empty() || dbg == "no" ) s_auto_start_dbg = false; - else { + else { s_auto_start_dbg = true; + + if( dbg != "yes" ) + debug::set_debugger( dbg ); } } diff --git a/include/boost/test/included/unit_test.hpp b/include/boost/test/included/unit_test.hpp index 8cee77fa..79be4b16 100644 --- a/include/boost/test/included/unit_test.hpp +++ b/include/boost/test/included/unit_test.hpp @@ -16,6 +16,7 @@ #define BOOST_INCLUDED_UNIT_TEST_FRAMEWORK_HPP_071894GER #include +#include #include #include #include diff --git a/include/boost/test/minimal.hpp b/include/boost/test/minimal.hpp index bfff05b0..7c29c7a7 100644 --- a/include/boost/test/minimal.hpp +++ b/include/boost/test/minimal.hpp @@ -35,6 +35,7 @@ // Boost.Test #include #include +#include #include #include diff --git a/src/compiler_log_formatter.cpp b/src/compiler_log_formatter.cpp index 2ee26d46..fa6bc259 100644 --- a/src/compiler_log_formatter.cpp +++ b/src/compiler_log_formatter.cpp @@ -15,17 +15,4 @@ #define BOOST_TEST_SOURCE #include -// *************************************************************************** -// Revision History : -// -// $Log$ -// Revision 1.2 2005/03/22 07:18:39 rogeeff -// no message -// -// Revision 1.1 2005/02/01 09:01:00 rogeeff -// supplied_log_formatters split -// change formatters interface to simplify result interface -// -// *************************************************************************** - // EOF diff --git a/src/cpp_main.cpp b/src/cpp_main.cpp index dc7bc206..2912bc13 100644 --- a/src/cpp_main.cpp +++ b/src/cpp_main.cpp @@ -15,16 +15,5 @@ #define BOOST_TEST_SOURCE #include -// *************************************************************************** -// Revision History : -// -// $Log$ -// Revision 1.17 2005/03/22 07:18:39 rogeeff -// no message -// -// Revision 1.16 2005/01/22 19:26:35 rogeeff -// implementation moved into headers section to eliminate dependency of included/minimal component on src directory -// -// *************************************************************************** - // EOF + diff --git a/src/debug.cpp b/src/debug.cpp new file mode 100644 index 00000000..dde4b678 --- /dev/null +++ b/src/debug.cpp @@ -0,0 +1,24 @@ +// (C) Copyright Gennadiy Rozental 2006. +// 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 : forwarding source +// *************************************************************************** + +#define BOOST_TEST_SOURCE +#include + +// *************************************************************************** +// Revision History : +// +// $Log$ +// *************************************************************************** + +// EOF diff --git a/src/exception_safety.cpp b/src/exception_safety.cpp index 9b39e01f..85fcde58 100644 --- a/src/exception_safety.cpp +++ b/src/exception_safety.cpp @@ -15,13 +15,5 @@ #define BOOST_TEST_SOURCE #include -// *************************************************************************** -// Revision History : -// -// $Log$ -// Revision 1.1 2005/12/14 06:18:50 rogeeff -// *** empty log message *** -// -// *************************************************************************** - // EOF + diff --git a/src/execution_monitor.cpp b/src/execution_monitor.cpp index f8180bfe..e4cd1ddf 100644 --- a/src/execution_monitor.cpp +++ b/src/execution_monitor.cpp @@ -15,16 +15,4 @@ #define BOOST_TEST_SOURCE #include -// *************************************************************************** -// Revision History : -// -// $Log$ -// Revision 1.38 2005/03/22 07:18:39 rogeeff -// no message -// -// Revision 1.37 2005/01/22 19:26:36 rogeeff -// implementation moved into headers section to eliminate dependency of included/minimal component on src directory -// -// *************************************************************************** - // EOF diff --git a/src/framework.cpp b/src/framework.cpp index 7e444ccd..75d89112 100644 --- a/src/framework.cpp +++ b/src/framework.cpp @@ -15,16 +15,4 @@ #define BOOST_TEST_SOURCE #include -// *************************************************************************** -// Revision History : -// -// $Log$ -// Revision 1.2 2005/03/22 07:18:49 rogeeff -// no message -// -// Revision 1.1 2005/02/20 08:28:34 rogeeff -// This a major update for Boost.Test framework. See release docs for complete list of fixes/updates -// -// *************************************************************************** - // EOF diff --git a/src/interaction_based.cpp b/src/interaction_based.cpp index 3b812893..2baff8c5 100644 --- a/src/interaction_based.cpp +++ b/src/interaction_based.cpp @@ -15,13 +15,4 @@ #define BOOST_TEST_SOURCE #include -// *************************************************************************** -// Revision History : -// -// $Log$ -// Revision 1.1 2005/12/14 06:18:50 rogeeff -// *** empty log message *** -// -// *************************************************************************** - // EOF diff --git a/src/logged_expectations.cpp b/src/logged_expectations.cpp index 62a87a48..55b0cd43 100644 --- a/src/logged_expectations.cpp +++ b/src/logged_expectations.cpp @@ -15,13 +15,4 @@ #define BOOST_TEST_SOURCE #include -// *************************************************************************** -// Revision History : -// -// $Log$ -// Revision 1.1 2005/12/14 06:18:50 rogeeff -// *** empty log message *** -// -// *************************************************************************** - // EOF diff --git a/src/plain_report_formatter.cpp b/src/plain_report_formatter.cpp index 35e09bc9..224b6731 100644 --- a/src/plain_report_formatter.cpp +++ b/src/plain_report_formatter.cpp @@ -15,16 +15,4 @@ #define BOOST_TEST_SOURCE #include -// *************************************************************************** -// Revision History : -// -// $Log$ -// Revision 1.2 2005/03/22 07:18:49 rogeeff -// no message -// -// Revision 1.1 2005/02/20 08:28:34 rogeeff -// This a major update for Boost.Test framework. See release docs for complete list of fixes/updates -// -// *************************************************************************** - // EOF diff --git a/src/progress_monitor.cpp b/src/progress_monitor.cpp index c28c9237..c5009cfc 100644 --- a/src/progress_monitor.cpp +++ b/src/progress_monitor.cpp @@ -15,19 +15,4 @@ #define BOOST_TEST_SOURCE #include -// *************************************************************************** -// Revision History : -// -// $Log$ -// Revision 1.2 2005/03/22 07:18:49 rogeeff -// no message -// -// Revision 1.1 2005/02/20 08:28:34 rogeeff -// This a major update for Boost.Test framework. See release docs for complete list of fixes/updates -// -// Revision 1.16 2005/01/22 19:26:35 rogeeff -// implementation moved into headers section to eliminate dependency of included/minimal component on src directory -// -// *************************************************************************** - // EOF diff --git a/src/results_collector.cpp b/src/results_collector.cpp index c05f5c47..07c44aa4 100644 --- a/src/results_collector.cpp +++ b/src/results_collector.cpp @@ -15,16 +15,4 @@ #define BOOST_TEST_SOURCE #include -// *************************************************************************** -// Revision History : -// -// $Log$ -// Revision 1.2 2005/03/22 07:18:50 rogeeff -// no message -// -// Revision 1.1 2005/02/20 08:28:34 rogeeff -// This a major update for Boost.Test framework. See release docs for complete list of fixes/updates -// -// *************************************************************************** - // EOF diff --git a/src/results_reporter.cpp b/src/results_reporter.cpp index 735d2918..d8eb8a22 100644 --- a/src/results_reporter.cpp +++ b/src/results_reporter.cpp @@ -15,16 +15,4 @@ #define BOOST_TEST_SOURCE #include -// *************************************************************************** -// Revision History : -// -// $Log$ -// Revision 1.2 2005/03/22 07:18:50 rogeeff -// no message -// -// Revision 1.1 2005/02/20 08:28:34 rogeeff -// This a major update for Boost.Test framework. See release docs for complete list of fixes/updates -// -// *************************************************************************** - // EOF diff --git a/src/test_main.cpp b/src/test_main.cpp index ad83d82c..990a621b 100644 --- a/src/test_main.cpp +++ b/src/test_main.cpp @@ -15,16 +15,4 @@ #define BOOST_TEST_SOURCE #include -// *************************************************************************** -// Revision History : -// -// $Log$ -// Revision 1.22 2005/03/22 07:18:50 rogeeff -// no message -// -// Revision 1.21 2005/01/22 19:26:37 rogeeff -// implementation moved into headers section to eliminate dependency of included/minimal component on src directory -// -// *************************************************************************** - // EOF diff --git a/src/test_tools.cpp b/src/test_tools.cpp index 97878ba8..75f39e7d 100644 --- a/src/test_tools.cpp +++ b/src/test_tools.cpp @@ -15,16 +15,4 @@ #define BOOST_TEST_SOURCE #include -// *************************************************************************** -// Revision History : -// -// $Log$ -// Revision 1.45 2005/03/22 07:18:50 rogeeff -// no message -// -// Revision 1.44 2005/01/22 19:26:37 rogeeff -// implementation moved into headers section to eliminate dependency of included/minimal component on src directory -// -// *************************************************************************** - // EOF diff --git a/src/unit_test_log.cpp b/src/unit_test_log.cpp index 6131b578..cf105728 100644 --- a/src/unit_test_log.cpp +++ b/src/unit_test_log.cpp @@ -15,16 +15,4 @@ #define BOOST_TEST_SOURCE #include -// *************************************************************************** -// Revision History : -// -// $Log$ -// Revision 1.29 2005/03/22 07:18:50 rogeeff -// no message -// -// Revision 1.28 2005/01/22 19:26:37 rogeeff -// implementation moved into headers section to eliminate dependency of included/minimal component on src directory -// -// *************************************************************************** - // EOF diff --git a/src/unit_test_main.cpp b/src/unit_test_main.cpp index dc177f4b..4329e295 100644 --- a/src/unit_test_main.cpp +++ b/src/unit_test_main.cpp @@ -15,16 +15,4 @@ #define BOOST_TEST_SOURCE #include -// *************************************************************************** -// Revision History : -// -// $Log$ -// Revision 1.20 2005/03/22 07:18:50 rogeeff -// no message -// -// Revision 1.19 2005/01/22 19:26:37 rogeeff -// implementation moved into headers section to eliminate dependency of included/minimal component on src directory -// -// *************************************************************************** - // EOF diff --git a/src/unit_test_monitor.cpp b/src/unit_test_monitor.cpp index 84067c3b..b5171860 100644 --- a/src/unit_test_monitor.cpp +++ b/src/unit_test_monitor.cpp @@ -15,16 +15,4 @@ #define BOOST_TEST_SOURCE #include -// *************************************************************************** -// Revision History : -// -// $Log$ -// Revision 1.19 2005/03/22 07:18:50 rogeeff -// no message -// -// Revision 1.18 2005/01/22 19:26:37 rogeeff -// implementation moved into headers section to eliminate dependency of included/minimal component on src directory -// -// *************************************************************************** - // EOF diff --git a/src/unit_test_parameters.cpp b/src/unit_test_parameters.cpp index bb267194..8978835b 100644 --- a/src/unit_test_parameters.cpp +++ b/src/unit_test_parameters.cpp @@ -15,16 +15,4 @@ #define BOOST_TEST_SOURCE #include -// *************************************************************************** -// Revision History : -// -// $Log$ -// Revision 1.17 2005/03/22 07:18:50 rogeeff -// no message -// -// Revision 1.16 2005/01/22 19:26:37 rogeeff -// implementation moved into headers section to eliminate dependency of included/minimal component on src directory -// -// *************************************************************************** - // EOF diff --git a/src/unit_test_suite.cpp b/src/unit_test_suite.cpp index 69f89c4a..e7248744 100644 --- a/src/unit_test_suite.cpp +++ b/src/unit_test_suite.cpp @@ -15,16 +15,4 @@ #define BOOST_TEST_SOURCE #include -// *************************************************************************** -// Revision History : -// -// $Log$ -// Revision 1.21 2005/03/22 07:18:50 rogeeff -// no message -// -// Revision 1.20 2005/01/22 19:26:38 rogeeff -// implementation moved into headers section to eliminate dependency of included/minimal component on src directory -// -// *************************************************************************** - // EOF diff --git a/src/xml_log_formatter.cpp b/src/xml_log_formatter.cpp index 26a42cfb..18fc6b52 100644 --- a/src/xml_log_formatter.cpp +++ b/src/xml_log_formatter.cpp @@ -15,17 +15,4 @@ #define BOOST_TEST_SOURCE #include -// *************************************************************************** -// Revision History : -// -// $Log$ -// Revision 1.2 2005/03/22 07:18:50 rogeeff -// no message -// -// Revision 1.1 2005/02/01 09:01:00 rogeeff -// supplied_log_formatters split -// change formatters interface to simplify result interface -// -// *************************************************************************** - // EOF diff --git a/src/xml_report_formatter.cpp b/src/xml_report_formatter.cpp index 772133fd..09189bf1 100644 --- a/src/xml_report_formatter.cpp +++ b/src/xml_report_formatter.cpp @@ -15,16 +15,4 @@ #define BOOST_TEST_SOURCE #include -// *************************************************************************** -// Revision History : -// -// $Log$ -// Revision 1.2 2005/03/22 07:18:50 rogeeff -// no message -// -// Revision 1.1 2005/02/20 08:28:34 rogeeff -// This a major update for Boost.Test framework. See release docs for complete list of fixes/updates -// -// *************************************************************************** - // EOF diff --git a/test/class_properties_test.cpp b/test/class_properties_test.cpp index 53166031..813bef5d 100644 --- a/test/class_properties_test.cpp +++ b/test/class_properties_test.cpp @@ -177,7 +177,6 @@ BOOST_AUTO_TEST_CASE( test_readwrite_property ) readwrite_property const p_bb2; BOOST_CHECK_EQUAL( p_bb2->foo(), 1 ); - } //____________________________________________________________________________//