Index: boost/test/impl/framework.ipp =================================================================== --- boost/test/impl/framework.ipp (revision 80698) +++ boost/test/impl/framework.ipp (working copy) @@ -346,7 +346,17 @@ delete static_cast(tu_ptr); } } - + + void reset() + { + clear(); + m_master_test_suite = 0; + m_curr_test_case = INV_TEST_UNIT_ID; + m_next_test_case_id = MIN_TEST_CASE_ID; + m_next_test_suite_id = MIN_TEST_SUITE_ID; + m_test_in_progress = false; + } + void set_tu_id( test_unit& tu, test_unit_id id ) { tu.p_id.value = id; } // test_tree_visitor interface implementation @@ -637,12 +647,28 @@ } // namespace impl // ************************************************************************** // +// ************** framework::reset ************** // +// ************************************************************************** // + +void +reset() +{ + reset_observers(); + s_frk_impl().reset(); +} + +// ************************************************************************** // // ************** framework::init ************** // // ************************************************************************** // void init( init_unit_test_func init_func, int argc, char* argv[] ) { + if( s_frk_impl().m_is_initialized ) + { + reset(); + } + runtime_config::init( argc, argv ); // set the log level and format Index: boost/test/impl/unit_test_parameters.ipp =================================================================== --- boost/test/impl/unit_test_parameters.ipp (revision 80698) +++ boost/test/impl/unit_test_parameters.ipp (working copy) @@ -152,6 +152,30 @@ namespace { // framework parameters and corresponding command-line arguments +#ifdef BOOST_TEST_USE_QUALIFIED_COMMANDLINE_ARGUMENTS +std::string AUTO_START_DBG = "boost.test.auto_start_dbg"; +std::string BREAK_EXEC_PATH = "boost.test.break_exec_path"; +std::string BUILD_INFO = "boost.test.build_info"; +std::string CATCH_SYS_ERRORS = "boost.test.catch_system_errors"; +std::string COLOR_OUTPUT = "boost.test.color_output"; +std::string DETECT_FP_EXCEPT = "boost.test.detect_fp_exceptions"; +std::string DETECT_MEM_LEAKS = "boost.test.detect_memory_leaks"; +std::string LIST_CONTENT = "boost.test.list_content"; +std::string LOG_FORMAT = "boost.test.log_format"; +std::string LOG_LEVEL = "boost.test.log_level"; +std::string LOG_SINK = "boost.test.log_sink"; +std::string OUTPUT_FORMAT = "boost.test.output_format"; +std::string RANDOM_SEED = "boost.test.random"; +std::string REPORT_FORMAT = "boost.test.report_format"; +std::string REPORT_LEVEL = "boost.test.report_level"; +std::string REPORT_SINK = "boost.test.report_sink"; +std::string RESULT_CODE = "boost.test.result_code"; +std::string TESTS_TO_RUN = "boost.test.run_test"; +std::string SAVE_TEST_PATTERN = "boost.test.save_pattern"; +std::string SHOW_PROGRESS = "boost.test.show_progress"; +std::string USE_ALT_STACK = "boost.test.use_alt_stack"; +std::string WAIT_FOR_DEBUGGER = "boost.test.wait_for_debugger"; +#else std::string AUTO_START_DBG = "auto_start_dbg"; std::string BREAK_EXEC_PATH = "break_exec_path"; std::string BUILD_INFO = "build_info"; @@ -174,6 +198,7 @@ std::string SHOW_PROGRESS = "show_progress"; std::string USE_ALT_STACK = "use_alt_stack"; std::string WAIT_FOR_DEBUGGER = "wait_for_debugger"; +#endif static const_string parameter_2_env_var( const_string param_name ) @@ -262,6 +287,8 @@ { using namespace cla; + s_cla_parser.clear(); + try { if( s_cla_parser.num_params() != 0 ) s_cla_parser.reset(); Index: boost/test/utils/runtime/cla/parser.hpp =================================================================== --- boost/test/utils/runtime/cla/parser.hpp (revision 80698) +++ boost/test/utils/runtime/cla/parser.hpp (working copy) @@ -128,6 +128,9 @@ void usage( out_stream& ostr ); void help( out_stream& ostr ); + //clear + void clear(); + private: argument const& valid_argument( cstring string_id ) const; Index: boost/test/utils/runtime/cla/parser.ipp =================================================================== --- boost/test/utils/runtime/cla/parser.ipp (revision 80698) +++ boost/test/utils/runtime/cla/parser.ipp (working copy) @@ -258,6 +258,14 @@ //____________________________________________________________________________// +BOOST_RT_PARAM_INLINE void +parser::clear() +{ + m_parameters.clear(); +} + +//____________________________________________________________________________// + } // namespace cla } // namespace BOOST_RT_PARAM_NAMESPACE