From 3280099eab7c2e1b8a82c0740636028118fed908 Mon Sep 17 00:00:00 2001 From: Raffi Enficiaud Date: Sat, 4 Apr 2020 22:22:38 +0200 Subject: [PATCH 1/6] .gitignore --- .gitignore | 33 ++++++++------------------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/.gitignore b/.gitignore index 7009712f..ecde8a26 100644 --- a/.gitignore +++ b/.gitignore @@ -1,32 +1,15 @@ -doc/snippet/5mnstarter/build -doc/html/BOOST_DATA_TEST_CASE.html -doc/html/BOOST_DATA_TEST_CASE_IMPL.html -doc/html/BOOST_DATA_TEST_CASE_NO_PARAMS.html -doc/html/BOOST_DATA_TEST_CASE_PARAM.html -doc/html/BOOST_DATA_TEST_CASE_PARAMS.html -doc/html/BOOST_DATA_TEST_CASE_WITH_PARAMS.html -doc/html/BOOST_DATA_TEST_CONTEXT.html -doc/html/BOOST_LIB_NAME.html -doc/html/BOOST_PARAM_CLASS_TEST_CASE.html -doc/html/BOOST_PARAM_TEST_CASE.html -doc/html/BOOST_TEST_SETUP_ASSERT.html -doc/html/BOOST_TEST_SYS_ASSERT.html -doc/html/TC_MAKE.html +.vscode/ +doc/**/build +doc/html/*.html doc/html/header/ -doc/html/boost/ -doc/html/boost_test/ -doc/html/index.html +doc/html/boost*/ doc/html/standalone_HTML.manifest +doc/doxygen test_executable -doc/snippet/dataset_1/build/ doxygen_reference_generated_doc.xml standalonedoc_HTML.manifest -doc/html/*.html -doc/examples/build -doc/doxygen -build/tmp Master_Test_Suite*.xml -smoke-ts-sink.* -smoke-ts-sink-new-style.* +smoke-ts-sink*.* +build/tmp build/build_dir -build/build_*/ +build/build_* From b07f902452d5a5d5ac34f1f4ae3ee381dab8d1b9 Mon Sep 17 00:00:00 2001 From: Raffi Enficiaud Date: Sat, 4 Apr 2020 16:48:19 +0200 Subject: [PATCH 2/6] CMakeLists.txt improvements - Visual C++ debugging folder - Splitting the big CMakeLists.txt into smaller parts --- build/CMakeLists.txt | 165 +------------------------------------- test/CMakeLists.txt | 187 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 189 insertions(+), 163 deletions(-) create mode 100644 test/CMakeLists.txt diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt index b8c985a6..4b441836 100644 --- a/build/CMakeLists.txt +++ b/build/CMakeLists.txt @@ -51,9 +51,6 @@ if(MSVC) endif() - - - # global path set(BOOST_TEST_ROOT_DIR ${BoostTest_SOURCE_DIR}/..) set(BOOST_ROOT_DIR ${BOOST_TEST_ROOT_DIR}/../..) @@ -96,7 +93,7 @@ set(BOOST_UTF_SRC ${BOOST_TEST_ROOT_DIR}/src/unit_test_parameters.cpp ${BOOST_TEST_ROOT_DIR}/src/xml_log_formatter.cpp ${BOOST_TEST_ROOT_DIR}/src/xml_report_formatter.cpp - ) +) add_library(boost_test_framework STATIC @@ -120,7 +117,6 @@ target_include_directories(boost_test_framework_shared ${BOOST_ROOT_DIR_ABS}/) set_target_properties(boost_test_framework_shared PROPERTIES FOLDER "UTF") - #### # Documentation files (files only, no target) file(GLOB_RECURSE @@ -131,162 +127,5 @@ add_custom_target( SOURCES ${BOOST_UTF_DOC_FILES}) set_property(TARGET quickbook PROPERTY FOLDER "Documentation/") - - -#### # Unit tests - -# documentation tests -file(GLOB_RECURSE - BOOST_UTF_DOC_EXAMPLES - CONFIGURE_DEPENDS - ${BOOST_TEST_ROOT_DIR}/doc/examples/*.cpp) - -foreach(_h IN LISTS BOOST_UTF_DOC_EXAMPLES) - get_filename_component(_hh ${_h} NAME_WE) - add_executable(doc-${_hh} ${_h} ${BOOST_TEST_ROOT_DIR}/doc/examples/${_hh}.output) - target_include_directories(doc-${_hh} - PUBLIC - ${BOOST_TEST_ROOT_DIR}/include/ - ${BOOST_ROOT_DIR_ABS}/) - set_target_properties(doc-${_hh} PROPERTIES FOLDER "Doc examples") - - add_test(NAME doc-${_hh}-test - COMMAND doc-${_hh}) - get_filename_component(_ext ${_h} EXT) - string(FIND ${_ext} "fail" _index_fail) - if(${_index_fail} GREATER -1) - message(STATUS "test ${_hh}.${_ext} = ${_index_fail}") - set_tests_properties(doc-${_hh}-test PROPERTIES WILL_FAIL TRUE) - endif() -endforeach() - - -# unit tests folder -set(BOOST_TEST_UNITTESTS_FOLDER ${BOOST_TEST_ROOT_DIR}/test) -set(BOOST_TEST_EXAMPLES_FOLDER ${BOOST_TEST_ROOT_DIR}/example) - -# datasets -file(GLOB - BOOST_TEST_UNITTESTS_DATASET - CONFIGURE_DEPENDS - ${BOOST_TEST_UNITTESTS_FOLDER}/test-organization-ts/datasets-test/*.cpp - ${BOOST_TEST_UNITTESTS_FOLDER}/test-organization-ts/datasets-test/*.hpp) -add_executable(boost_test_datasets ${BOOST_TEST_UNITTESTS_DATASET}) -target_include_directories(boost_test_datasets - PUBLIC - ${BOOST_TEST_ROOT_DIR}/include/ - ${BOOST_ROOT_DIR_ABS}/) -target_link_libraries(boost_test_datasets boost_test_framework) -#target_compile_definitions(boost_test_datasets PUBLIC "BOOST_TEST_DYN_LINK=0") -set_target_properties(boost_test_datasets PROPERTIES FOLDER "Unit tests") -add_test(NAME bt-unittest-dataset - COMMAND boost_test_datasets) - - -#### -# TS writing-test-ts - -set(BOOST_UTF_TESTS_IND_FILES - writing-test-ts - execution_monitor-ts - framework-ts - usage-variants-ts - utils-ts - test-organization-ts - smoke-ts - ) - - -foreach(_ts IN LISTS BOOST_UTF_TESTS_IND_FILES) - - message("parsing test suite ${_ts}") - file(GLOB - _boost_utf_current_tsuite - ${BOOST_TEST_UNITTESTS_FOLDER}/${_ts}/*.cpp) - - - foreach(_h IN LISTS _boost_utf_current_tsuite) - get_filename_component(_hh ${_h} ABSOLUTE) - get_filename_component(_name ${_h} NAME_WE) - file(RELATIVE_PATH _v ${BOOST_TEST_UNITTESTS_FOLDER} ${_hh}) - #get_filename_component(_v "${_v}" DIRECTORY) - message("adding ${_ts}/${_name}") - add_executable(${_name} ${_hh}) - target_link_libraries(${_name} PRIVATE boost_test_framework) - set_target_properties(${_name} PROPERTIES FOLDER "Unit tests/${_ts}") - add_test(NAME bt-unittest-${_name} - COMMAND ${_name}) - endforeach() - - unset(_boost_utf_current_tsuite) - -endforeach() # test suite - - -# -# Example code -# - -set(LIST_EXAMPLES - unit_test_example_01.cpp,shared,fail - unit_test_example_02.cpp,static,fail - unit_test_example_03.cpp,static,fail - unit_test_example_04.cpp,shared,fail - unit_test_example_05.cpp,shared,fail - unit_test_example_06.cpp,shared,fail - unit_test_example_07.cpp,shared,run - unit_test_example_08.cpp,shared,run - unit_test_example_09_1.cpp,unit_test_example_09_2.cpp,shared,run - - unit_test_example_10.cpp,static,fail - unit_test_example_11.cpp,static,fail - unit_test_example_12.cpp,static,link - unit_test_example_13.cpp,shared,run - unit_test_example_15.cpp,shared,fail - unit_test_example_16.cpp,shared,run - - const_string_test.cpp,none,run - named_param_example.cpp,none,run - - external_main_example_1.cpp,shared,fail - external_main_example_2.cpp,shared,fail - external_main_example_3.cpp,none,fail - filtering_example.cpp,static,fail -) - -foreach(_var IN LISTS LIST_EXAMPLES) - string(REPLACE "," ";" _var_to_list "${_var}") - list(REVERSE _var_to_list) - list(GET _var_to_list 0 action) - list(GET _var_to_list 1 boost_test_type) - list(REMOVE_AT _var_to_list 0) - list(REMOVE_AT _var_to_list 0) - - list(GET _var_to_list 0 first_file) - get_filename_component(_name_example "${first_file}" NAME_WE) - - set(_list_files) - foreach(_file IN LISTS _var_to_list) - set(_list_files ${_list_files} ${BOOST_TEST_EXAMPLES_FOLDER}/${_file}) - endforeach() - add_executable(${_name_example} ${_list_files}) - set_target_properties(${_name_example} PROPERTIES FOLDER "Examples") - - if("${boost_test_type}" STREQUAL "shared") - target_link_libraries(${_name_example} PRIVATE boost_test_framework_shared) - elseif("${boost_test_type}" STREQUAL "static") - target_link_libraries(${_name_example} PRIVATE boost_test_framework) - elseif(NOT "${boost_test_type}" STREQUAL "none") - message(FATAL_ERROR "Wrong action for example target '${_name_example}'") - endif() - - if("${action}" STREQUAL "run" OR "${action}" STREQUAL "run-fail") - add_test(NAME bt-exampletest-${_name_example} - COMMAND ${_name_example}) - - if("${action}" STREQUAL "run-fail") - set_tests_properties(bt-exampletest-${_name_example} PROPERTIES WILL_FAIL TRUE) - endif() - endif() -endforeach() +add_subdirectory(${BOOST_TEST_ROOT_DIR}/test tmp_folders_tests) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 00000000..7133a93b --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,187 @@ +#### +# Unit tests for the Unit Test Framework library + +if(NOT DEFINED BOOST_TEST_ROOT_DIR) + message(FATAL_ERROR "Please use this file from the main CMakeLists.txt from the build/ folder") +endif() + +if(NOT TARGET boost_test_framework OR NOT TARGET boost_test_framework_shared) + message(FATAL_ERROR "Please use this file from the main CMakeLists.txt from the build/ folder") +endif() + +# unit tests folder +set(BOOST_TEST_UNITTESTS_FOLDER ${BOOST_TEST_ROOT_DIR}/test) +set(BOOST_TEST_EXAMPLES_FOLDER ${BOOST_TEST_ROOT_DIR}/example) + + +# documentation tests +file(GLOB_RECURSE + BOOST_UTF_DOC_EXAMPLES + CONFIGURE_DEPENDS + ${BOOST_TEST_ROOT_DIR}/doc/examples/*.cpp) + +foreach(_h IN LISTS BOOST_UTF_DOC_EXAMPLES) + get_filename_component(_hh ${_h} NAME_WE) + add_executable(doc-${_hh} + ${_h} + ${BOOST_TEST_ROOT_DIR}/doc/examples/${_hh}.output) + set_target_properties(doc-${_hh} + PROPERTIES + FOLDER "Doc examples" + VS_DEBUGGER_WORKING_DIRECTORY ${BOOST_TEST_UNITTESTS_FOLDER}) + target_include_directories(doc-${_hh} + PUBLIC + ${BOOST_TEST_ROOT_DIR}/include/ + ${BOOST_ROOT_DIR_ABS}/) + + add_test(NAME doc-${_hh}-test + COMMAND doc-${_hh}) + get_filename_component(_ext ${_h} EXT) + string(FIND ${_ext} "fail" _index_fail) + if(${_index_fail} GREATER -1) + set_tests_properties(doc-${_hh}-test + PROPERTIES + WILL_FAIL TRUE) + endif() +endforeach() + + +# datasets +file(GLOB + BOOST_TEST_UNITTESTS_DATASET + CONFIGURE_DEPENDS + ${BOOST_TEST_UNITTESTS_FOLDER}/test-organization-ts/datasets-test/*.cpp + ${BOOST_TEST_UNITTESTS_FOLDER}/test-organization-ts/datasets-test/*.hpp) +add_executable(boost_test_datasets ${BOOST_TEST_UNITTESTS_DATASET}) +set_target_properties(boost_test_datasets + PROPERTIES + FOLDER "Unit tests" + VS_DEBUGGER_WORKING_DIRECTORY ${BOOST_TEST_UNITTESTS_FOLDER}) +target_include_directories(boost_test_datasets + PUBLIC + ${BOOST_TEST_ROOT_DIR}/include/ + ${BOOST_ROOT_DIR_ABS}/) +target_link_libraries(boost_test_datasets boost_test_framework) +add_test(NAME bt-unittest-dataset + COMMAND boost_test_datasets) + + +#### +# TS writing-test-ts + +set(BOOST_UTF_TESTS_FIND_FILES + writing-test-ts + execution_monitor-ts + framework-ts + usage-variants-ts + utils-ts + test-organization-ts + smoke-ts + ) + + +foreach(_ts IN LISTS BOOST_UTF_TESTS_FIND_FILES) + + file(GLOB + _boost_utf_current_tsuite + ${BOOST_TEST_UNITTESTS_FOLDER}/${_ts}/*.cpp) + + foreach(_h IN LISTS _boost_utf_current_tsuite) + get_filename_component(_hh ${_h} ABSOLUTE) + get_filename_component(_name ${_h} NAME_WE) + file(RELATIVE_PATH _v ${BOOST_TEST_UNITTESTS_FOLDER} ${_hh}) + + add_executable(${_name} ${_hh}) + set_target_properties(${_name} + PROPERTIES + FOLDER "Unit tests/${_ts}" + VS_DEBUGGER_WORKING_DIRECTORY ${BOOST_TEST_UNITTESTS_FOLDER}) + target_link_libraries(${_name} + PRIVATE + boost_test_framework) # inaccurate + + add_test(NAME bt-unittest-${_name} + COMMAND ${_name}) + endforeach() + + unset(_boost_utf_current_tsuite) + +endforeach() # test suite + + +# +# Example code +# + +set(LIST_EXAMPLES + unit_test_example_01.cpp,shared,fail + unit_test_example_02.cpp,static,fail + unit_test_example_03.cpp,static,fail + unit_test_example_04.cpp,shared,fail + unit_test_example_05.cpp,shared,fail + unit_test_example_06.cpp,shared,fail + unit_test_example_07.cpp,shared,run + unit_test_example_08.cpp,shared,run + unit_test_example_09_1.cpp,unit_test_example_09_2.cpp,shared,run + + unit_test_example_10.cpp,static,fail + unit_test_example_11.cpp,static,fail + unit_test_example_12.cpp,static,link + unit_test_example_13.cpp,shared,run + unit_test_example_15.cpp,shared,fail + unit_test_example_16.cpp,shared,run + + const_string_test.cpp,none,run + named_param_example.cpp,none,run + + external_main_example_1.cpp,shared,fail + external_main_example_2.cpp,shared,fail + external_main_example_3.cpp,none,fail + filtering_example.cpp,static,fail +) + +foreach(_var IN LISTS LIST_EXAMPLES) + string(REPLACE "," ";" _var_to_list "${_var}") + list(REVERSE _var_to_list) + list(GET _var_to_list 0 action) + list(GET _var_to_list 1 boost_test_type) + list(REMOVE_AT _var_to_list 0) + list(REMOVE_AT _var_to_list 0) + + list(GET _var_to_list 0 first_file) + get_filename_component(_name_example "${first_file}" NAME_WE) + + set(_list_files) + foreach(_file IN LISTS _var_to_list) + set(_list_files ${_list_files} ${BOOST_TEST_EXAMPLES_FOLDER}/${_file}) + endforeach() + + add_executable(${_name_example} ${_list_files}) + set_target_properties(${_name_example} + PROPERTIES + FOLDER "Examples" + VS_DEBUGGER_WORKING_DIRECTORY ${BOOST_TEST_UNITTESTS_FOLDER}) + + if("${boost_test_type}" STREQUAL "shared") + target_link_libraries(${_name_example} + PRIVATE + boost_test_framework_shared) + elseif("${boost_test_type}" STREQUAL "static") + target_link_libraries(${_name_example} + PRIVATE + boost_test_framework) + elseif(NOT "${boost_test_type}" STREQUAL "none") + message(FATAL_ERROR "Wrong action for example target '${_name_example}'") + endif() + + if("${action}" STREQUAL "run" OR "${action}" STREQUAL "run-fail") + add_test(NAME bt-exampletest-${_name_example} + COMMAND ${_name_example}) + + if("${action}" STREQUAL "run-fail") + set_tests_properties(bt-exampletest-${_name_example} + PROPERTIES + WILL_FAIL TRUE) + endif() + endif() +endforeach() From a689b25454f6e3fe5ce160c4d3182b69411aa8bf Mon Sep 17 00:00:00 2001 From: Raffi Enficiaud Date: Fri, 3 Apr 2020 23:45:03 +0200 Subject: [PATCH 3/6] Framework init observer is not a singleton anymore - Used only during the initialization/deinit of the framework to catch any issues in the global fixtures or other observers initialization. - Removed during tests execution to reduce overhead - Not a singleton anymore --- include/boost/test/impl/framework.ipp | 43 +++++++++++++++++-- .../impl/test_framework_init_observer.ipp | 39 +++-------------- .../test/test_framework_init_observer.hpp | 6 +-- 3 files changed, 46 insertions(+), 42 deletions(-) diff --git a/include/boost/test/impl/framework.ipp b/include/boost/test/impl/framework.ipp index 34e68700..6511ca2b 100644 --- a/include/boost/test/impl/framework.ipp +++ b/include/boost/test/impl/framework.ipp @@ -1185,7 +1185,6 @@ init( init_unit_test_func init_func, int argc, char* argv[] ) // 40. Register default test observers register_observer( results_collector ); register_observer( unit_test_log ); - register_observer( framework_init_observer ); if( runtime_config::get( runtime_config::btrt_show_progress ) ) { progress_monitor.set_stream( std::cout ); // defaults to stdout @@ -1605,6 +1604,33 @@ struct swap_on_delete { Cont& m_c2; }; +struct register_observer_helper { + register_observer_helper(test_observer& observer) + : m_observer(observer) + { + register_obs(); + } + + ~register_observer_helper() { + if(m_registered) + deregister_observer( m_observer ); + } + + void deregister_obs() { + m_registered = false; + deregister_observer( m_observer ); + } + + void register_obs() { + m_registered = true; + register_observer( m_observer ); + } + + + test_observer& m_observer; + bool m_registered; +}; + void run( test_unit_id id, bool continue_test ) { @@ -1626,6 +1652,9 @@ run( test_unit_id id, bool continue_test ) bool init_ok = true; const_string setup_error; + framework_init_observer_t local_init_observer; + register_observer_helper init_observer_helper( local_init_observer ); + if( call_start_finish ) { // indicates the framework that no test is in progress now if observers need to be notified impl::s_frk_state().m_test_in_progress = false; @@ -1639,7 +1668,7 @@ run( test_unit_id id, bool continue_test ) init_ok = false; } else { - if( unit_test::framework_init_observer.has_failed() ) { + if( local_init_observer.has_failed() ) { init_ok = false; } } @@ -1656,6 +1685,9 @@ run( test_unit_id id, bool continue_test ) } } + // removing this observer as it should not be of any use for the tests + init_observer_helper.deregister_obs(); + if( init_ok ) { // attaching the global fixtures to the main entry point @@ -1694,7 +1726,10 @@ run( test_unit_id id, bool continue_test ) results_reporter::make_report( INV_REPORT_LEVEL, id ); - unit_test::framework_init_observer.clear(); + // reinstalling this observer + init_observer_helper.register_obs(); + + local_init_observer.clear(); if( call_start_finish ) { // indicates the framework that no test is in progress anymore if observers need to be notified // and this is a teardown, so assertions should not raise any exception otherwise an exception @@ -1709,7 +1744,7 @@ run( test_unit_id id, bool continue_test ) impl::s_frk_state().m_test_in_progress = was_in_progress; // propagates the init/teardown error if any - BOOST_TEST_SETUP_ASSERT( init_ok && !unit_test::framework_init_observer.has_failed(), setup_error ); + BOOST_TEST_SETUP_ASSERT( init_ok && !local_init_observer.has_failed(), setup_error ); } //____________________________________________________________________________// diff --git a/include/boost/test/impl/test_framework_init_observer.ipp b/include/boost/test/impl/test_framework_init_observer.ipp index a44382ee..f9cb3c47 100644 --- a/include/boost/test/impl/test_framework_init_observer.ipp +++ b/include/boost/test/impl/test_framework_init_observer.ipp @@ -29,35 +29,10 @@ namespace unit_test { // ************** framework_init_observer_t ************** // // ************************************************************************** // -namespace { - -struct test_init_observer_check { - bool has_failure; - - void clear() - { - has_failure = false; - } -}; - - -test_init_observer_check& s_tioc_impl() { static test_init_observer_check the_inst; return the_inst; } - -} // local namespace - - -//____________________________________________________________________________// - -// singleton pattern -BOOST_TEST_SINGLETON_CONS_IMPL(framework_init_observer_t) - -//____________________________________________________________________________// - void framework_init_observer_t::clear() { - if(!framework::test_in_progress()) - s_tioc_impl().clear(); + m_has_failure = false; } //____________________________________________________________________________// @@ -73,11 +48,8 @@ framework_init_observer_t::test_start( counter_t ) void framework_init_observer_t::assertion_result( unit_test::assertion_result ar ) { - test_init_observer_check& tr = s_tioc_impl(); switch( ar ) { - case AR_TRIGGERED: break; - case AR_PASSED: break; - case AR_FAILED: tr.has_failure = true; break; + case AR_FAILED: m_has_failure = true; break; default: break; } @@ -88,14 +60,13 @@ framework_init_observer_t::assertion_result( unit_test::assertion_result ar ) void framework_init_observer_t::exception_caught( execution_exception const& ) { - test_init_observer_check& tr = s_tioc_impl(); - tr.has_failure = true; + m_has_failure = true; } void framework_init_observer_t::test_aborted() { - s_tioc_impl().has_failure = true; + m_has_failure = true; } @@ -104,7 +75,7 @@ framework_init_observer_t::test_aborted() bool framework_init_observer_t::has_failed() const { - return s_tioc_impl().has_failure; + return m_has_failure; } //____________________________________________________________________________// diff --git a/include/boost/test/test_framework_init_observer.hpp b/include/boost/test/test_framework_init_observer.hpp index 8bf0bb99..764e95bc 100644 --- a/include/boost/test/test_framework_init_observer.hpp +++ b/include/boost/test/test_framework_init_observer.hpp @@ -47,12 +47,10 @@ public: /// Indicates if a failure has been recorded so far bool has_failed( ) const; - /// Singleton pattern - BOOST_TEST_SINGLETON_CONS( framework_init_observer_t ) +private: + bool m_has_failure; }; -BOOST_TEST_SINGLETON_INST( framework_init_observer ) - } // namespace unit_test } // namespace boost From 1e0abd6e41186d662a1a9648a9dc75bf76d702ca Mon Sep 17 00:00:00 2001 From: Raffi Enficiaud Date: Sat, 4 Apr 2020 02:35:12 +0200 Subject: [PATCH 4/6] Observers test_start now contain the root test unit id In order to start on a subtree, we need to pass the root of the subtree to the start. --- include/boost/test/impl/framework.ipp | 2 +- include/boost/test/impl/progress_monitor.ipp | 2 +- include/boost/test/impl/results_collector.ipp | 27 +++++++++++++++++-- .../impl/test_framework_init_observer.ipp | 2 +- include/boost/test/impl/unit_test_log.ipp | 2 +- include/boost/test/progress_monitor.hpp | 2 +- include/boost/test/results_collector.hpp | 2 +- .../test/test_framework_init_observer.hpp | 2 +- include/boost/test/tree/global_fixture.hpp | 2 +- include/boost/test/tree/observer.hpp | 3 ++- include/boost/test/unit_test_log.hpp | 2 +- 11 files changed, 36 insertions(+), 12 deletions(-) diff --git a/include/boost/test/impl/framework.ipp b/include/boost/test/impl/framework.ipp index 6511ca2b..1e6eda72 100644 --- a/include/boost/test/impl/framework.ipp +++ b/include/boost/test/impl/framework.ipp @@ -1662,7 +1662,7 @@ run( test_unit_id id, bool continue_test ) BOOST_TEST_FOREACH( test_observer*, to, impl::s_frk_state().m_observers ) { BOOST_TEST_I_TRY { ut_detail::test_unit_id_restore restore_current_test_unit(impl::s_frk_state().m_curr_test_unit, id); - unit_test_monitor_t::error_level result = unit_test_monitor.execute_and_translate( boost::bind( &test_observer::test_start, to, tcc.p_count ) ); + unit_test_monitor_t::error_level result = unit_test_monitor.execute_and_translate( boost::bind( &test_observer::test_start, to, tcc.p_count, id ) ); if( init_ok ) { if( result != unit_test_monitor_t::test_ok ) { init_ok = false; diff --git a/include/boost/test/impl/progress_monitor.ipp b/include/boost/test/impl/progress_monitor.ipp index 998aa26b..4aacb357 100644 --- a/include/boost/test/impl/progress_monitor.ipp +++ b/include/boost/test/impl/progress_monitor.ipp @@ -126,7 +126,7 @@ BOOST_TEST_SINGLETON_CONS_IMPL(progress_monitor_t) //____________________________________________________________________________// void -progress_monitor_t::test_start( counter_t test_cases_amount ) +progress_monitor_t::test_start( counter_t test_cases_amount, test_unit_id ) { s_pm_impl().m_color_output = runtime_config::get( runtime_config::btrt_color_output ); diff --git a/include/boost/test/impl/results_collector.ipp b/include/boost/test/impl/results_collector.ipp index 906aa56a..40d5e55c 100644 --- a/include/boost/test/impl/results_collector.ipp +++ b/include/boost/test/impl/results_collector.ipp @@ -145,6 +145,27 @@ struct results_collector_impl { results_collector_impl& s_rc_impl() { static results_collector_impl the_inst; return the_inst; } +// deletes the entries of results_collector_impl +class clear_subtree_result : public test_tree_visitor { +public: + clear_subtree_result(results_collector_impl& store) + : m_store( store ) + {} + +private: + virtual bool visit( test_unit const& tu) + { + typedef std::map::iterator iterator; + iterator found = m_store.m_results_store.find(tu.p_id); + if(found != m_store.m_results_store.end()) { + m_store.m_results_store.erase( found ); + } + return true; + } + + results_collector_impl& m_store; +}; + } // local namespace //____________________________________________________________________________// @@ -154,9 +175,11 @@ BOOST_TEST_SINGLETON_CONS_IMPL( results_collector_t ) //____________________________________________________________________________// void -results_collector_t::test_start( counter_t ) +results_collector_t::test_start( counter_t, test_unit_id id ) { - s_rc_impl().m_results_store.clear(); + // deletes the results under id only + clear_subtree_result tree_clear(s_rc_impl()); + traverse_test_tree( id, tree_clear ); } //____________________________________________________________________________// diff --git a/include/boost/test/impl/test_framework_init_observer.ipp b/include/boost/test/impl/test_framework_init_observer.ipp index f9cb3c47..4e9f49f7 100644 --- a/include/boost/test/impl/test_framework_init_observer.ipp +++ b/include/boost/test/impl/test_framework_init_observer.ipp @@ -38,7 +38,7 @@ framework_init_observer_t::clear() //____________________________________________________________________________// void -framework_init_observer_t::test_start( counter_t ) +framework_init_observer_t::test_start( counter_t, test_unit_id ) { clear(); } diff --git a/include/boost/test/impl/unit_test_log.ipp b/include/boost/test/impl/unit_test_log.ipp index c5abfcb3..32d745bc 100644 --- a/include/boost/test/impl/unit_test_log.ipp +++ b/include/boost/test/impl/unit_test_log.ipp @@ -164,7 +164,7 @@ BOOST_TEST_SINGLETON_CONS_IMPL( unit_test_log_t ) //____________________________________________________________________________// void -unit_test_log_t::test_start( counter_t test_cases_amount ) +unit_test_log_t::test_start( counter_t test_cases_amount, test_unit_id ) { BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) { if( !current_logger_data.m_enabled || current_logger_data.get_log_level() == log_nothing ) diff --git a/include/boost/test/progress_monitor.hpp b/include/boost/test/progress_monitor.hpp index 49c0b014..195956ab 100644 --- a/include/boost/test/progress_monitor.hpp +++ b/include/boost/test/progress_monitor.hpp @@ -34,7 +34,7 @@ class BOOST_TEST_DECL progress_monitor_t : public test_observer { public: /// @name Test observer interface /// @{ - virtual void test_start( counter_t test_cases_amount ); + virtual void test_start( counter_t test_cases_amount, test_unit_id ); virtual void test_aborted(); virtual void test_unit_finish( test_unit const&, unsigned long ); diff --git a/include/boost/test/results_collector.hpp b/include/boost/test/results_collector.hpp index 1c26a74a..d12a8a9b 100644 --- a/include/boost/test/results_collector.hpp +++ b/include/boost/test/results_collector.hpp @@ -121,7 +121,7 @@ public: class BOOST_TEST_DECL results_collector_t : public test_observer { public: - virtual void test_start( counter_t ); + virtual void test_start( counter_t, test_unit_id ); virtual void test_unit_start( test_unit const& ); virtual void test_unit_finish( test_unit const&, unsigned long ); diff --git a/include/boost/test/test_framework_init_observer.hpp b/include/boost/test/test_framework_init_observer.hpp index 764e95bc..230fb62f 100644 --- a/include/boost/test/test_framework_init_observer.hpp +++ b/include/boost/test/test_framework_init_observer.hpp @@ -34,7 +34,7 @@ namespace unit_test { class BOOST_TEST_DECL framework_init_observer_t : public test_observer { public: - virtual void test_start( counter_t ); + virtual void test_start( counter_t, test_unit_id ); virtual void assertion_result( unit_test::assertion_result ); virtual void exception_caught( execution_exception const& ); diff --git a/include/boost/test/tree/global_fixture.hpp b/include/boost/test/tree/global_fixture.hpp index f64ddeae..edd86a48 100644 --- a/include/boost/test/tree/global_fixture.hpp +++ b/include/boost/test/tree/global_fixture.hpp @@ -87,7 +87,7 @@ struct global_configuration_impl : public global_configuration { } // test observer interface - virtual void test_start( counter_t ) { + virtual void test_start( counter_t, test_unit_id ) { m_configuration_observer = new F; } diff --git a/include/boost/test/tree/observer.hpp b/include/boost/test/tree/observer.hpp index 46b26905..8c798cf0 100644 --- a/include/boost/test/tree/observer.hpp +++ b/include/boost/test/tree/observer.hpp @@ -44,7 +44,8 @@ public: //! //! @param[in] number_of_test_cases indicates the number of test cases. Only active //! test cases are taken into account. - virtual void test_start( counter_t /* number_of_test_cases */ ) {} + //! @param[in] root_test_unit_id the ID root of the test tree currently being tested + virtual void test_start( counter_t /* number_of_test_cases */, test_unit_id root_test_unit_id ) {} //! Called after the framework ends executing the test cases //! diff --git a/include/boost/test/unit_test_log.hpp b/include/boost/test/unit_test_log.hpp index 6435a544..aa3ce8d9 100644 --- a/include/boost/test/unit_test_log.hpp +++ b/include/boost/test/unit_test_log.hpp @@ -111,7 +111,7 @@ private: class BOOST_TEST_DECL unit_test_log_t : public test_observer { public: // test_observer interface implementation - virtual void test_start( counter_t test_cases_amount ); + virtual void test_start( counter_t test_cases_amount, test_unit_id ); virtual void test_finish(); virtual void test_aborted(); From b29815a78d1e3052ec2fc5c81c9fff445c248645 Mon Sep 17 00:00:00 2001 From: Raffi Enficiaud Date: Sat, 4 Apr 2020 18:16:25 +0200 Subject: [PATCH 5/6] Logging improvements - "configure" the logger singleton when setup changes - returning previous log levels - reducing the number of loggers on startup: now only the active loggers (that are logging something) are used during the test execution. This reduces the loops and the number of tests --- include/boost/test/impl/framework.ipp | 1 + include/boost/test/impl/unit_test_log.ipp | 313 ++++++++++++++-------- include/boost/test/unit_test_log.hpp | 9 +- 3 files changed, 208 insertions(+), 115 deletions(-) diff --git a/include/boost/test/impl/framework.ipp b/include/boost/test/impl/framework.ipp index 1e6eda72..3ee3b07f 100644 --- a/include/boost/test/impl/framework.ipp +++ b/include/boost/test/impl/framework.ipp @@ -991,6 +991,7 @@ setup_loggers() log_cleaner ); } unit_test_log.set_stream( stream_logger.ref() ); + unit_test_log.configure(); } else { diff --git a/include/boost/test/impl/unit_test_log.ipp b/include/boost/test/impl/unit_test_log.ipp index 32d745bc..d40b13d0 100644 --- a/include/boost/test/impl/unit_test_log.ipp +++ b/include/boost/test/impl/unit_test_log.ipp @@ -131,11 +131,18 @@ struct unit_test_log_impl { typedef std::vector v_formatter_data_t; v_formatter_data_t m_log_formatter_data; + typedef std::vector vp_formatter_data_t; + vp_formatter_data_t m_active_log_formatter_data; + // entry data log_entry_data m_entry_data; bool has_entry_in_progress() const { - BOOST_TEST_FOREACH( unit_test_log_data_helper_impl const&, current_logger_data, m_log_formatter_data ) { + for( vp_formatter_data_t::const_iterator it(m_active_log_formatter_data.begin()), ite(m_active_log_formatter_data.end()); + it < ite; + ++it) + { + unit_test_log_data_helper_impl& current_logger_data = **it; if( current_logger_data.m_entry_in_progress ) return true; } @@ -155,30 +162,53 @@ struct unit_test_log_impl { unit_test_log_impl& s_log_impl() { static unit_test_log_impl the_inst; return the_inst; } +// convenience +typedef unit_test_log_impl::vp_formatter_data_t vp_logger_t; +typedef unit_test_log_impl::v_formatter_data_t v_logger_t; + } // local namespace //____________________________________________________________________________// BOOST_TEST_SINGLETON_CONS_IMPL( unit_test_log_t ) +void +unit_test_log_t::configure( ) +{ + // configure is not test_start: + // test_start pushes the necessary log information when the test module is starting, and implies configure. + // configure: should be called each time the set of loggers, stream or configuration is changed. + s_log_impl().m_active_log_formatter_data.clear(); + for( unit_test_log_impl::v_formatter_data_t::iterator it(s_log_impl().m_log_formatter_data.begin()), + ite(s_log_impl().m_log_formatter_data.end()); + it < ite; + ++it) + { + if( !it->m_enabled || it->get_log_level() == log_nothing ) + continue; + + s_log_impl().m_active_log_formatter_data.push_back(&*it); + it->m_entry_in_progress = false; + } +} + //____________________________________________________________________________// void unit_test_log_t::test_start( counter_t test_cases_amount, test_unit_id ) { - BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) { - if( !current_logger_data.m_enabled || current_logger_data.get_log_level() == log_nothing ) - continue; + configure(); + vp_logger_t& vloggers = s_log_impl().m_active_log_formatter_data; + for( vp_logger_t::iterator it(vloggers.begin()), ite(vloggers.end()); it < ite; ++it) + { + unit_test_log_data_helper_impl& current_logger_data = **it; current_logger_data.m_log_formatter->log_start( current_logger_data.stream(), test_cases_amount ); - current_logger_data.m_log_formatter->log_build_info( current_logger_data.stream(), runtime_config::get( runtime_config::btrt_build_info )); //current_logger_data.stream().flush(); - - current_logger_data.m_entry_in_progress = false; } } @@ -187,12 +217,11 @@ unit_test_log_t::test_start( counter_t test_cases_amount, test_unit_id ) void unit_test_log_t::test_finish() { - BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) { - if( !current_logger_data.m_enabled || current_logger_data.get_log_level() == log_nothing ) - continue; - + vp_logger_t& vloggers = s_log_impl().m_active_log_formatter_data; + for( vp_logger_t::iterator it(vloggers.begin()), ite(vloggers.end()); it < ite; ++it) + { + unit_test_log_data_helper_impl& current_logger_data = **it; current_logger_data.m_log_formatter->log_finish( current_logger_data.stream() ); - current_logger_data.stream().flush(); } } @@ -212,8 +241,12 @@ unit_test_log_t::test_unit_start( test_unit const& tu ) { if( s_log_impl().has_entry_in_progress() ) *this << log::end(); - BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) { - if( !current_logger_data.m_enabled || current_logger_data.get_log_level() > log_test_units ) + + vp_logger_t& vloggers = s_log_impl().m_active_log_formatter_data; + for( vp_logger_t::iterator it(vloggers.begin()), ite(vloggers.end()); it < ite; ++it) + { + unit_test_log_data_helper_impl& current_logger_data = **it; + if( current_logger_data.get_log_level() > log_test_units ) continue; current_logger_data.m_log_formatter->test_unit_start( current_logger_data.stream(), tu ); } @@ -229,9 +262,11 @@ unit_test_log_t::test_unit_finish( test_unit const& tu, unsigned long elapsed ) if( s_log_impl().has_entry_in_progress() ) *this << log::end(); - BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) { - - if( !current_logger_data.m_enabled || current_logger_data.get_log_level() > log_test_units ) + vp_logger_t& vloggers = s_log_impl().m_active_log_formatter_data; + for( vp_logger_t::iterator it(vloggers.begin()), ite(vloggers.end()); it < ite; ++it) + { + unit_test_log_data_helper_impl& current_logger_data = **it; + if( current_logger_data.get_log_level() > log_test_units ) continue; current_logger_data.m_log_formatter->test_unit_finish( current_logger_data.stream(), tu, elapsed ); @@ -246,8 +281,11 @@ unit_test_log_t::test_unit_skipped( test_unit const& tu, const_string reason ) if( s_log_impl().has_entry_in_progress() ) *this << log::end(); - BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) { - if( !current_logger_data.m_enabled || current_logger_data.get_log_level() > log_test_units ) + vp_logger_t& vloggers = s_log_impl().m_active_log_formatter_data; + for( vp_logger_t::iterator it(vloggers.begin()), ite(vloggers.end()); it < ite; ++it) + { + unit_test_log_data_helper_impl& current_logger_data = **it; + if( current_logger_data.get_log_level() > log_test_units ) continue; current_logger_data.m_log_formatter->test_unit_skipped( current_logger_data.stream(), tu, reason ); @@ -260,8 +298,11 @@ unit_test_log_t::test_unit_aborted( test_unit const& tu ) if( s_log_impl().has_entry_in_progress() ) *this << log::end(); - BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) { - if( !current_logger_data.m_enabled || current_logger_data.get_log_level() > log_test_units ) + vp_logger_t& vloggers = s_log_impl().m_active_log_formatter_data; + for( vp_logger_t::iterator it(vloggers.begin()), ite(vloggers.end()); it < ite; ++it) + { + unit_test_log_data_helper_impl& current_logger_data = **it; + if( current_logger_data.get_log_level() > log_test_units ) continue; current_logger_data.m_log_formatter->test_unit_aborted(current_logger_data.stream(), tu ); @@ -274,8 +315,11 @@ unit_test_log_t::test_unit_timed_out( test_unit const& tu ) if( s_log_impl().has_entry_in_progress() ) *this << log::end(); - BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) { - if( !current_logger_data.m_enabled || current_logger_data.get_log_level() > log_test_units ) + vp_logger_t& vloggers = s_log_impl().m_active_log_formatter_data; + for( vp_logger_t::iterator it(vloggers.begin()), ite(vloggers.end()); it < ite; ++it) + { + unit_test_log_data_helper_impl& current_logger_data = **it; + if( current_logger_data.get_log_level() > log_test_units ) continue; current_logger_data.m_log_formatter->test_unit_timed_out(current_logger_data.stream(), tu ); @@ -295,9 +339,12 @@ unit_test_log_t::exception_caught( execution_exception const& ex ) if( s_log_impl().has_entry_in_progress() ) *this << log::end(); - BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) { + vp_logger_t& vloggers = s_log_impl().m_active_log_formatter_data; + for( vp_logger_t::iterator it(vloggers.begin()), ite(vloggers.end()); it < ite; ++it) + { + unit_test_log_data_helper_impl& current_logger_data = **it; - if( current_logger_data.m_enabled && l >= current_logger_data.get_log_level() ) { + if( l >= current_logger_data.get_log_level() ) { current_logger_data.m_log_formatter->log_exception_start( current_logger_data.stream(), s_log_impl().m_checkpoint_data, ex ); @@ -331,10 +378,11 @@ unit_test_log_t::operator<<( log::begin const& b ) if( s_log_impl().has_entry_in_progress() ) *this << log::end(); - BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) { - if( current_logger_data.m_enabled ) { - current_logger_data.m_stream_state_saver->restore(); - } + vp_logger_t& vloggers = s_log_impl().m_active_log_formatter_data; + for( vp_logger_t::iterator it(vloggers.begin()), ite(vloggers.end()); it < ite; ++it) + { + unit_test_log_data_helper_impl& current_logger_data = **it; + current_logger_data.m_stream_state_saver->restore(); } s_log_impl().m_entry_data.clear(); @@ -359,8 +407,11 @@ unit_test_log_t::operator<<( log::end const& ) if( s_log_impl().has_entry_in_progress() ) { log_entry_context( s_log_impl().m_entry_data.m_level ); - BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) { - if( current_logger_data.m_enabled && current_logger_data.m_entry_in_progress ) { + vp_logger_t& vloggers = s_log_impl().m_active_log_formatter_data; + for( vp_logger_t::iterator it(vloggers.begin()), ite(vloggers.end()); it < ite; ++it) + { + unit_test_log_data_helper_impl& current_logger_data = **it; + if( current_logger_data.m_entry_in_progress ) { current_logger_data.m_log_formatter->log_entry_finish( current_logger_data.stream() ); } current_logger_data.m_entry_in_progress = false; @@ -395,53 +446,42 @@ unit_test_log_t::operator()( log_level l ) //____________________________________________________________________________// bool -unit_test_log_t::log_entry_start(output_format log_format) +log_entry_start(unit_test_log_data_helper_impl ¤t_logger_data) { - BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) { - - if( current_logger_data.m_format != log_format ) - continue; - - if( current_logger_data.m_entry_in_progress ) - return true; - - if( !current_logger_data.m_enabled ) - return false; - - switch( s_log_impl().m_entry_data.m_level ) { - case log_successful_tests: - current_logger_data.m_log_formatter->log_entry_start( current_logger_data.stream(), s_log_impl().m_entry_data, - unit_test_log_formatter::BOOST_UTL_ET_INFO ); - break; - case log_messages: - current_logger_data.m_log_formatter->log_entry_start( current_logger_data.stream(), s_log_impl().m_entry_data, - unit_test_log_formatter::BOOST_UTL_ET_MESSAGE ); - break; - case log_warnings: - current_logger_data.m_log_formatter->log_entry_start( current_logger_data.stream(), s_log_impl().m_entry_data, - unit_test_log_formatter::BOOST_UTL_ET_WARNING ); - break; - case log_all_errors: - case log_cpp_exception_errors: - case log_system_errors: - current_logger_data.m_log_formatter->log_entry_start( current_logger_data.stream(), s_log_impl().m_entry_data, - unit_test_log_formatter::BOOST_UTL_ET_ERROR ); - break; - case log_fatal_errors: - current_logger_data.m_log_formatter->log_entry_start( current_logger_data.stream(), s_log_impl().m_entry_data, - unit_test_log_formatter::BOOST_UTL_ET_FATAL_ERROR ); - break; - case log_nothing: - case log_test_units: - case invalid_log_level: - return false; - } - - current_logger_data.m_entry_in_progress = true; + if( current_logger_data.m_entry_in_progress ) return true; + + switch( s_log_impl().m_entry_data.m_level ) { + case log_successful_tests: + current_logger_data.m_log_formatter->log_entry_start( current_logger_data.stream(), s_log_impl().m_entry_data, + unit_test_log_formatter::BOOST_UTL_ET_INFO ); + break; + case log_messages: + current_logger_data.m_log_formatter->log_entry_start( current_logger_data.stream(), s_log_impl().m_entry_data, + unit_test_log_formatter::BOOST_UTL_ET_MESSAGE ); + break; + case log_warnings: + current_logger_data.m_log_formatter->log_entry_start( current_logger_data.stream(), s_log_impl().m_entry_data, + unit_test_log_formatter::BOOST_UTL_ET_WARNING ); + break; + case log_all_errors: + case log_cpp_exception_errors: + case log_system_errors: + current_logger_data.m_log_formatter->log_entry_start( current_logger_data.stream(), s_log_impl().m_entry_data, + unit_test_log_formatter::BOOST_UTL_ET_ERROR ); + break; + case log_fatal_errors: + current_logger_data.m_log_formatter->log_entry_start( current_logger_data.stream(), s_log_impl().m_entry_data, + unit_test_log_formatter::BOOST_UTL_ET_FATAL_ERROR ); + break; + case log_nothing: + case log_test_units: + case invalid_log_level: + return false; } - return false; + current_logger_data.m_entry_in_progress = true; + return true; } //____________________________________________________________________________// @@ -449,8 +489,15 @@ unit_test_log_t::log_entry_start(output_format log_format) unit_test_log_t& unit_test_log_t::operator<<( const_string value ) { - BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) { - if( current_logger_data.m_enabled && s_log_impl().m_entry_data.m_level >= current_logger_data.get_log_level() && !value.empty() && log_entry_start(current_logger_data.m_format) ) + if(value.empty()) { + return *this; + } + + vp_logger_t& vloggers = s_log_impl().m_active_log_formatter_data; + for( vp_logger_t::iterator it(vloggers.begin()), ite(vloggers.end()); it < ite; ++it) + { + unit_test_log_data_helper_impl& current_logger_data = **it; + if( s_log_impl().m_entry_data.m_level >= current_logger_data.get_log_level() && log_entry_start(current_logger_data) ) current_logger_data.m_log_formatter->log_entry_value( current_logger_data.stream(), value ); } @@ -462,9 +509,16 @@ unit_test_log_t::operator<<( const_string value ) unit_test_log_t& unit_test_log_t::operator<<( lazy_ostream const& value ) { - BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) { - if( current_logger_data.m_enabled && s_log_impl().m_entry_data.m_level >= current_logger_data.get_log_level() && !value.empty() ) { - if( log_entry_start(current_logger_data.m_format) ) { + if(value.empty()) { + return *this; + } + + vp_logger_t& vloggers = s_log_impl().m_active_log_formatter_data; + for( vp_logger_t::iterator it(vloggers.begin()), ite(vloggers.end()); it < ite; ++it) + { + unit_test_log_data_helper_impl& current_logger_data = **it; + if( s_log_impl().m_entry_data.m_level >= current_logger_data.get_log_level() ) { + if( log_entry_start(current_logger_data) ) { current_logger_data.m_log_formatter->log_entry_value( current_logger_data.stream(), value ); } } @@ -483,25 +537,26 @@ unit_test_log_t::log_entry_context( log_level l ) const_string frame; - BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) { - if( current_logger_data.m_enabled ) { - current_logger_data.m_log_formatter->entry_context_start( current_logger_data.stream(), l ); - } + vp_logger_t& vloggers = s_log_impl().m_active_log_formatter_data; + for( vp_logger_t::iterator it(vloggers.begin()), ite(vloggers.end()); it < ite; ++it) + { + unit_test_log_data_helper_impl& current_logger_data = **it; + current_logger_data.m_log_formatter->entry_context_start( current_logger_data.stream(), l ); } while( !(frame=context.next()).is_empty() ) { - BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) { - if( current_logger_data.m_enabled ) { - current_logger_data.m_log_formatter->log_entry_context( current_logger_data.stream(), l, frame ); - } + for( vp_logger_t::iterator it(vloggers.begin()), ite(vloggers.end()); it < ite; ++it) + { + unit_test_log_data_helper_impl& current_logger_data = **it; + current_logger_data.m_log_formatter->log_entry_context( current_logger_data.stream(), l, frame ); } } - BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) { - if( current_logger_data.m_enabled ) { - current_logger_data.m_log_formatter->entry_context_finish( current_logger_data.stream(), l ); - } + for( vp_logger_t::iterator it(vloggers.begin()), ite(vloggers.end()); it < ite; ++it) + { + unit_test_log_data_helper_impl& current_logger_data = **it; + current_logger_data.m_log_formatter->entry_context_finish( current_logger_data.stream(), l ); } } @@ -521,7 +576,11 @@ unit_test_log_t::set_stream( std::ostream& str ) if( s_log_impl().has_entry_in_progress() ) return; - BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) { + v_logger_t& vloggers = s_log_impl().m_log_formatter_data; + for( v_logger_t::iterator it(vloggers.begin()), ite(vloggers.end()); it < ite; ++it) + { + unit_test_log_data_helper_impl& current_logger_data = *it; + current_logger_data.m_stream = &str; current_logger_data.m_stream_state_saver.reset( new io_saver_type( str ) ); } @@ -535,7 +594,10 @@ unit_test_log_t::set_stream( output_format log_format, std::ostream& str ) if( s_log_impl().has_entry_in_progress() ) return; - BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) { + v_logger_t& vloggers = s_log_impl().m_log_formatter_data; + for( v_logger_t::iterator it(vloggers.begin()), ite(vloggers.end()); it < ite; ++it) + { + unit_test_log_data_helper_impl& current_logger_data = *it; if( current_logger_data.m_format == log_format) { current_logger_data.m_stream = &str; current_logger_data.m_stream_state_saver.reset( new io_saver_type( str ) ); @@ -547,7 +609,10 @@ unit_test_log_t::set_stream( output_format log_format, std::ostream& str ) std::ostream* unit_test_log_t::get_stream( output_format log_format ) const { - BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) { + v_logger_t& vloggers = s_log_impl().m_log_formatter_data; + for( v_logger_t::iterator it(vloggers.begin()), ite(vloggers.end()); it < ite; ++it) + { + unit_test_log_data_helper_impl& current_logger_data = *it; if( current_logger_data.m_format == log_format) { return current_logger_data.m_stream; } @@ -557,31 +622,43 @@ unit_test_log_t::get_stream( output_format log_format ) const //____________________________________________________________________________// -void +log_level unit_test_log_t::set_threshold_level( log_level lev ) { if( s_log_impl().has_entry_in_progress() || lev == invalid_log_level ) - return; + return invalid_log_level; - BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) { + log_level ret = log_nothing; + v_logger_t& vloggers = s_log_impl().m_log_formatter_data; + for( v_logger_t::iterator it(vloggers.begin()), ite(vloggers.end()); it < ite; ++it) + { + unit_test_log_data_helper_impl& current_logger_data = *it; + ret = (std::min)(ret, current_logger_data.m_log_formatter->get_log_level()); current_logger_data.m_log_formatter->set_log_level( lev ); } + return ret; } //____________________________________________________________________________// -void +log_level unit_test_log_t::set_threshold_level( output_format log_format, log_level lev ) { if( s_log_impl().has_entry_in_progress() || lev == invalid_log_level ) - return; + return invalid_log_level; - BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) { + log_level ret = log_nothing; + v_logger_t& vloggers = s_log_impl().m_log_formatter_data; + for( v_logger_t::iterator it(vloggers.begin()), ite(vloggers.end()); it < ite; ++it) + { + unit_test_log_data_helper_impl& current_logger_data = *it; if( current_logger_data.m_format == log_format) { + ret = current_logger_data.m_log_formatter->get_log_level(); current_logger_data.m_log_formatter->set_log_level( lev ); break; } } + return ret; } //____________________________________________________________________________// @@ -592,7 +669,10 @@ unit_test_log_t::set_format( output_format log_format ) if( s_log_impl().has_entry_in_progress() ) return; - BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) { + v_logger_t& vloggers = s_log_impl().m_log_formatter_data; + for( v_logger_t::iterator it(vloggers.begin()), ite(vloggers.end()); it < ite; ++it) + { + unit_test_log_data_helper_impl& current_logger_data = *it; current_logger_data.m_enabled = current_logger_data.m_format == log_format; } } @@ -605,7 +685,10 @@ unit_test_log_t::add_format( output_format log_format ) if( s_log_impl().has_entry_in_progress() ) return; - BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) { + v_logger_t& vloggers = s_log_impl().m_log_formatter_data; + for( v_logger_t::iterator it(vloggers.begin()), ite(vloggers.end()); it < ite; ++it) + { + unit_test_log_data_helper_impl& current_logger_data = *it; if( current_logger_data.m_format == log_format) { current_logger_data.m_enabled = true; break; @@ -617,7 +700,11 @@ unit_test_log_t::add_format( output_format log_format ) unit_test_log_formatter* unit_test_log_t::get_formatter( output_format log_format ) { - BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) { + + v_logger_t& vloggers = s_log_impl().m_log_formatter_data; + for( v_logger_t::iterator it(vloggers.begin()), ite(vloggers.end()); it < ite; ++it) + { + unit_test_log_data_helper_impl& current_logger_data = *it; if( current_logger_data.m_format == log_format) { return current_logger_data.m_log_formatter.get(); } @@ -630,10 +717,8 @@ void unit_test_log_t::add_formatter( unit_test_log_formatter* the_formatter ) { // remove only user defined logger - for(unit_test_log_impl::v_formatter_data_t::iterator it(s_log_impl().m_log_formatter_data.begin()), - ite(s_log_impl().m_log_formatter_data.end()); - it != ite; - ++it) + v_logger_t& vloggers = s_log_impl().m_log_formatter_data; + for(v_logger_t::iterator it(vloggers.begin()), ite(vloggers.end()); it < ite; ++it) { if( it->m_format == OF_CUSTOM_LOGGER) { s_log_impl().m_log_formatter_data.erase(it); @@ -642,21 +727,23 @@ unit_test_log_t::add_formatter( unit_test_log_formatter* the_formatter ) } if( the_formatter ) { - s_log_impl().m_log_formatter_data.push_back( unit_test_log_data_helper_impl(the_formatter, OF_CUSTOM_LOGGER, true) ); + s_log_impl().m_active_log_formatter_data.clear(); // otherwise dandling references + vloggers.push_back( unit_test_log_data_helper_impl(the_formatter, OF_CUSTOM_LOGGER, true) ); } } void unit_test_log_t::set_formatter( unit_test_log_formatter* the_formatter ) { + if( s_log_impl().has_entry_in_progress() ) + return; + // remove only user defined logger log_level current_level = invalid_log_level; std::ostream *current_stream = 0; output_format previous_format = OF_INVALID; - for(unit_test_log_impl::v_formatter_data_t::iterator it(s_log_impl().m_log_formatter_data.begin()), - ite(s_log_impl().m_log_formatter_data.end()); - it != ite; - ++it) + v_logger_t& vloggers = s_log_impl().m_log_formatter_data; + for(v_logger_t::iterator it(vloggers.begin()), ite(vloggers.end()); it < ite; ++it) { if( it->m_enabled ) { if( current_level == invalid_log_level || it->m_format < previous_format || it->m_format == OF_CUSTOM_LOGGER) { @@ -673,6 +760,8 @@ unit_test_log_t::set_formatter( unit_test_log_formatter* the_formatter ) set_threshold_level(OF_CUSTOM_LOGGER, current_level); set_stream(OF_CUSTOM_LOGGER, *current_stream); } + + configure(); } //____________________________________________________________________________// diff --git a/include/boost/test/unit_test_log.hpp b/include/boost/test/unit_test_log.hpp index aa3ce8d9..97b40ac2 100644 --- a/include/boost/test/unit_test_log.hpp +++ b/include/boost/test/unit_test_log.hpp @@ -147,13 +147,15 @@ public: //! Sets the threshold level for all loggers/formatters. //! //! This will override the log level of all loggers, whether enabled or not. - void set_threshold_level( log_level ); + //! @return the minimum of the previous log level of all formatters (new in Boost 1.73) + log_level set_threshold_level( log_level ); //! Sets the threshold/log level of a specific format //! //! @note Has no effect if the specified format is not found //! @par Since Boost 1.62 - void set_threshold_level( output_format, log_level ); + //! @return the previous log level of the corresponding formatter (new in Boost 1.73) + log_level set_threshold_level( output_format, log_level ); //! Add a format to the set of loggers //! @@ -215,9 +217,10 @@ public: ut_detail::entry_value_collector operator()( log_level ); // initiate entry collection + //! Prepares internal states after log levels, streams and format has been set up + void configure(); private: // Implementation helpers - bool log_entry_start(output_format log_format); void log_entry_context( log_level l ); void clear_entry_context(); From 90857300545f9041b00d28cd7a27fb6506dd9fdf Mon Sep 17 00:00:00 2001 From: Raffi Enficiaud Date: Sat, 4 Apr 2020 18:17:05 +0200 Subject: [PATCH 6/6] Update of tests using loggers - changing the lines in the logging files wrt. test - making the file names more robust on Windows - factorizing logs helpers proper setup and to avoid silent ignore of the errors - using the new configure facility of the loggers --- .../global-fixtures-test.pattern | 1215 +++++++++-------- .../log-count-skipped-tests.pattern | 84 +- .../log-formatter-test.pattern | 240 ++-- .../log-formatter-test.pattern.junit | 8 +- .../messages-in-datasets-test.pattern | 18 +- .../errors-handling-test.cpp | 17 +- test/framework-ts/log-count-skipped-test.cpp | 31 +- test/framework-ts/log-formatter-test.cpp | 24 +- test/framework-ts/logger-for-tests.hpp | 31 +- .../message-in-datatestcase-test.cpp | 36 +- .../test-macro-global-fixture.cpp | 43 +- test/writing-test-ts/test_tools-test.cpp | 35 +- 12 files changed, 904 insertions(+), 878 deletions(-) diff --git a/test/baseline-outputs/global-fixtures-test.pattern b/test/baseline-outputs/global-fixtures-test.pattern index b81d9dfe..72dabb22 100644 --- a/test/baseline-outputs/global-fixtures-test.pattern +++ b/test/baseline-outputs/global-fixtures-test.pattern @@ -6,27 +6,27 @@ Running 5 test cases... xxx/test-macro-global-fixture.cpp:281: Entering test suite "Fake Test Suite Hierarchy" GlobalFixtureWithCtor: ctor xxx/test-macro-global-fixture.cpp:282: Entering test case "bad_foo" -xxx/test-macro-global-fixture.cpp:154: error: in "Fake Test Suite Hierarchy/bad_foo": +xxx/test-macro-global-fixture.cpp:151: error: in "Fake Test Suite Hierarchy/bad_foo": this is a message -xxx/test-macro-global-fixture.cpp:157: info: check true has passed -xxx/test-macro-global-fixture.cpp:161: error: in "Fake Test Suite Hierarchy/bad_foo": with some message +xxx/test-macro-global-fixture.cpp:154: info: check true has passed +xxx/test-macro-global-fixture.cpp:158: error: in "Fake Test Suite Hierarchy/bad_foo": with some message Failure occurred in a following context: Context value=something Context value2=something different -xxx/test-macro-global-fixture.cpp:163: error: in "Fake Test Suite Hierarchy/bad_foo": non sense +xxx/test-macro-global-fixture.cpp:160: error: in "Fake Test Suite Hierarchy/bad_foo": non sense xxx/test-macro-global-fixture.cpp:282: Leaving test case "bad_foo" xxx/test-macro-global-fixture.cpp:283: Entering test case "very_bad_foo" -xxx/test-macro-global-fixture.cpp:168: fatal error: in "Fake Test Suite Hierarchy/very_bad_foo": very_bad_foo is fatal +xxx/test-macro-global-fixture.cpp:165: fatal error: in "Fake Test Suite Hierarchy/very_bad_foo": very_bad_foo is fatal Failure occurred in a following context: some context xxx/test-macro-global-fixture.cpp:283: Leaving test case "very_bad_foo" xxx/test-macro-global-fixture.cpp:284: Entering test case "very_bad_exception" -xxx/test-macro-global-fixture.cpp:177: error: in "Fake Test Suite Hierarchy/very_bad_exception": with some message +xxx/test-macro-global-fixture.cpp:174: error: in "Fake Test Suite Hierarchy/very_bad_exception": with some message Failure occurred in a following context: Context value=something Context value2=something different unknown location:0: fatal error: in "Fake Test Suite Hierarchy/very_bad_exception": unknown type -xxx/test-macro-global-fixture.cpp:177: last checkpoint +xxx/test-macro-global-fixture.cpp:174: last checkpoint Failure occurred in a following context: exception context should be shown xxx/test-macro-global-fixture.cpp:284: Leaving test case "very_bad_exception" @@ -37,35 +37,35 @@ xxx/test-macro-global-fixture.cpp:276: Leaving test case "good_foo" xxx/test-macro-global-fixture.cpp:275: Leaving test suite "1 test cases inside" xxx/test-macro-global-fixture.cpp:278: Entering test suite "1 bad test case inside" xxx/test-macro-global-fixture.cpp:279: Entering test case "bad_foo" -xxx/test-macro-global-fixture.cpp:154: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": +xxx/test-macro-global-fixture.cpp:151: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": this is a message -xxx/test-macro-global-fixture.cpp:157: info: check true has passed -xxx/test-macro-global-fixture.cpp:161: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": with some message +xxx/test-macro-global-fixture.cpp:154: info: check true has passed +xxx/test-macro-global-fixture.cpp:158: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": with some message Failure occurred in a following context: Context value=something Context value2=something different -xxx/test-macro-global-fixture.cpp:163: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": non sense +xxx/test-macro-global-fixture.cpp:160: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": non sense xxx/test-macro-global-fixture.cpp:279: Leaving test case "bad_foo" xxx/test-macro-global-fixture.cpp:278: Leaving test suite "1 bad test case inside" GlobalFixtureWithCtor: dtor xxx/test-macro-global-fixture.cpp:281: Leaving test suite "Fake Test Suite Hierarchy" * 2-format ******************************************************************* -ZZZZZZZZZZZZZZZ +ZZZZZZZZZZZZZZZ * 3-format ******************************************************************* - + @@ -99,7 +99,7 @@ INFO: @@ -158,13 +158,13 @@ CONTEXT: @@ -197,18 +197,18 @@ INFO: * 3-format ******************************************************************* - + 3 is not satisfied [2 <= 3] +xxx/test-macro-global-fixture.cpp:147: warning: in "Fake Test Suite Hierarchy no errors/almost_good_foo": condition 2>3 is not satisfied [2 <= 3] Test case Fake Test Suite Hierarchy no errors/almost_good_foo did not check any assertions xxx/test-macro-global-fixture.cpp:295: Leaving test case "almost_good_foo" xxx/test-macro-global-fixture.cpp:290: Entering test suite "1 test cases inside" @@ -327,19 +328,19 @@ GlobalFixtureWithCtor: dtor xxx/test-macro-global-fixture.cpp:293: Leaving test suite "Fake Test Suite Hierarchy no errors" * 2-format ******************************************************************* -3 is not satisfied [2 <= 3]]]>ZZZZZZ +3 is not satisfied [2 <= 3]]]>ZZZZZZ * 3-format ******************************************************************* 3 is not satisfied [2 <= 3] MESSAGE: - file : boost.test framework -- line : 212 +- line : 0 - message: Test case Fake Test Suite Hierarchy no errors/almost_good_foo did not check any assertions ]]> @@ -347,7 +348,7 @@ MESSAGE: @@ -368,29 +369,29 @@ MESSAGE: Running 5 test cases... xxx/test-macro-global-fixture.cpp:281: Entering test suite "Fake Test Suite Hierarchy" GlobalFixtureWithCtor: ctor -xxx/test-macro-global-fixture.cpp:150: warning: in "Fake Test Suite Hierarchy": condition 2>3 is not satisfied [2 <= 3] +xxx/test-macro-global-fixture.cpp:147: warning: in "Fake Test Suite Hierarchy": condition 2>3 is not satisfied [2 <= 3] xxx/test-macro-global-fixture.cpp:282: Entering test case "bad_foo" -xxx/test-macro-global-fixture.cpp:154: error: in "Fake Test Suite Hierarchy/bad_foo": +xxx/test-macro-global-fixture.cpp:151: error: in "Fake Test Suite Hierarchy/bad_foo": this is a message -xxx/test-macro-global-fixture.cpp:157: info: check true has passed -xxx/test-macro-global-fixture.cpp:161: error: in "Fake Test Suite Hierarchy/bad_foo": with some message +xxx/test-macro-global-fixture.cpp:154: info: check true has passed +xxx/test-macro-global-fixture.cpp:158: error: in "Fake Test Suite Hierarchy/bad_foo": with some message Failure occurred in a following context: Context value=something Context value2=something different -xxx/test-macro-global-fixture.cpp:163: error: in "Fake Test Suite Hierarchy/bad_foo": non sense +xxx/test-macro-global-fixture.cpp:160: error: in "Fake Test Suite Hierarchy/bad_foo": non sense xxx/test-macro-global-fixture.cpp:282: Leaving test case "bad_foo" xxx/test-macro-global-fixture.cpp:283: Entering test case "very_bad_foo" -xxx/test-macro-global-fixture.cpp:168: fatal error: in "Fake Test Suite Hierarchy/very_bad_foo": very_bad_foo is fatal +xxx/test-macro-global-fixture.cpp:165: fatal error: in "Fake Test Suite Hierarchy/very_bad_foo": very_bad_foo is fatal Failure occurred in a following context: some context xxx/test-macro-global-fixture.cpp:283: Leaving test case "very_bad_foo" xxx/test-macro-global-fixture.cpp:284: Entering test case "very_bad_exception" -xxx/test-macro-global-fixture.cpp:177: error: in "Fake Test Suite Hierarchy/very_bad_exception": with some message +xxx/test-macro-global-fixture.cpp:174: error: in "Fake Test Suite Hierarchy/very_bad_exception": with some message Failure occurred in a following context: Context value=something Context value2=something different unknown location:0: fatal error: in "Fake Test Suite Hierarchy/very_bad_exception": unknown type -xxx/test-macro-global-fixture.cpp:177: last checkpoint +xxx/test-macro-global-fixture.cpp:174: last checkpoint Failure occurred in a following context: exception context should be shown xxx/test-macro-global-fixture.cpp:284: Leaving test case "very_bad_exception" @@ -401,35 +402,35 @@ xxx/test-macro-global-fixture.cpp:276: Leaving test case "good_foo" xxx/test-macro-global-fixture.cpp:275: Leaving test suite "1 test cases inside" xxx/test-macro-global-fixture.cpp:278: Entering test suite "1 bad test case inside" xxx/test-macro-global-fixture.cpp:279: Entering test case "bad_foo" -xxx/test-macro-global-fixture.cpp:154: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": +xxx/test-macro-global-fixture.cpp:151: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": this is a message -xxx/test-macro-global-fixture.cpp:157: info: check true has passed -xxx/test-macro-global-fixture.cpp:161: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": with some message +xxx/test-macro-global-fixture.cpp:154: info: check true has passed +xxx/test-macro-global-fixture.cpp:158: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": with some message Failure occurred in a following context: Context value=something Context value2=something different -xxx/test-macro-global-fixture.cpp:163: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": non sense +xxx/test-macro-global-fixture.cpp:160: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": non sense xxx/test-macro-global-fixture.cpp:279: Leaving test case "bad_foo" xxx/test-macro-global-fixture.cpp:278: Leaving test suite "1 bad test case inside" GlobalFixtureWithCtor: dtor xxx/test-macro-global-fixture.cpp:281: Leaving test suite "Fake Test Suite Hierarchy" * 2-format ******************************************************************* -3 is not satisfied [2 <= 3]]]>ZZZZZZZZZZZZZZZ +3 is not satisfied [2 <= 3]]]>ZZZZZZZZZZZZZZZ * 3-format ******************************************************************* - + @@ -463,7 +464,7 @@ INFO: @@ -522,13 +523,13 @@ CONTEXT: @@ -561,18 +562,18 @@ INFO: * 3-format ******************************************************************* - + 3 is not satisfied [2 <= 3] +xxx/test-macro-global-fixture.cpp:147: warning: in "Fake Test Suite Hierarchy no errors": condition 2>3 is not satisfied [2 <= 3] +xxx/test-macro-global-fixture.cpp:289: Test suite "Fake Test Suite Hierarchy no errors/0 test cases inside" is skipped because disabled xxx/test-macro-global-fixture.cpp:295: Entering test case "almost_good_foo" -xxx/test-macro-global-fixture.cpp:150: warning: in "Fake Test Suite Hierarchy no errors/almost_good_foo": condition 2>3 is not satisfied [2 <= 3] +xxx/test-macro-global-fixture.cpp:147: warning: in "Fake Test Suite Hierarchy no errors/almost_good_foo": condition 2>3 is not satisfied [2 <= 3] Test case Fake Test Suite Hierarchy no errors/almost_good_foo did not check any assertions xxx/test-macro-global-fixture.cpp:295: Leaving test case "almost_good_foo" xxx/test-macro-global-fixture.cpp:290: Entering test suite "1 test cases inside" @@ -692,19 +694,19 @@ GlobalFixtureWithCtor: dtor xxx/test-macro-global-fixture.cpp:293: Leaving test suite "Fake Test Suite Hierarchy no errors" * 2-format ******************************************************************* -3 is not satisfied [2 <= 3]]]>3 is not satisfied [2 <= 3]]]>ZZZZZZ +3 is not satisfied [2 <= 3]]]>3 is not satisfied [2 <= 3]]]>ZZZZZZ * 3-format ******************************************************************* 3 is not satisfied [2 <= 3] MESSAGE: - file : boost.test framework -- line : 212 +- line : 0 - message: Test case Fake Test Suite Hierarchy no errors/almost_good_foo did not check any assertions ]]> @@ -712,7 +714,7 @@ MESSAGE: @@ -733,36 +735,36 @@ MESSAGE: Running 5 test cases... xxx/test-macro-global-fixture.cpp:281: Entering test suite "Fake Test Suite Hierarchy" GlobalFixtureWithCtor: ctor -xxx/test-macro-global-fixture.cpp:154: error: in "Fake Test Suite Hierarchy": +xxx/test-macro-global-fixture.cpp:151: error: in "Fake Test Suite Hierarchy": this is a message -xxx/test-macro-global-fixture.cpp:157: info: check true has passed -xxx/test-macro-global-fixture.cpp:161: error: in "Fake Test Suite Hierarchy": with some message +xxx/test-macro-global-fixture.cpp:154: info: check true has passed +xxx/test-macro-global-fixture.cpp:158: error: in "Fake Test Suite Hierarchy": with some message Failure occurred in a following context: Context value=something Context value2=something different -xxx/test-macro-global-fixture.cpp:163: error: in "Fake Test Suite Hierarchy": non sense +xxx/test-macro-global-fixture.cpp:160: error: in "Fake Test Suite Hierarchy": non sense xxx/test-macro-global-fixture.cpp:282: Entering test case "bad_foo" -xxx/test-macro-global-fixture.cpp:154: error: in "Fake Test Suite Hierarchy/bad_foo": +xxx/test-macro-global-fixture.cpp:151: error: in "Fake Test Suite Hierarchy/bad_foo": this is a message -xxx/test-macro-global-fixture.cpp:157: info: check true has passed -xxx/test-macro-global-fixture.cpp:161: error: in "Fake Test Suite Hierarchy/bad_foo": with some message +xxx/test-macro-global-fixture.cpp:154: info: check true has passed +xxx/test-macro-global-fixture.cpp:158: error: in "Fake Test Suite Hierarchy/bad_foo": with some message Failure occurred in a following context: Context value=something Context value2=something different -xxx/test-macro-global-fixture.cpp:163: error: in "Fake Test Suite Hierarchy/bad_foo": non sense +xxx/test-macro-global-fixture.cpp:160: error: in "Fake Test Suite Hierarchy/bad_foo": non sense xxx/test-macro-global-fixture.cpp:282: Leaving test case "bad_foo" xxx/test-macro-global-fixture.cpp:283: Entering test case "very_bad_foo" -xxx/test-macro-global-fixture.cpp:168: fatal error: in "Fake Test Suite Hierarchy/very_bad_foo": very_bad_foo is fatal +xxx/test-macro-global-fixture.cpp:165: fatal error: in "Fake Test Suite Hierarchy/very_bad_foo": very_bad_foo is fatal Failure occurred in a following context: some context xxx/test-macro-global-fixture.cpp:283: Leaving test case "very_bad_foo" xxx/test-macro-global-fixture.cpp:284: Entering test case "very_bad_exception" -xxx/test-macro-global-fixture.cpp:177: error: in "Fake Test Suite Hierarchy/very_bad_exception": with some message +xxx/test-macro-global-fixture.cpp:174: error: in "Fake Test Suite Hierarchy/very_bad_exception": with some message Failure occurred in a following context: Context value=something Context value2=something different unknown location:0: fatal error: in "Fake Test Suite Hierarchy/very_bad_exception": unknown type -xxx/test-macro-global-fixture.cpp:177: last checkpoint +xxx/test-macro-global-fixture.cpp:174: last checkpoint Failure occurred in a following context: exception context should be shown xxx/test-macro-global-fixture.cpp:284: Leaving test case "very_bad_exception" @@ -773,35 +775,35 @@ xxx/test-macro-global-fixture.cpp:276: Leaving test case "good_foo" xxx/test-macro-global-fixture.cpp:275: Leaving test suite "1 test cases inside" xxx/test-macro-global-fixture.cpp:278: Entering test suite "1 bad test case inside" xxx/test-macro-global-fixture.cpp:279: Entering test case "bad_foo" -xxx/test-macro-global-fixture.cpp:154: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": +xxx/test-macro-global-fixture.cpp:151: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": this is a message -xxx/test-macro-global-fixture.cpp:157: info: check true has passed -xxx/test-macro-global-fixture.cpp:161: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": with some message +xxx/test-macro-global-fixture.cpp:154: info: check true has passed +xxx/test-macro-global-fixture.cpp:158: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": with some message Failure occurred in a following context: Context value=something Context value2=something different -xxx/test-macro-global-fixture.cpp:163: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": non sense +xxx/test-macro-global-fixture.cpp:160: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": non sense xxx/test-macro-global-fixture.cpp:279: Leaving test case "bad_foo" xxx/test-macro-global-fixture.cpp:278: Leaving test suite "1 bad test case inside" GlobalFixtureWithCtor: dtor xxx/test-macro-global-fixture.cpp:281: Leaving test suite "Fake Test Suite Hierarchy" * 2-format ******************************************************************* -ZZZZZZZZZZZZZZZ +ZZZZZZZZZZZZZZZ * 3-format ******************************************************************* - + @@ -883,7 +885,7 @@ INFO: @@ -942,13 +944,13 @@ CONTEXT: @@ -981,18 +983,18 @@ INFO: * 3-format ******************************************************************* - + 3 is not satisfied [2 <= 3] +xxx/test-macro-global-fixture.cpp:147: warning: in "Fake Test Suite Hierarchy no errors/almost_good_foo": condition 2>3 is not satisfied [2 <= 3] Test case Fake Test Suite Hierarchy no errors/almost_good_foo did not check any assertions xxx/test-macro-global-fixture.cpp:295: Leaving test case "almost_good_foo" xxx/test-macro-global-fixture.cpp:290: Entering test suite "1 test cases inside" @@ -1146,7 +1149,7 @@ GlobalFixtureWithCtor: dtor xxx/test-macro-global-fixture.cpp:293: Leaving test suite "Fake Test Suite Hierarchy no errors" * 2-format ******************************************************************* -3 is not satisfied [2 <= 3]]]>ZZZZZZ +3 is not satisfied [2 <= 3]]]>ZZZZZZ * 3-format ******************************************************************* @@ -1154,13 +1157,13 @@ xxx/test-macro-global-fixture.cpp:293: Leaving test suite "Fake Test Suite Hiera 3 is not satisfied [2 <= 3] MESSAGE: - file : boost.test framework -- line : 212 +- line : 0 - message: Test case Fake Test Suite Hierarchy no errors/almost_good_foo did not check any assertions ]]> @@ -1214,7 +1217,7 @@ MESSAGE: @@ -1227,13 +1230,13 @@ MESSAGE: + * 3-format ******************************************************************* @@ -1276,7 +1279,7 @@ xxx/test-macro-global-fixture.cpp:281: Leaving test suite "Fake Test Suite Hiera + * 3-format ******************************************************************* @@ -1393,7 +1396,7 @@ xxx/test-macro-global-fixture.cpp:293: Leaving test suite "Fake Test Suite Hiera + * 3-format ******************************************************************* @@ -1480,7 +1483,7 @@ xxx/test-macro-global-fixture.cpp:281: Leaving test suite "Fake Test Suite Hiera + * 3-format ******************************************************************* @@ -1640,7 +1643,7 @@ xxx/test-macro-global-fixture.cpp:293: Leaving test suite "Fake Test Suite Hiera ZZZZZZZZZZZZZZZ +ZZZZZZZZZZZZZZZ * 3-format ******************************************************************* - + @@ -1842,7 +1845,7 @@ INFO: @@ -1901,13 +1904,13 @@ CONTEXT: @@ -1940,18 +1943,18 @@ INFO: * 3-format ******************************************************************* - + 3 is not satisfied [2 <= 3] +xxx/test-macro-global-fixture.cpp:147: warning: in "Fake Test Suite Hierarchy no errors/almost_good_foo": condition 2>3 is not satisfied [2 <= 3] Test case Fake Test Suite Hierarchy no errors/almost_good_foo did not check any assertions xxx/test-macro-global-fixture.cpp:295: Leaving test case "almost_good_foo" xxx/test-macro-global-fixture.cpp:290: Entering test suite "1 test cases inside" @@ -2072,19 +2076,19 @@ GlobalFixtureWithSetup dtor xxx/test-macro-global-fixture.cpp:293: Leaving test suite "Fake Test Suite Hierarchy no errors" * 2-format ******************************************************************* -3 is not satisfied [2 <= 3]]]>ZZZZZZ +3 is not satisfied [2 <= 3]]]>ZZZZZZ * 3-format ******************************************************************* 3 is not satisfied [2 <= 3] MESSAGE: - file : boost.test framework -- line : 212 +- line : 0 - message: Test case Fake Test Suite Hierarchy no errors/almost_good_foo did not check any assertions ]]> @@ -2092,7 +2096,7 @@ MESSAGE: @@ -2114,30 +2118,30 @@ Running 5 test cases... xxx/test-macro-global-fixture.cpp:281: Entering test suite "Fake Test Suite Hierarchy" GlobalFixtureWithSetup ctor GlobalFixtureWithSetup::setup-calling function -xxx/test-macro-global-fixture.cpp:150: warning: in "Fake Test Suite Hierarchy": condition 2>3 is not satisfied [2 <= 3] +xxx/test-macro-global-fixture.cpp:147: warning: in "Fake Test Suite Hierarchy": condition 2>3 is not satisfied [2 <= 3] GlobalFixtureWithSetup::setup-calling function done xxx/test-macro-global-fixture.cpp:282: Entering test case "bad_foo" -xxx/test-macro-global-fixture.cpp:154: error: in "Fake Test Suite Hierarchy/bad_foo": +xxx/test-macro-global-fixture.cpp:151: error: in "Fake Test Suite Hierarchy/bad_foo": this is a message -xxx/test-macro-global-fixture.cpp:157: info: check true has passed -xxx/test-macro-global-fixture.cpp:161: error: in "Fake Test Suite Hierarchy/bad_foo": with some message +xxx/test-macro-global-fixture.cpp:154: info: check true has passed +xxx/test-macro-global-fixture.cpp:158: error: in "Fake Test Suite Hierarchy/bad_foo": with some message Failure occurred in a following context: Context value=something Context value2=something different -xxx/test-macro-global-fixture.cpp:163: error: in "Fake Test Suite Hierarchy/bad_foo": non sense +xxx/test-macro-global-fixture.cpp:160: error: in "Fake Test Suite Hierarchy/bad_foo": non sense xxx/test-macro-global-fixture.cpp:282: Leaving test case "bad_foo" xxx/test-macro-global-fixture.cpp:283: Entering test case "very_bad_foo" -xxx/test-macro-global-fixture.cpp:168: fatal error: in "Fake Test Suite Hierarchy/very_bad_foo": very_bad_foo is fatal +xxx/test-macro-global-fixture.cpp:165: fatal error: in "Fake Test Suite Hierarchy/very_bad_foo": very_bad_foo is fatal Failure occurred in a following context: some context xxx/test-macro-global-fixture.cpp:283: Leaving test case "very_bad_foo" xxx/test-macro-global-fixture.cpp:284: Entering test case "very_bad_exception" -xxx/test-macro-global-fixture.cpp:177: error: in "Fake Test Suite Hierarchy/very_bad_exception": with some message +xxx/test-macro-global-fixture.cpp:174: error: in "Fake Test Suite Hierarchy/very_bad_exception": with some message Failure occurred in a following context: Context value=something Context value2=something different unknown location:0: fatal error: in "Fake Test Suite Hierarchy/very_bad_exception": unknown type -xxx/test-macro-global-fixture.cpp:177: last checkpoint +xxx/test-macro-global-fixture.cpp:174: last checkpoint Failure occurred in a following context: exception context should be shown xxx/test-macro-global-fixture.cpp:284: Leaving test case "very_bad_exception" @@ -2148,35 +2152,35 @@ xxx/test-macro-global-fixture.cpp:276: Leaving test case "good_foo" xxx/test-macro-global-fixture.cpp:275: Leaving test suite "1 test cases inside" xxx/test-macro-global-fixture.cpp:278: Entering test suite "1 bad test case inside" xxx/test-macro-global-fixture.cpp:279: Entering test case "bad_foo" -xxx/test-macro-global-fixture.cpp:154: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": +xxx/test-macro-global-fixture.cpp:151: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": this is a message -xxx/test-macro-global-fixture.cpp:157: info: check true has passed -xxx/test-macro-global-fixture.cpp:161: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": with some message +xxx/test-macro-global-fixture.cpp:154: info: check true has passed +xxx/test-macro-global-fixture.cpp:158: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": with some message Failure occurred in a following context: Context value=something Context value2=something different -xxx/test-macro-global-fixture.cpp:163: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": non sense +xxx/test-macro-global-fixture.cpp:160: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": non sense xxx/test-macro-global-fixture.cpp:279: Leaving test case "bad_foo" xxx/test-macro-global-fixture.cpp:278: Leaving test suite "1 bad test case inside" GlobalFixtureWithSetup dtor xxx/test-macro-global-fixture.cpp:281: Leaving test suite "Fake Test Suite Hierarchy" * 2-format ******************************************************************* -3 is not satisfied [2 <= 3]]]>ZZZZZZZZZZZZZZZ +3 is not satisfied [2 <= 3]]]>ZZZZZZZZZZZZZZZ * 3-format ******************************************************************* - + @@ -2210,7 +2214,7 @@ INFO: @@ -2269,13 +2273,13 @@ CONTEXT: @@ -2308,18 +2312,18 @@ INFO: * 3-format ******************************************************************* - + 3 is not satisfied [2 <= 3] +xxx/test-macro-global-fixture.cpp:147: warning: in "Fake Test Suite Hierarchy no errors": condition 2>3 is not satisfied [2 <= 3] GlobalFixtureWithSetup::setup-calling function done +xxx/test-macro-global-fixture.cpp:289: Test suite "Fake Test Suite Hierarchy no errors/0 test cases inside" is skipped because disabled xxx/test-macro-global-fixture.cpp:295: Entering test case "almost_good_foo" -xxx/test-macro-global-fixture.cpp:150: warning: in "Fake Test Suite Hierarchy no errors/almost_good_foo": condition 2>3 is not satisfied [2 <= 3] +xxx/test-macro-global-fixture.cpp:147: warning: in "Fake Test Suite Hierarchy no errors/almost_good_foo": condition 2>3 is not satisfied [2 <= 3] Test case Fake Test Suite Hierarchy no errors/almost_good_foo did not check any assertions xxx/test-macro-global-fixture.cpp:295: Leaving test case "almost_good_foo" xxx/test-macro-global-fixture.cpp:290: Entering test suite "1 test cases inside" @@ -2441,19 +2446,19 @@ GlobalFixtureWithSetup dtor xxx/test-macro-global-fixture.cpp:293: Leaving test suite "Fake Test Suite Hierarchy no errors" * 2-format ******************************************************************* -3 is not satisfied [2 <= 3]]]>3 is not satisfied [2 <= 3]]]>ZZZZZZ +3 is not satisfied [2 <= 3]]]>3 is not satisfied [2 <= 3]]]>ZZZZZZ * 3-format ******************************************************************* 3 is not satisfied [2 <= 3] MESSAGE: - file : boost.test framework -- line : 212 +- line : 0 - message: Test case Fake Test Suite Hierarchy no errors/almost_good_foo did not check any assertions ]]> @@ -2461,7 +2466,7 @@ MESSAGE: @@ -2483,37 +2488,37 @@ Running 5 test cases... xxx/test-macro-global-fixture.cpp:281: Entering test suite "Fake Test Suite Hierarchy" GlobalFixtureWithSetup ctor GlobalFixtureWithSetup::setup-calling function -xxx/test-macro-global-fixture.cpp:154: error: in "Fake Test Suite Hierarchy": +xxx/test-macro-global-fixture.cpp:151: error: in "Fake Test Suite Hierarchy": this is a message -xxx/test-macro-global-fixture.cpp:157: info: check true has passed -xxx/test-macro-global-fixture.cpp:161: error: in "Fake Test Suite Hierarchy": with some message +xxx/test-macro-global-fixture.cpp:154: info: check true has passed +xxx/test-macro-global-fixture.cpp:158: error: in "Fake Test Suite Hierarchy": with some message Failure occurred in a following context: Context value=something Context value2=something different -xxx/test-macro-global-fixture.cpp:163: error: in "Fake Test Suite Hierarchy": non sense +xxx/test-macro-global-fixture.cpp:160: error: in "Fake Test Suite Hierarchy": non sense GlobalFixtureWithSetup::setup-calling function done xxx/test-macro-global-fixture.cpp:282: Entering test case "bad_foo" -xxx/test-macro-global-fixture.cpp:154: error: in "Fake Test Suite Hierarchy/bad_foo": +xxx/test-macro-global-fixture.cpp:151: error: in "Fake Test Suite Hierarchy/bad_foo": this is a message -xxx/test-macro-global-fixture.cpp:157: info: check true has passed -xxx/test-macro-global-fixture.cpp:161: error: in "Fake Test Suite Hierarchy/bad_foo": with some message +xxx/test-macro-global-fixture.cpp:154: info: check true has passed +xxx/test-macro-global-fixture.cpp:158: error: in "Fake Test Suite Hierarchy/bad_foo": with some message Failure occurred in a following context: Context value=something Context value2=something different -xxx/test-macro-global-fixture.cpp:163: error: in "Fake Test Suite Hierarchy/bad_foo": non sense +xxx/test-macro-global-fixture.cpp:160: error: in "Fake Test Suite Hierarchy/bad_foo": non sense xxx/test-macro-global-fixture.cpp:282: Leaving test case "bad_foo" xxx/test-macro-global-fixture.cpp:283: Entering test case "very_bad_foo" -xxx/test-macro-global-fixture.cpp:168: fatal error: in "Fake Test Suite Hierarchy/very_bad_foo": very_bad_foo is fatal +xxx/test-macro-global-fixture.cpp:165: fatal error: in "Fake Test Suite Hierarchy/very_bad_foo": very_bad_foo is fatal Failure occurred in a following context: some context xxx/test-macro-global-fixture.cpp:283: Leaving test case "very_bad_foo" xxx/test-macro-global-fixture.cpp:284: Entering test case "very_bad_exception" -xxx/test-macro-global-fixture.cpp:177: error: in "Fake Test Suite Hierarchy/very_bad_exception": with some message +xxx/test-macro-global-fixture.cpp:174: error: in "Fake Test Suite Hierarchy/very_bad_exception": with some message Failure occurred in a following context: Context value=something Context value2=something different unknown location:0: fatal error: in "Fake Test Suite Hierarchy/very_bad_exception": unknown type -xxx/test-macro-global-fixture.cpp:177: last checkpoint +xxx/test-macro-global-fixture.cpp:174: last checkpoint Failure occurred in a following context: exception context should be shown xxx/test-macro-global-fixture.cpp:284: Leaving test case "very_bad_exception" @@ -2524,35 +2529,35 @@ xxx/test-macro-global-fixture.cpp:276: Leaving test case "good_foo" xxx/test-macro-global-fixture.cpp:275: Leaving test suite "1 test cases inside" xxx/test-macro-global-fixture.cpp:278: Entering test suite "1 bad test case inside" xxx/test-macro-global-fixture.cpp:279: Entering test case "bad_foo" -xxx/test-macro-global-fixture.cpp:154: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": +xxx/test-macro-global-fixture.cpp:151: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": this is a message -xxx/test-macro-global-fixture.cpp:157: info: check true has passed -xxx/test-macro-global-fixture.cpp:161: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": with some message +xxx/test-macro-global-fixture.cpp:154: info: check true has passed +xxx/test-macro-global-fixture.cpp:158: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": with some message Failure occurred in a following context: Context value=something Context value2=something different -xxx/test-macro-global-fixture.cpp:163: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": non sense +xxx/test-macro-global-fixture.cpp:160: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": non sense xxx/test-macro-global-fixture.cpp:279: Leaving test case "bad_foo" xxx/test-macro-global-fixture.cpp:278: Leaving test suite "1 bad test case inside" GlobalFixtureWithSetup dtor xxx/test-macro-global-fixture.cpp:281: Leaving test suite "Fake Test Suite Hierarchy" * 2-format ******************************************************************* -ZZZZZZZZZZZZZZZ +ZZZZZZZZZZZZZZZ * 3-format ******************************************************************* - + @@ -2644,7 +2649,7 @@ INFO: @@ -2703,13 +2708,13 @@ CONTEXT: @@ -2742,18 +2747,18 @@ INFO: * 3-format ******************************************************************* - + 3 is not satisfied [2 <= 3] +xxx/test-macro-global-fixture.cpp:147: warning: in "Fake Test Suite Hierarchy no errors/almost_good_foo": condition 2>3 is not satisfied [2 <= 3] Test case Fake Test Suite Hierarchy no errors/almost_good_foo did not check any assertions xxx/test-macro-global-fixture.cpp:295: Leaving test case "almost_good_foo" xxx/test-macro-global-fixture.cpp:290: Entering test suite "1 test cases inside" @@ -2909,7 +2915,7 @@ GlobalFixtureWithSetup dtor xxx/test-macro-global-fixture.cpp:293: Leaving test suite "Fake Test Suite Hierarchy no errors" * 2-format ******************************************************************* -3 is not satisfied [2 <= 3]]]>ZZZZZZ +3 is not satisfied [2 <= 3]]]>ZZZZZZ * 3-format ******************************************************************* @@ -2917,13 +2923,13 @@ xxx/test-macro-global-fixture.cpp:293: Leaving test suite "Fake Test Suite Hiera 3 is not satisfied [2 <= 3] MESSAGE: - file : boost.test framework -- line : 212 +- line : 0 - message: Test case Fake Test Suite Hierarchy no errors/almost_good_foo did not check any assertions ]]> @@ -2987,7 +2993,7 @@ MESSAGE: @@ -3000,13 +3006,13 @@ MESSAGE: + * 3-format ******************************************************************* @@ -3051,7 +3057,7 @@ xxx/test-macro-global-fixture.cpp:281: Leaving test suite "Fake Test Suite Hiera + * 3-format ******************************************************************* @@ -3180,7 +3186,7 @@ xxx/test-macro-global-fixture.cpp:293: Leaving test suite "Fake Test Suite Hiera + * 3-format ******************************************************************* @@ -3279,7 +3285,7 @@ xxx/test-macro-global-fixture.cpp:281: Leaving test suite "Fake Test Suite Hiera + * 3-format ******************************************************************* @@ -3451,7 +3457,7 @@ xxx/test-macro-global-fixture.cpp:293: Leaving test suite "Fake Test Suite Hiera ZZZZZZZZZZZZZZZ +ZZZZZZZZZZZZZZZ * 3-format ******************************************************************* - + @@ -3663,7 +3669,7 @@ INFO: @@ -3722,13 +3728,13 @@ CONTEXT: @@ -3761,18 +3767,18 @@ INFO: * 3-format ******************************************************************* - + 3 is not satisfied [2 <= 3] +xxx/test-macro-global-fixture.cpp:147: warning: in "Fake Test Suite Hierarchy no errors/almost_good_foo": condition 2>3 is not satisfied [2 <= 3] Test case Fake Test Suite Hierarchy no errors/almost_good_foo did not check any assertions xxx/test-macro-global-fixture.cpp:295: Leaving test case "almost_good_foo" xxx/test-macro-global-fixture.cpp:290: Entering test suite "1 test cases inside" @@ -3893,19 +3900,19 @@ GlobalFixtureWithTeardown dtor xxx/test-macro-global-fixture.cpp:293: Leaving test suite "Fake Test Suite Hierarchy no errors" * 2-format ******************************************************************* -3 is not satisfied [2 <= 3]]]>ZZZZZZ +3 is not satisfied [2 <= 3]]]>ZZZZZZ * 3-format ******************************************************************* 3 is not satisfied [2 <= 3] MESSAGE: - file : boost.test framework -- line : 212 +- line : 0 - message: Test case Fake Test Suite Hierarchy no errors/almost_good_foo did not check any assertions ]]> @@ -3913,7 +3920,7 @@ MESSAGE: @@ -3935,27 +3942,27 @@ Running 5 test cases... xxx/test-macro-global-fixture.cpp:281: Entering test suite "Fake Test Suite Hierarchy" GlobalFixtureWithTeardown ctor xxx/test-macro-global-fixture.cpp:282: Entering test case "bad_foo" -xxx/test-macro-global-fixture.cpp:154: error: in "Fake Test Suite Hierarchy/bad_foo": +xxx/test-macro-global-fixture.cpp:151: error: in "Fake Test Suite Hierarchy/bad_foo": this is a message -xxx/test-macro-global-fixture.cpp:157: info: check true has passed -xxx/test-macro-global-fixture.cpp:161: error: in "Fake Test Suite Hierarchy/bad_foo": with some message +xxx/test-macro-global-fixture.cpp:154: info: check true has passed +xxx/test-macro-global-fixture.cpp:158: error: in "Fake Test Suite Hierarchy/bad_foo": with some message Failure occurred in a following context: Context value=something Context value2=something different -xxx/test-macro-global-fixture.cpp:163: error: in "Fake Test Suite Hierarchy/bad_foo": non sense +xxx/test-macro-global-fixture.cpp:160: error: in "Fake Test Suite Hierarchy/bad_foo": non sense xxx/test-macro-global-fixture.cpp:282: Leaving test case "bad_foo" xxx/test-macro-global-fixture.cpp:283: Entering test case "very_bad_foo" -xxx/test-macro-global-fixture.cpp:168: fatal error: in "Fake Test Suite Hierarchy/very_bad_foo": very_bad_foo is fatal +xxx/test-macro-global-fixture.cpp:165: fatal error: in "Fake Test Suite Hierarchy/very_bad_foo": very_bad_foo is fatal Failure occurred in a following context: some context xxx/test-macro-global-fixture.cpp:283: Leaving test case "very_bad_foo" xxx/test-macro-global-fixture.cpp:284: Entering test case "very_bad_exception" -xxx/test-macro-global-fixture.cpp:177: error: in "Fake Test Suite Hierarchy/very_bad_exception": with some message +xxx/test-macro-global-fixture.cpp:174: error: in "Fake Test Suite Hierarchy/very_bad_exception": with some message Failure occurred in a following context: Context value=something Context value2=something different unknown location:0: fatal error: in "Fake Test Suite Hierarchy/very_bad_exception": unknown type -xxx/test-macro-global-fixture.cpp:177: last checkpoint +xxx/test-macro-global-fixture.cpp:174: last checkpoint Failure occurred in a following context: exception context should be shown xxx/test-macro-global-fixture.cpp:284: Leaving test case "very_bad_exception" @@ -3966,38 +3973,38 @@ xxx/test-macro-global-fixture.cpp:276: Leaving test case "good_foo" xxx/test-macro-global-fixture.cpp:275: Leaving test suite "1 test cases inside" xxx/test-macro-global-fixture.cpp:278: Entering test suite "1 bad test case inside" xxx/test-macro-global-fixture.cpp:279: Entering test case "bad_foo" -xxx/test-macro-global-fixture.cpp:154: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": +xxx/test-macro-global-fixture.cpp:151: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": this is a message -xxx/test-macro-global-fixture.cpp:157: info: check true has passed -xxx/test-macro-global-fixture.cpp:161: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": with some message +xxx/test-macro-global-fixture.cpp:154: info: check true has passed +xxx/test-macro-global-fixture.cpp:158: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": with some message Failure occurred in a following context: Context value=something Context value2=something different -xxx/test-macro-global-fixture.cpp:163: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": non sense +xxx/test-macro-global-fixture.cpp:160: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": non sense xxx/test-macro-global-fixture.cpp:279: Leaving test case "bad_foo" xxx/test-macro-global-fixture.cpp:278: Leaving test suite "1 bad test case inside" GlobalFixtureWithTeardown::teardown-calling function -xxx/test-macro-global-fixture.cpp:150: warning: in "Fake Test Suite Hierarchy": condition 2>3 is not satisfied [2 <= 3] +xxx/test-macro-global-fixture.cpp:147: warning: in "Fake Test Suite Hierarchy": condition 2>3 is not satisfied [2 <= 3] GlobalFixtureWithTeardown::teardown-calling function done GlobalFixtureWithTeardown dtor xxx/test-macro-global-fixture.cpp:281: Leaving test suite "Fake Test Suite Hierarchy" * 2-format ******************************************************************* -ZZZZZZZZZZZZZZZ3 is not satisfied [2 <= 3]]]> +ZZZZZZZZZZZZZZZ3 is not satisfied [2 <= 3]]]> * 3-format ******************************************************************* - + @@ -4031,7 +4038,7 @@ INFO: @@ -4090,13 +4097,13 @@ CONTEXT: @@ -4129,18 +4136,18 @@ INFO: * 3-format ******************************************************************* - + 3 is not satisfied [2 <= 3] +xxx/test-macro-global-fixture.cpp:147: warning: in "Fake Test Suite Hierarchy no errors/almost_good_foo": condition 2>3 is not satisfied [2 <= 3] Test case Fake Test Suite Hierarchy no errors/almost_good_foo did not check any assertions xxx/test-macro-global-fixture.cpp:295: Leaving test case "almost_good_foo" xxx/test-macro-global-fixture.cpp:290: Entering test suite "1 test cases inside" @@ -4256,25 +4264,25 @@ Test case Fake Test Suite Hierarchy no errors/1 test cases inside/good_foo did n xxx/test-macro-global-fixture.cpp:291: Leaving test case "good_foo" xxx/test-macro-global-fixture.cpp:290: Leaving test suite "1 test cases inside" GlobalFixtureWithTeardown::teardown-calling function -xxx/test-macro-global-fixture.cpp:150: warning: in "Fake Test Suite Hierarchy no errors": condition 2>3 is not satisfied [2 <= 3] +xxx/test-macro-global-fixture.cpp:147: warning: in "Fake Test Suite Hierarchy no errors": condition 2>3 is not satisfied [2 <= 3] GlobalFixtureWithTeardown::teardown-calling function done GlobalFixtureWithTeardown dtor xxx/test-macro-global-fixture.cpp:293: Leaving test suite "Fake Test Suite Hierarchy no errors" * 2-format ******************************************************************* -3 is not satisfied [2 <= 3]]]>ZZZZZZ3 is not satisfied [2 <= 3]]]> +3 is not satisfied [2 <= 3]]]>ZZZZZZ3 is not satisfied [2 <= 3]]]> * 3-format ******************************************************************* 3 is not satisfied [2 <= 3] MESSAGE: - file : boost.test framework -- line : 212 +- line : 0 - message: Test case Fake Test Suite Hierarchy no errors/almost_good_foo did not check any assertions ]]> @@ -4282,7 +4290,7 @@ MESSAGE: @@ -4304,27 +4312,27 @@ Running 5 test cases... xxx/test-macro-global-fixture.cpp:281: Entering test suite "Fake Test Suite Hierarchy" GlobalFixtureWithTeardown ctor xxx/test-macro-global-fixture.cpp:282: Entering test case "bad_foo" -xxx/test-macro-global-fixture.cpp:154: error: in "Fake Test Suite Hierarchy/bad_foo": +xxx/test-macro-global-fixture.cpp:151: error: in "Fake Test Suite Hierarchy/bad_foo": this is a message -xxx/test-macro-global-fixture.cpp:157: info: check true has passed -xxx/test-macro-global-fixture.cpp:161: error: in "Fake Test Suite Hierarchy/bad_foo": with some message +xxx/test-macro-global-fixture.cpp:154: info: check true has passed +xxx/test-macro-global-fixture.cpp:158: error: in "Fake Test Suite Hierarchy/bad_foo": with some message Failure occurred in a following context: Context value=something Context value2=something different -xxx/test-macro-global-fixture.cpp:163: error: in "Fake Test Suite Hierarchy/bad_foo": non sense +xxx/test-macro-global-fixture.cpp:160: error: in "Fake Test Suite Hierarchy/bad_foo": non sense xxx/test-macro-global-fixture.cpp:282: Leaving test case "bad_foo" xxx/test-macro-global-fixture.cpp:283: Entering test case "very_bad_foo" -xxx/test-macro-global-fixture.cpp:168: fatal error: in "Fake Test Suite Hierarchy/very_bad_foo": very_bad_foo is fatal +xxx/test-macro-global-fixture.cpp:165: fatal error: in "Fake Test Suite Hierarchy/very_bad_foo": very_bad_foo is fatal Failure occurred in a following context: some context xxx/test-macro-global-fixture.cpp:283: Leaving test case "very_bad_foo" xxx/test-macro-global-fixture.cpp:284: Entering test case "very_bad_exception" -xxx/test-macro-global-fixture.cpp:177: error: in "Fake Test Suite Hierarchy/very_bad_exception": with some message +xxx/test-macro-global-fixture.cpp:174: error: in "Fake Test Suite Hierarchy/very_bad_exception": with some message Failure occurred in a following context: Context value=something Context value2=something different unknown location:0: fatal error: in "Fake Test Suite Hierarchy/very_bad_exception": unknown type -xxx/test-macro-global-fixture.cpp:177: last checkpoint +xxx/test-macro-global-fixture.cpp:174: last checkpoint Failure occurred in a following context: exception context should be shown xxx/test-macro-global-fixture.cpp:284: Leaving test case "very_bad_exception" @@ -4335,45 +4343,45 @@ xxx/test-macro-global-fixture.cpp:276: Leaving test case "good_foo" xxx/test-macro-global-fixture.cpp:275: Leaving test suite "1 test cases inside" xxx/test-macro-global-fixture.cpp:278: Entering test suite "1 bad test case inside" xxx/test-macro-global-fixture.cpp:279: Entering test case "bad_foo" -xxx/test-macro-global-fixture.cpp:154: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": +xxx/test-macro-global-fixture.cpp:151: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": this is a message -xxx/test-macro-global-fixture.cpp:157: info: check true has passed -xxx/test-macro-global-fixture.cpp:161: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": with some message +xxx/test-macro-global-fixture.cpp:154: info: check true has passed +xxx/test-macro-global-fixture.cpp:158: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": with some message Failure occurred in a following context: Context value=something Context value2=something different -xxx/test-macro-global-fixture.cpp:163: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": non sense +xxx/test-macro-global-fixture.cpp:160: error: in "Fake Test Suite Hierarchy/1 bad test case inside/bad_foo": non sense xxx/test-macro-global-fixture.cpp:279: Leaving test case "bad_foo" xxx/test-macro-global-fixture.cpp:278: Leaving test suite "1 bad test case inside" GlobalFixtureWithTeardown::teardown-calling function -xxx/test-macro-global-fixture.cpp:154: error: in "Fake Test Suite Hierarchy": +xxx/test-macro-global-fixture.cpp:151: error: in "Fake Test Suite Hierarchy": this is a message -xxx/test-macro-global-fixture.cpp:157: info: check true has passed -xxx/test-macro-global-fixture.cpp:161: error: in "Fake Test Suite Hierarchy": with some message +xxx/test-macro-global-fixture.cpp:154: info: check true has passed +xxx/test-macro-global-fixture.cpp:158: error: in "Fake Test Suite Hierarchy": with some message Failure occurred in a following context: Context value=something Context value2=something different -xxx/test-macro-global-fixture.cpp:163: error: in "Fake Test Suite Hierarchy": non sense +xxx/test-macro-global-fixture.cpp:160: error: in "Fake Test Suite Hierarchy": non sense GlobalFixtureWithTeardown::teardown-calling function done GlobalFixtureWithTeardown dtor xxx/test-macro-global-fixture.cpp:281: Leaving test suite "Fake Test Suite Hierarchy" * 2-format ******************************************************************* -ZZZZZZZZZZZZZZZ +ZZZZZZZZZZZZZZZ * 3-format ******************************************************************* - + @@ -4465,7 +4473,7 @@ INFO: @@ -4524,13 +4532,13 @@ CONTEXT: @@ -4563,18 +4571,18 @@ INFO: * 3-format ******************************************************************* - + 3 is not satisfied [2 <= 3] +xxx/test-macro-global-fixture.cpp:147: warning: in "Fake Test Suite Hierarchy no errors/almost_good_foo": condition 2>3 is not satisfied [2 <= 3] Test case Fake Test Suite Hierarchy no errors/almost_good_foo did not check any assertions xxx/test-macro-global-fixture.cpp:295: Leaving test case "almost_good_foo" xxx/test-macro-global-fixture.cpp:290: Entering test suite "1 test cases inside" @@ -4717,20 +4726,20 @@ Test case Fake Test Suite Hierarchy no errors/1 test cases inside/good_foo did n xxx/test-macro-global-fixture.cpp:291: Leaving test case "good_foo" xxx/test-macro-global-fixture.cpp:290: Leaving test suite "1 test cases inside" GlobalFixtureWithTeardown::teardown-calling function -xxx/test-macro-global-fixture.cpp:154: error: in "Fake Test Suite Hierarchy no errors": +xxx/test-macro-global-fixture.cpp:151: error: in "Fake Test Suite Hierarchy no errors": this is a message -xxx/test-macro-global-fixture.cpp:157: info: check true has passed -xxx/test-macro-global-fixture.cpp:161: error: in "Fake Test Suite Hierarchy no errors": with some message +xxx/test-macro-global-fixture.cpp:154: info: check true has passed +xxx/test-macro-global-fixture.cpp:158: error: in "Fake Test Suite Hierarchy no errors": with some message Failure occurred in a following context: Context value=something Context value2=something different -xxx/test-macro-global-fixture.cpp:163: error: in "Fake Test Suite Hierarchy no errors": non sense +xxx/test-macro-global-fixture.cpp:160: error: in "Fake Test Suite Hierarchy no errors": non sense GlobalFixtureWithTeardown::teardown-calling function done GlobalFixtureWithTeardown dtor xxx/test-macro-global-fixture.cpp:293: Leaving test suite "Fake Test Suite Hierarchy no errors" * 2-format ******************************************************************* -3 is not satisfied [2 <= 3]]]>ZZZZZZ +3 is not satisfied [2 <= 3]]]>ZZZZZZ * 3-format ******************************************************************* @@ -4738,13 +4747,13 @@ xxx/test-macro-global-fixture.cpp:293: Leaving test suite "Fake Test Suite Hiera 3 is not satisfied [2 <= 3] MESSAGE: - file : boost.test framework -- line : 212 +- line : 0 - message: Test case Fake Test Suite Hierarchy no errors/almost_good_foo did not check any assertions ]]> @@ -4808,7 +4817,7 @@ MESSAGE: @@ -4821,13 +4830,13 @@ MESSAGE: ZZZZZZZZZZZZZZZ +ZZZZZZZZZZZZZZZ * 3-format ******************************************************************* - + @@ -4978,7 +4987,7 @@ INFO: @@ -5037,13 +5046,13 @@ CONTEXT: @@ -5076,12 +5085,12 @@ INFO: * 3-format ******************************************************************* - + 3 is not satisfied [2 <= 3] +xxx/test-macro-global-fixture.cpp:147: warning: in "Fake Test Suite Hierarchy no errors/almost_good_foo": condition 2>3 is not satisfied [2 <= 3] Test case Fake Test Suite Hierarchy no errors/almost_good_foo did not check any assertions xxx/test-macro-global-fixture.cpp:295: Leaving test case "almost_good_foo" xxx/test-macro-global-fixture.cpp:290: Entering test suite "1 test cases inside" @@ -5217,13 +5227,13 @@ Test case Fake Test Suite Hierarchy no errors/1 test cases inside/good_foo did n xxx/test-macro-global-fixture.cpp:291: Leaving test case "good_foo" xxx/test-macro-global-fixture.cpp:290: Leaving test suite "1 test cases inside" GlobalFixtureWithTeardown::teardown-calling function -xxx/test-macro-global-fixture.cpp:168: fatal error: in "Fake Test Suite Hierarchy no errors": very_bad_foo is fatal +xxx/test-macro-global-fixture.cpp:165: fatal error: in "Fake Test Suite Hierarchy no errors": very_bad_foo is fatal Failure occurred in a following context: some context xxx/test-macro-global-fixture.cpp:293: Leaving test suite "Fake Test Suite Hierarchy no errors" * 2-format ******************************************************************* -3 is not satisfied [2 <= 3]]]>ZZZZZZ +3 is not satisfied [2 <= 3]]]>ZZZZZZ * 3-format ******************************************************************* @@ -5231,7 +5241,7 @@ xxx/test-macro-global-fixture.cpp:293: Leaving test suite "Fake Test Suite Hiera 3 is not satisfied [2 <= 3] MESSAGE: - file : boost.test framework -- line : 212 +- line : 0 - message: Test case Fake Test Suite Hierarchy no errors/almost_good_foo did not check any assertions ]]> @@ -5268,7 +5278,7 @@ MESSAGE: @@ -5281,7 +5291,7 @@ MESSAGE: ZZZZZZZZZZZZZZZ +ZZZZZZZZZZZZZZZ * 3-format ******************************************************************* - + @@ -5449,7 +5459,7 @@ INFO: @@ -5508,13 +5518,13 @@ CONTEXT: @@ -5547,12 +5557,12 @@ INFO: * 3-format ******************************************************************* - + 3 is not satisfied [2 <= 3] +xxx/test-macro-global-fixture.cpp:147: warning: in "Fake Test Suite Hierarchy no errors/almost_good_foo": condition 2>3 is not satisfied [2 <= 3] Test case Fake Test Suite Hierarchy no errors/almost_good_foo did not check any assertions xxx/test-macro-global-fixture.cpp:295: Leaving test case "almost_good_foo" xxx/test-macro-global-fixture.cpp:290: Entering test suite "1 test cases inside" @@ -5707,18 +5718,18 @@ Test case Fake Test Suite Hierarchy no errors/1 test cases inside/good_foo did n xxx/test-macro-global-fixture.cpp:291: Leaving test case "good_foo" xxx/test-macro-global-fixture.cpp:290: Leaving test suite "1 test cases inside" GlobalFixtureWithTeardown::teardown-calling function -xxx/test-macro-global-fixture.cpp:177: error: in "Fake Test Suite Hierarchy no errors": with some message +xxx/test-macro-global-fixture.cpp:174: error: in "Fake Test Suite Hierarchy no errors": with some message Failure occurred in a following context: Context value=something Context value2=something different unknown location:0: fatal error: in "Fake Test Suite Hierarchy no errors": unknown type -xxx/test-macro-global-fixture.cpp:177: last checkpoint +xxx/test-macro-global-fixture.cpp:174: last checkpoint Failure occurred in a following context: exception context should be shown xxx/test-macro-global-fixture.cpp:293: Leaving test suite "Fake Test Suite Hierarchy no errors" * 2-format ******************************************************************* -3 is not satisfied [2 <= 3]]]>ZZZZZZ +3 is not satisfied [2 <= 3]]]>ZZZZZZ * 3-format ******************************************************************* @@ -5726,7 +5737,7 @@ xxx/test-macro-global-fixture.cpp:293: Leaving test suite "Fake Test Suite Hiera 3 is not satisfied [2 <= 3] MESSAGE: - file : boost.test framework -- line : 212 +- line : 0 - message: Test case Fake Test Suite Hierarchy no errors/almost_good_foo did not check any assertions ]]> @@ -5782,7 +5793,7 @@ MESSAGE: @@ -5795,7 +5806,7 @@ MESSAGE: ZZZ +ZZZ * 3-format ******************************************************************* @@ -54,18 +54,18 @@ xxx/log-count-skipped-test.cpp:146: Leaving test suite "fake master test suite" * 1-format ******************************************************************* Running 2 test cases... -xxx/log-count-skipped-test.cpp:146: Entering test suite "fake master test suite" -xxx/log-count-skipped-test.cpp:133: Entering test case "test_1" +xxx/log-count-skipped-test.cpp:143: Entering test suite "fake master test suite" +xxx/log-count-skipped-test.cpp:130: Entering test case "test_1" xxx/log-count-skipped-test.cpp:47: info: check 2 + 2 == 4 has passed -xxx/log-count-skipped-test.cpp:133: Leaving test case "test_1" -xxx/log-count-skipped-test.cpp:134: Entering test case "test_2" +xxx/log-count-skipped-test.cpp:130: Leaving test case "test_1" +xxx/log-count-skipped-test.cpp:131: Entering test case "test_2" xxx/log-count-skipped-test.cpp:52: error: in "fake master test suite/test_2": check 0 == 1 has failed [0 != 1] -xxx/log-count-skipped-test.cpp:134: Leaving test case "test_2" -xxx/log-count-skipped-test.cpp:135: Test case "fake master test suite/test_3" is skipped because disabled -xxx/log-count-skipped-test.cpp:146: Leaving test suite "fake master test suite" +xxx/log-count-skipped-test.cpp:131: Leaving test case "test_2" +xxx/log-count-skipped-test.cpp:132: Test case "fake master test suite/test_3" is skipped because disabled +xxx/log-count-skipped-test.cpp:143: Leaving test suite "fake master test suite" * 2-format ******************************************************************* -ZZZZZZ +ZZZZZZ * 3-format ******************************************************************* @@ -87,7 +87,7 @@ ASSERTION FAILURE: ]]> @@ -112,7 +112,7 @@ ASSERTION FAILURE: ]]> @@ -124,18 +124,18 @@ ASSERTION FAILURE: * 1-format ******************************************************************* Running 3 test cases... -xxx/log-count-skipped-test.cpp:159: Entering test suite "fake master test suite2" -xxx/log-count-skipped-test.cpp:133: Entering test case "test_1" +xxx/log-count-skipped-test.cpp:156: Entering test suite "fake master test suite2" +xxx/log-count-skipped-test.cpp:130: Entering test case "test_1" xxx/log-count-skipped-test.cpp:47: info: check 2 + 2 == 4 has passed -xxx/log-count-skipped-test.cpp:133: Leaving test case "test_1" -xxx/log-count-skipped-test.cpp:134: Test case "fake master test suite2/test_2" is skipped because precondition failed: test is skipped because -some precondition- -xxx/log-count-skipped-test.cpp:135: Test case "fake master test suite2/test_3" is skipped because disabled -xxx/log-count-skipped-test.cpp:165: Test suite "fake master test suite2/child1" is skipped because disabled -xxx/log-count-skipped-test.cpp:170: Test suite "fake master test suite2/child2" is skipped because precondition failed: test is skipped because -some precondition- -xxx/log-count-skipped-test.cpp:159: Leaving test suite "fake master test suite2" +xxx/log-count-skipped-test.cpp:130: Leaving test case "test_1" +xxx/log-count-skipped-test.cpp:131: Test case "fake master test suite2/test_2" is skipped because precondition failed: test is skipped because -some precondition- +xxx/log-count-skipped-test.cpp:132: Test case "fake master test suite2/test_3" is skipped because disabled +xxx/log-count-skipped-test.cpp:162: Test suite "fake master test suite2/child1" is skipped because disabled +xxx/log-count-skipped-test.cpp:167: Test suite "fake master test suite2/child2" is skipped because precondition failed: test is skipped because -some precondition- +xxx/log-count-skipped-test.cpp:156: Leaving test suite "fake master test suite2" * 2-format ******************************************************************* -ZZZ +ZZZ * 3-format ******************************************************************* @@ -236,25 +236,25 @@ xxx/log-count-skipped-test.cpp:159: Leaving test suite "fake master test suite2" * 1-format ******************************************************************* Running 3 test cases... -xxx/log-count-skipped-test.cpp:159: Entering test suite "fake master test suite2" -xxx/log-count-skipped-test.cpp:133: Entering test case "test_1" +xxx/log-count-skipped-test.cpp:156: Entering test suite "fake master test suite2" +xxx/log-count-skipped-test.cpp:130: Entering test case "test_1" xxx/log-count-skipped-test.cpp:47: info: check 2 + 2 == 4 has passed -xxx/log-count-skipped-test.cpp:133: Leaving test case "test_1" -xxx/log-count-skipped-test.cpp:134: Entering test case "test_2" +xxx/log-count-skipped-test.cpp:130: Leaving test case "test_1" +xxx/log-count-skipped-test.cpp:131: Entering test case "test_2" xxx/log-count-skipped-test.cpp:52: error: in "fake master test suite2/test_2": check 0 == 1 has failed [0 != 1] -xxx/log-count-skipped-test.cpp:134: Leaving test case "test_2" -xxx/log-count-skipped-test.cpp:135: Test case "fake master test suite2/test_3" is skipped because disabled -xxx/log-count-skipped-test.cpp:165: Test suite "fake master test suite2/child1" is skipped because disabled -xxx/log-count-skipped-test.cpp:170: Entering test suite "child2" -xxx/log-count-skipped-test.cpp:169: Test case "fake master test suite2/child2/test_1" is skipped because disabled -xxx/log-count-skipped-test.cpp:172: Entering test case "t2" +xxx/log-count-skipped-test.cpp:131: Leaving test case "test_2" +xxx/log-count-skipped-test.cpp:132: Test case "fake master test suite2/test_3" is skipped because disabled +xxx/log-count-skipped-test.cpp:162: Test suite "fake master test suite2/child1" is skipped because disabled +xxx/log-count-skipped-test.cpp:167: Entering test suite "child2" +xxx/log-count-skipped-test.cpp:166: Test case "fake master test suite2/child2/test_1" is skipped because disabled +xxx/log-count-skipped-test.cpp:169: Entering test case "t2" xxx/log-count-skipped-test.cpp:47: info: check 2 + 2 == 4 has passed -xxx/log-count-skipped-test.cpp:172: Leaving test case "t2" -xxx/log-count-skipped-test.cpp:170: Leaving test suite "child2" -xxx/log-count-skipped-test.cpp:159: Leaving test suite "fake master test suite2" +xxx/log-count-skipped-test.cpp:169: Leaving test case "t2" +xxx/log-count-skipped-test.cpp:167: Leaving test suite "child2" +xxx/log-count-skipped-test.cpp:156: Leaving test suite "fake master test suite2" * 2-format ******************************************************************* -ZZZZZZZZZ +ZZZZZZZZZ * 3-format ******************************************************************* @@ -276,7 +276,7 @@ ASSERTION FAILURE: ]]> @@ -329,7 +329,7 @@ ASSERTION FAILURE: ]]> diff --git a/test/baseline-outputs/log-formatter-test.pattern b/test/baseline-outputs/log-formatter-test.pattern index 0cbe5ab1..14791083 100644 --- a/test/baseline-outputs/log-formatter-test.pattern +++ b/test/baseline-outputs/log-formatter-test.pattern @@ -1,13 +1,13 @@ * 1-format ******************************************************************* Running 1 test case... -xxx/log-formatter-test.cpp:209: Entering test suite "1 test cases inside" -xxx/log-formatter-test.cpp:210: Entering test case "good_foo" +xxx/log-formatter-test.cpp:159: Entering test suite "1 test cases inside" +xxx/log-formatter-test.cpp:160: Entering test case "good_foo" Test case Fake Test Suite Hierarchy/1 test cases inside/good_foo did not check any assertions -xxx/log-formatter-test.cpp:210: Leaving test case "good_foo" -xxx/log-formatter-test.cpp:209: Leaving test suite "1 test cases inside" +xxx/log-formatter-test.cpp:160: Leaving test case "good_foo" +xxx/log-formatter-test.cpp:159: Leaving test suite "1 test cases inside" * 2-format ******************************************************************* -ZZZ +ZZZ * 3-format ******************************************************************* @@ -28,8 +28,8 @@ xxx/log-formatter-test.cpp:209: Leaving test suite "1 test cases inside" * 1-format ******************************************************************* Running 1 test case... -xxx/log-formatter-test.cpp:212: Entering test suite "1 bad test case inside" -xxx/log-formatter-test.cpp:213: Entering test case "bad_foo" +xxx/log-formatter-test.cpp:162: Entering test suite "1 bad test case inside" +xxx/log-formatter-test.cpp:163: Entering test case "bad_foo" xxx/log-formatter-test.cpp:50: error: in "1 bad test case inside/bad_foo": this is a message xxx/log-formatter-test.cpp:53: info: check true has passed @@ -38,11 +38,11 @@ Failure occurred in a following context: Context value=something Context value2=something different xxx/log-formatter-test.cpp:59: error: in "1 bad test case inside/bad_foo": non sense -xxx/log-formatter-test.cpp:213: Leaving test case "bad_foo" -xxx/log-formatter-test.cpp:212: Leaving test suite "1 bad test case inside" +xxx/log-formatter-test.cpp:163: Leaving test case "bad_foo" +xxx/log-formatter-test.cpp:162: Leaving test suite "1 bad test case inside" * 2-format ******************************************************************* -ZZZ +ZZZ * 3-format ******************************************************************* @@ -83,7 +83,7 @@ INFO: @@ -116,21 +116,21 @@ ASSERTION FAILURE: ]]> * 1-format ******************************************************************* Running 1 test case... -xxx/log-formatter-test.cpp:215: Entering test suite "1 almost good test case inside" -xxx/log-formatter-test.cpp:216: Entering test case "almost_good_foo" +xxx/log-formatter-test.cpp:165: Entering test suite "1 almost good test case inside" +xxx/log-formatter-test.cpp:166: Entering test case "almost_good_foo" xxx/log-formatter-test.cpp:46: warning: in "1 almost good test case inside/almost_good_foo": condition 2>3 is not satisfied [2 <= 3] Test case 1 almost good test case inside/almost_good_foo did not check any assertions -xxx/log-formatter-test.cpp:216: Leaving test case "almost_good_foo" -xxx/log-formatter-test.cpp:215: Leaving test suite "1 almost good test case inside" +xxx/log-formatter-test.cpp:166: Leaving test case "almost_good_foo" +xxx/log-formatter-test.cpp:165: Leaving test suite "1 almost good test case inside" * 2-format ******************************************************************* -3 is not satisfied [2 <= 3]]]>ZZZ +3 is not satisfied [2 <= 3]]]>ZZZ * 3-format ******************************************************************* @@ -156,11 +156,11 @@ MESSAGE: * 1-format ******************************************************************* Running 2 test cases... -xxx/log-formatter-test.cpp:218: Entering test suite "2 test cases inside" -xxx/log-formatter-test.cpp:219: Entering test case "good_foo" +xxx/log-formatter-test.cpp:168: Entering test suite "2 test cases inside" +xxx/log-formatter-test.cpp:169: Entering test case "good_foo" Test case Fake Test Suite Hierarchy/2 test cases inside/good_foo did not check any assertions -xxx/log-formatter-test.cpp:219: Leaving test case "good_foo" -xxx/log-formatter-test.cpp:220: Entering test case "bad_foo" +xxx/log-formatter-test.cpp:169: Leaving test case "good_foo" +xxx/log-formatter-test.cpp:170: Entering test case "bad_foo" xxx/log-formatter-test.cpp:50: error: in "Fake Test Suite Hierarchy/2 test cases inside/bad_foo": this is a message xxx/log-formatter-test.cpp:53: info: check true has passed @@ -169,11 +169,11 @@ Failure occurred in a following context: Context value=something Context value2=something different xxx/log-formatter-test.cpp:59: error: in "Fake Test Suite Hierarchy/2 test cases inside/bad_foo": non sense -xxx/log-formatter-test.cpp:220: Leaving test case "bad_foo" -xxx/log-formatter-test.cpp:218: Leaving test suite "2 test cases inside" +xxx/log-formatter-test.cpp:170: Leaving test case "bad_foo" +xxx/log-formatter-test.cpp:168: Leaving test suite "2 test cases inside" * 2-format ******************************************************************* -ZZZZZZ +ZZZZZZ * 3-format ******************************************************************* @@ -222,7 +222,7 @@ INFO: @@ -257,14 +257,14 @@ ASSERTION FAILURE: ]]> * 1-format ******************************************************************* Running 3 test cases... -xxx/log-formatter-test.cpp:222: Entering test suite "3 test cases inside" -xxx/log-formatter-test.cpp:223: Entering test case "bad_foo" +xxx/log-formatter-test.cpp:172: Entering test suite "3 test cases inside" +xxx/log-formatter-test.cpp:173: Entering test case "bad_foo" xxx/log-formatter-test.cpp:50: error: in "Fake Test Suite Hierarchy/3 test cases inside/bad_foo": this is a message xxx/log-formatter-test.cpp:53: info: check true has passed @@ -273,17 +273,17 @@ Failure occurred in a following context: Context value=something Context value2=something different xxx/log-formatter-test.cpp:59: error: in "Fake Test Suite Hierarchy/3 test cases inside/bad_foo": non sense -xxx/log-formatter-test.cpp:223: Leaving test case "bad_foo" -xxx/log-formatter-test.cpp:224: Entering test case "very_bad_foo" +xxx/log-formatter-test.cpp:173: Leaving test case "bad_foo" +xxx/log-formatter-test.cpp:174: Entering test case "very_bad_foo" xxx/log-formatter-test.cpp:64: fatal error: in "Fake Test Suite Hierarchy/3 test cases inside/very_bad_foo": very_bad_foo is fatal Failure occurred in a following context: some context -xxx/log-formatter-test.cpp:224: Leaving test case "very_bad_foo" -xxx/log-formatter-test.cpp:226: Test case "Fake Test Suite Hierarchy/3 test cases inside/bad_foo2" is skipped because dependency test case "Fake Test Suite Hierarchy/3 test cases inside/very_bad_foo" has failed -xxx/log-formatter-test.cpp:222: Leaving test suite "3 test cases inside" +xxx/log-formatter-test.cpp:174: Leaving test case "very_bad_foo" +xxx/log-formatter-test.cpp:176: Test case "Fake Test Suite Hierarchy/3 test cases inside/bad_foo2" is skipped because dependency test case "Fake Test Suite Hierarchy/3 test cases inside/very_bad_foo" has failed +xxx/log-formatter-test.cpp:172: Leaving test suite "3 test cases inside" * 2-format ******************************************************************* -ZZZZZZ +ZZZZZZ * 3-format ******************************************************************* @@ -324,7 +324,7 @@ INFO: @@ -340,7 +340,7 @@ ASSERTION FAILURE: ]]> @@ -379,7 +379,7 @@ ASSERTION FAILURE: ]]> @@ -395,7 +395,7 @@ ASSERTION FAILURE: ]]> @@ -407,8 +407,8 @@ ASSERTION FAILURE: * 1-format ******************************************************************* Running 4 test cases... -xxx/log-formatter-test.cpp:230: Entering test suite "4 test cases inside" -xxx/log-formatter-test.cpp:231: Entering test case "bad_foo" +xxx/log-formatter-test.cpp:180: Entering test suite "4 test cases inside" +xxx/log-formatter-test.cpp:181: Entering test case "bad_foo" xxx/log-formatter-test.cpp:50: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo": this is a message xxx/log-formatter-test.cpp:53: info: check true has passed @@ -417,13 +417,13 @@ Failure occurred in a following context: Context value=something Context value2=something different xxx/log-formatter-test.cpp:59: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo": non sense -xxx/log-formatter-test.cpp:231: Leaving test case "bad_foo" -xxx/log-formatter-test.cpp:232: Entering test case "very_bad_foo" +xxx/log-formatter-test.cpp:181: Leaving test case "bad_foo" +xxx/log-formatter-test.cpp:182: Entering test case "very_bad_foo" xxx/log-formatter-test.cpp:64: fatal error: in "Fake Test Suite Hierarchy/4 test cases inside/very_bad_foo": very_bad_foo is fatal Failure occurred in a following context: some context -xxx/log-formatter-test.cpp:232: Leaving test case "very_bad_foo" -xxx/log-formatter-test.cpp:233: Entering test case "very_bad_exception" +xxx/log-formatter-test.cpp:182: Leaving test case "very_bad_foo" +xxx/log-formatter-test.cpp:183: Entering test case "very_bad_exception" xxx/log-formatter-test.cpp:73: error: in "Fake Test Suite Hierarchy/4 test cases inside/very_bad_exception": with some message Failure occurred in a following context: Context value=something @@ -432,8 +432,8 @@ unknown location:0: fatal error: in "Fake Test Suite Hierarchy/4 test cases insi xxx/log-formatter-test.cpp:73: last checkpoint Failure occurred in a following context: exception context should be shown -xxx/log-formatter-test.cpp:233: Leaving test case "very_bad_exception" -xxx/log-formatter-test.cpp:234: Entering test case "bad_foo2" +xxx/log-formatter-test.cpp:183: Leaving test case "very_bad_exception" +xxx/log-formatter-test.cpp:184: Entering test case "bad_foo2" xxx/log-formatter-test.cpp:50: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo2": this is a message xxx/log-formatter-test.cpp:53: info: check true has passed @@ -442,11 +442,11 @@ Failure occurred in a following context: Context value=something Context value2=something different xxx/log-formatter-test.cpp:59: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo2": non sense -xxx/log-formatter-test.cpp:234: Leaving test case "bad_foo2" -xxx/log-formatter-test.cpp:230: Leaving test suite "4 test cases inside" +xxx/log-formatter-test.cpp:184: Leaving test case "bad_foo2" +xxx/log-formatter-test.cpp:180: Leaving test suite "4 test cases inside" * 2-format ******************************************************************* -ZZZZZZZZZZZZ +ZZZZZZZZZZZZ * 3-format ******************************************************************* @@ -487,7 +487,7 @@ INFO: @@ -503,7 +503,7 @@ ASSERTION FAILURE: ]]> @@ -538,7 +538,7 @@ CONTEXT: ]]> @@ -578,7 +578,7 @@ INFO: @@ -611,7 +611,7 @@ ASSERTION FAILURE: ]]> @@ -627,7 +627,7 @@ ASSERTION FAILURE: ]]> @@ -662,7 +662,7 @@ CONTEXT: ]]> @@ -691,19 +691,19 @@ ASSERTION FAILURE: ]]> * 1-format ******************************************************************* Running 11 test cases... -xxx/log-formatter-test.cpp:236: Entering test suite "Fake Test Suite Hierarchy" -xxx/log-formatter-test.cpp:207: Test suite "Fake Test Suite Hierarchy/0 test cases inside" is skipped because disabled -xxx/log-formatter-test.cpp:209: Entering test suite "1 test cases inside" -xxx/log-formatter-test.cpp:210: Entering test case "good_foo" +xxx/log-formatter-test.cpp:186: Entering test suite "Fake Test Suite Hierarchy" +xxx/log-formatter-test.cpp:157: Test suite "Fake Test Suite Hierarchy/0 test cases inside" is skipped because disabled +xxx/log-formatter-test.cpp:159: Entering test suite "1 test cases inside" +xxx/log-formatter-test.cpp:160: Entering test case "good_foo" Test case Fake Test Suite Hierarchy/1 test cases inside/good_foo did not check any assertions -xxx/log-formatter-test.cpp:210: Leaving test case "good_foo" -xxx/log-formatter-test.cpp:269: Entering test case "bad_foo" +xxx/log-formatter-test.cpp:160: Leaving test case "good_foo" +xxx/log-formatter-test.cpp:219: Entering test case "bad_foo" xxx/log-formatter-test.cpp:50: error: in "Fake Test Suite Hierarchy/1 test cases inside/bad_foo": this is a message xxx/log-formatter-test.cpp:53: info: check true has passed @@ -712,13 +712,13 @@ Failure occurred in a following context: Context value=something Context value2=something different xxx/log-formatter-test.cpp:59: error: in "Fake Test Suite Hierarchy/1 test cases inside/bad_foo": non sense -xxx/log-formatter-test.cpp:269: Leaving test case "bad_foo" -xxx/log-formatter-test.cpp:209: Leaving test suite "1 test cases inside" -xxx/log-formatter-test.cpp:218: Entering test suite "2 test cases inside" -xxx/log-formatter-test.cpp:219: Entering test case "good_foo" +xxx/log-formatter-test.cpp:219: Leaving test case "bad_foo" +xxx/log-formatter-test.cpp:159: Leaving test suite "1 test cases inside" +xxx/log-formatter-test.cpp:168: Entering test suite "2 test cases inside" +xxx/log-formatter-test.cpp:169: Entering test case "good_foo" Test case Fake Test Suite Hierarchy/2 test cases inside/good_foo did not check any assertions -xxx/log-formatter-test.cpp:219: Leaving test case "good_foo" -xxx/log-formatter-test.cpp:220: Entering test case "bad_foo" +xxx/log-formatter-test.cpp:169: Leaving test case "good_foo" +xxx/log-formatter-test.cpp:170: Entering test case "bad_foo" xxx/log-formatter-test.cpp:50: error: in "Fake Test Suite Hierarchy/2 test cases inside/bad_foo": this is a message xxx/log-formatter-test.cpp:53: info: check true has passed @@ -727,10 +727,10 @@ Failure occurred in a following context: Context value=something Context value2=something different xxx/log-formatter-test.cpp:59: error: in "Fake Test Suite Hierarchy/2 test cases inside/bad_foo": non sense -xxx/log-formatter-test.cpp:220: Leaving test case "bad_foo" -xxx/log-formatter-test.cpp:218: Leaving test suite "2 test cases inside" -xxx/log-formatter-test.cpp:230: Entering test suite "4 test cases inside" -xxx/log-formatter-test.cpp:231: Entering test case "bad_foo" +xxx/log-formatter-test.cpp:170: Leaving test case "bad_foo" +xxx/log-formatter-test.cpp:168: Leaving test suite "2 test cases inside" +xxx/log-formatter-test.cpp:180: Entering test suite "4 test cases inside" +xxx/log-formatter-test.cpp:181: Entering test case "bad_foo" xxx/log-formatter-test.cpp:50: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo": this is a message xxx/log-formatter-test.cpp:53: info: check true has passed @@ -739,13 +739,13 @@ Failure occurred in a following context: Context value=something Context value2=something different xxx/log-formatter-test.cpp:59: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo": non sense -xxx/log-formatter-test.cpp:231: Leaving test case "bad_foo" -xxx/log-formatter-test.cpp:232: Entering test case "very_bad_foo" +xxx/log-formatter-test.cpp:181: Leaving test case "bad_foo" +xxx/log-formatter-test.cpp:182: Entering test case "very_bad_foo" xxx/log-formatter-test.cpp:64: fatal error: in "Fake Test Suite Hierarchy/4 test cases inside/very_bad_foo": very_bad_foo is fatal Failure occurred in a following context: some context -xxx/log-formatter-test.cpp:232: Leaving test case "very_bad_foo" -xxx/log-formatter-test.cpp:233: Entering test case "very_bad_exception" +xxx/log-formatter-test.cpp:182: Leaving test case "very_bad_foo" +xxx/log-formatter-test.cpp:183: Entering test case "very_bad_exception" xxx/log-formatter-test.cpp:73: error: in "Fake Test Suite Hierarchy/4 test cases inside/very_bad_exception": with some message Failure occurred in a following context: Context value=something @@ -754,8 +754,8 @@ unknown location:0: fatal error: in "Fake Test Suite Hierarchy/4 test cases insi xxx/log-formatter-test.cpp:73: last checkpoint Failure occurred in a following context: exception context should be shown -xxx/log-formatter-test.cpp:233: Leaving test case "very_bad_exception" -xxx/log-formatter-test.cpp:234: Entering test case "bad_foo2" +xxx/log-formatter-test.cpp:183: Leaving test case "very_bad_exception" +xxx/log-formatter-test.cpp:184: Entering test case "bad_foo2" xxx/log-formatter-test.cpp:50: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo2": this is a message xxx/log-formatter-test.cpp:53: info: check true has passed @@ -764,13 +764,13 @@ Failure occurred in a following context: Context value=something Context value2=something different xxx/log-formatter-test.cpp:59: error: in "Fake Test Suite Hierarchy/4 test cases inside/bad_foo2": non sense -xxx/log-formatter-test.cpp:234: Leaving test case "bad_foo2" -xxx/log-formatter-test.cpp:230: Leaving test suite "4 test cases inside" -xxx/log-formatter-test.cpp:222: Test suite "Fake Test Suite Hierarchy/3 test cases inside" is skipped because dependency test suite "Fake Test Suite Hierarchy/1 test cases inside" has failed -xxx/log-formatter-test.cpp:236: Leaving test suite "Fake Test Suite Hierarchy" +xxx/log-formatter-test.cpp:184: Leaving test case "bad_foo2" +xxx/log-formatter-test.cpp:180: Leaving test suite "4 test cases inside" +xxx/log-formatter-test.cpp:172: Test suite "Fake Test Suite Hierarchy/3 test cases inside" is skipped because dependency test suite "Fake Test Suite Hierarchy/1 test cases inside" has failed +xxx/log-formatter-test.cpp:186: Leaving test suite "Fake Test Suite Hierarchy" * 2-format ******************************************************************* -ZZZZZZZZZZZZZZZZZZZZZZZZ +ZZZZZZZZZZZZZZZZZZZZZZZZ * 3-format ******************************************************************* @@ -819,7 +819,7 @@ INFO: @@ -867,7 +867,7 @@ INFO: @@ -928,7 +928,7 @@ INFO: @@ -944,7 +944,7 @@ ASSERTION FAILURE: ]]> @@ -979,7 +979,7 @@ CONTEXT: ]]> @@ -1019,7 +1019,7 @@ INFO: @@ -1054,7 +1054,7 @@ ASSERTION FAILURE: ]]> @@ -1085,7 +1085,7 @@ ASSERTION FAILURE: ]]> @@ -1135,7 +1135,7 @@ ASSERTION FAILURE: ]]> @@ -1151,7 +1151,7 @@ ASSERTION FAILURE: ]]> @@ -1186,7 +1186,7 @@ CONTEXT: ]]> @@ -1215,23 +1215,23 @@ ASSERTION FAILURE: ]]> * 1-format ******************************************************************* Running 2 test cases... -xxx/log-formatter-test.cpp:243: Entering test suite "Timeout" -xxx/log-formatter-test.cpp:244: Entering test case "good_foo" +xxx/log-formatter-test.cpp:193: Entering test suite "Timeout" +xxx/log-formatter-test.cpp:194: Entering test case "good_foo" Test case Timeout/good_foo did not check any assertions -xxx/log-formatter-test.cpp:244: Leaving test case "good_foo" -xxx/log-formatter-test.cpp:245: Entering test case "timeout_foo" +xxx/log-formatter-test.cpp:194: Leaving test case "good_foo" +xxx/log-formatter-test.cpp:195: Entering test case "timeout_foo" unknown location:0: fatal error: in "Timeout/timeout_foo": fake timeout -xxx/log-formatter-test.cpp:245: Leaving test case "timeout_foo" -xxx/log-formatter-test.cpp:243: Leaving test suite "Timeout" +xxx/log-formatter-test.cpp:195: Leaving test case "timeout_foo" +xxx/log-formatter-test.cpp:193: Leaving test suite "Timeout" * 2-format ******************************************************************* -ZZZZZZ +ZZZZZZ * 3-format ******************************************************************* @@ -1255,7 +1255,7 @@ fake timeout -------------------------------------]]> @@ -1276,31 +1276,31 @@ fake timeout -------------------------------------]]> * 1-format ******************************************************************* Running 4 test cases... -xxx/log-formatter-test.cpp:248: Entering test suite "Timeout-nested" -xxx/log-formatter-test.cpp:249: Entering test case "good_foo" +xxx/log-formatter-test.cpp:198: Entering test suite "Timeout-nested" +xxx/log-formatter-test.cpp:199: Entering test case "good_foo" Test case Timeout-nested/good_foo did not check any assertions -xxx/log-formatter-test.cpp:249: Leaving test case "good_foo" -xxx/log-formatter-test.cpp:250: Entering test suite "Timeout" -xxx/log-formatter-test.cpp:251: Entering test case "good_foo" +xxx/log-formatter-test.cpp:199: Leaving test case "good_foo" +xxx/log-formatter-test.cpp:200: Entering test suite "Timeout" +xxx/log-formatter-test.cpp:201: Entering test case "good_foo" Test case Timeout-nested/Timeout/good_foo did not check any assertions -xxx/log-formatter-test.cpp:251: Leaving test case "good_foo" -xxx/log-formatter-test.cpp:252: Entering test case "timeout_foo" +xxx/log-formatter-test.cpp:201: Leaving test case "good_foo" +xxx/log-formatter-test.cpp:202: Entering test case "timeout_foo" unknown location:0: fatal error: in "Timeout-nested/Timeout/timeout_foo": fake timeout -xxx/log-formatter-test.cpp:252: Leaving test case "timeout_foo" -xxx/log-formatter-test.cpp:250: Leaving test suite "Timeout" -xxx/log-formatter-test.cpp:255: Entering test case "good_foo2" +xxx/log-formatter-test.cpp:202: Leaving test case "timeout_foo" +xxx/log-formatter-test.cpp:200: Leaving test suite "Timeout" +xxx/log-formatter-test.cpp:205: Entering test case "good_foo2" Test case Timeout-nested/good_foo2 did not check any assertions -xxx/log-formatter-test.cpp:255: Leaving test case "good_foo2" -xxx/log-formatter-test.cpp:248: Leaving test suite "Timeout-nested" +xxx/log-formatter-test.cpp:205: Leaving test case "good_foo2" +xxx/log-formatter-test.cpp:198: Leaving test suite "Timeout-nested" * 2-format ******************************************************************* -ZZZZZZZZZZZZ +ZZZZZZZZZZZZ * 3-format ******************************************************************* @@ -1332,7 +1332,7 @@ fake timeout -------------------------------------]]> @@ -1363,7 +1363,7 @@ fake timeout -------------------------------------]]> diff --git a/test/baseline-outputs/log-formatter-test.pattern.junit b/test/baseline-outputs/log-formatter-test.pattern.junit index ab738cfa..31fb9d4b 100644 --- a/test/baseline-outputs/log-formatter-test.pattern.junit +++ b/test/baseline-outputs/log-formatter-test.pattern.junit @@ -50,7 +50,7 @@ fake timeout -------------------------------------]]> @@ -89,7 +89,7 @@ ASSERTION FAILURE: @@ -105,7 +105,7 @@ ASSERTION FAILURE: ]]> @@ -148,7 +148,7 @@ ASSERTION FAILURE: diff --git a/test/baseline-outputs/messages-in-datasets-test.pattern b/test/baseline-outputs/messages-in-datasets-test.pattern index 97345feb..a28eab8f 100644 --- a/test/baseline-outputs/messages-in-datasets-test.pattern +++ b/test/baseline-outputs/messages-in-datasets-test.pattern @@ -1,6 +1,6 @@ * 1-format ******************************************************************* Running 2 test cases... -xxx/message-in-datatestcase-test.cpp:131: Entering test suite "fake_datatest_case" +xxx/message-in-datatestcase-test.cpp:126: Entering test suite "fake_datatest_case" xxx/message-in-datatestcase-test.cpp:200: Entering test case "_0" Testing update : [context: @@ -19,17 +19,17 @@ Update Volume with 100 sample = util/test_image2.jpg; ] Test case fake_datatest_case/_1 did not check any assertions xxx/message-in-datatestcase-test.cpp:200: Leaving test case "_1" -xxx/message-in-datatestcase-test.cpp:131: Leaving test suite "fake_datatest_case" +xxx/message-in-datatestcase-test.cpp:126: Leaving test suite "fake_datatest_case" * 2-format ******************************************************************* -ZZZZZZ +ZZZZZZ * 3-format ******************************************************************* @@ -53,7 +53,7 @@ MESSAGE: diff --git a/test/execution_monitor-ts/errors-handling-test.cpp b/test/execution_monitor-ts/errors-handling-test.cpp index 2c2a58c0..fa604fa0 100644 --- a/test/execution_monitor-ts/errors-handling-test.cpp +++ b/test/execution_monitor-ts/errors-handling-test.cpp @@ -26,6 +26,7 @@ #include #include #include +#include "../framework-ts/logger-for-tests.hpp" // STL #include #include @@ -38,7 +39,6 @@ using namespace boost::test_tools; #endif namespace { - struct this_test_log_formatter : public boost::unit_test::output::compiler_log_formatter { void print_prefix( std::ostream& output, boost::unit_test::const_string, std::size_t line ) @@ -178,18 +178,13 @@ BOOST_AUTO_TEST_CASE( test_errors_handling ) test_output << "\n===========================\n" << "log level: " << log_level_name[level] << ';' << " error type: " << error_type_name[error_type] << ";\n" << std::endl; + { + unit_test_log.set_formatter( new this_test_log_formatter ); + log_setup_teardown holder(test_output, OF_CUSTOM_LOGGER, level); - unit_test_log.set_stream( test_output ); - unit_test_log.set_threshold_level( level ); - unit_test_log.set_formatter( new this_test_log_formatter ); - framework::run( test ); - - unit_test_log.set_stream( std::cout ); - unit_test_log.set_format( runtime_config::get( runtime_config::btrt_log_format ) ); - - log_level ll = runtime_config::get( runtime_config::btrt_log_level ); - unit_test_log.set_threshold_level( ll != invalid_log_level? ll : log_all_errors ); + framework::run( test ); + } BOOST_CHECK( test_output.match_pattern() ); } } diff --git a/test/framework-ts/log-count-skipped-test.cpp b/test/framework-ts/log-count-skipped-test.cpp index a2689c7b..c7ed50f2 100644 --- a/test/framework-ts/log-count-skipped-test.cpp +++ b/test/framework-ts/log-count-skipped-test.cpp @@ -62,10 +62,6 @@ void check( output_test_stream& output, test_unit_id id, log_level ll = log_successful_tests ) { - boost::unit_test::unit_test_log.set_format(log_format); - boost::unit_test::unit_test_log.set_stream(output); - boost::unit_test::unit_test_log.set_threshold_level(ll); - class reset_status : public test_tree_visitor { private: virtual bool visit( test_unit const& tu ) @@ -75,21 +71,22 @@ void check( output_test_stream& output, return true; } } rstatus; - - // reinit the default/run status otherwise we cannot apply the decorators - // after the first run - traverse_test_tree( id, rstatus, true ); - framework::get(id).p_default_status.value = test_unit::RS_ENABLED; - output << "* " << log_format << "-format *******************************************************************"; - output << std::endl; - - framework::finalize_setup_phase( id ); - framework::run( id, false ); // do not continue the test tree to have the test_log_start/end - output << std::endl; + { + log_setup_teardown holder(output, log_format, ll); - boost::unit_test::unit_test_log.set_format(OF_CLF); - boost::unit_test::unit_test_log.set_stream(std::cout); + // reinit the default/run status otherwise we cannot apply the decorators + // after the first run + traverse_test_tree( id, rstatus, true ); + framework::get(id).p_default_status.value = test_unit::RS_ENABLED; + + output << "* " << log_format << "-format *******************************************************************"; + output << std::endl; + + framework::finalize_setup_phase( id ); + framework::run( id, false ); // do not continue the test tree to have the test_log_start/end + output << std::endl; + } BOOST_TEST( output.match_pattern(true) ); // flushes the stream at the end of the comparison. } diff --git a/test/framework-ts/log-formatter-test.cpp b/test/framework-ts/log-formatter-test.cpp index 02df428f..1ed32cf0 100644 --- a/test/framework-ts/log-formatter-test.cpp +++ b/test/framework-ts/log-formatter-test.cpp @@ -95,18 +95,14 @@ void check( output_test_stream& output, test_unit_id id, log_level ll = log_successful_tests ) { - boost::unit_test::unit_test_log.set_format(log_format); - boost::unit_test::unit_test_log.set_stream(output); - boost::unit_test::unit_test_log.set_threshold_level(ll); - - output << "* " << log_format << "-format *******************************************************************"; - output << std::endl; - framework::finalize_setup_phase( id ); - framework::run( id, false ); // do not continue the test tree to have the test_log_start/end - output << std::endl; - - boost::unit_test::unit_test_log.set_format(OF_CLF); - boost::unit_test::unit_test_log.set_stream(std::cout); + { + log_setup_teardown holder(output, log_format, ll); + output << "* " << log_format << "-format *******************************************************************"; + output << std::endl; + framework::finalize_setup_phase( id ); + framework::run( id, false ); // do not continue the test tree to have the test_log_start/end + output << std::endl; + } BOOST_TEST( output.match_pattern(true) ); // flushes the stream at the end of the comparison. } @@ -153,7 +149,7 @@ BOOST_AUTO_TEST_CASE( test_logs ) true, __FILE__ ); -#line 207 +#line 157 test_suite* ts_0 = BOOST_TEST_SUITE( "0 test cases inside" ); test_suite* ts_1 = BOOST_TEST_SUITE( "1 test cases inside" ); @@ -245,7 +241,7 @@ BOOST_AUTO_TEST_CASE( test_logs_junit_info_closing_tags ) true, __FILE__ ); -#line 218 +#line 249 test_suite* ts_main = BOOST_TEST_SUITE( "1 test cases inside" ); ts_main->add( BOOST_TEST_CASE( almost_good_foo ) ); diff --git a/test/framework-ts/logger-for-tests.hpp b/test/framework-ts/logger-for-tests.hpp index 9e7986b1..4468e262 100644 --- a/test/framework-ts/logger-for-tests.hpp +++ b/test/framework-ts/logger-for-tests.hpp @@ -59,8 +59,8 @@ public: std::string pathname_fixes; { - const std::string to_look_for[] = {normalize_path(source_filename)}; - const std::string to_replace[] = {"xxx/" + basename }; + const std::string to_look_for[] = { source_filename, normalize_path(source_filename)}; + const std::string to_replace[] = {"xxx/" + basename, "xxx/" + basename }; pathname_fixes = utils::replace_all_occurrences_of( current_string, to_look_for, to_look_for + sizeof(to_look_for)/sizeof(to_look_for[0]), @@ -113,4 +113,31 @@ public: }; + +// helper for tests +struct log_setup_teardown { + log_setup_teardown( + output_test_stream& output, + output_format log_format, + log_level ll, + log_level level_to_restore = invalid_log_level) + : m_previous_ll(level_to_restore) + { + boost::unit_test::unit_test_log.set_format(log_format); + boost::unit_test::unit_test_log.set_stream(output); + if(level_to_restore == invalid_log_level) { + m_previous_ll = boost::unit_test::unit_test_log.set_threshold_level(ll); + } + } + + ~log_setup_teardown() { + boost::unit_test::unit_test_log.set_format(OF_CLF); + boost::unit_test::unit_test_log.set_stream(std::cout); + boost::unit_test::unit_test_log.set_threshold_level( m_previous_ll ); + boost::unit_test::unit_test_log.configure(); // forces reconfiguration + } + + log_level m_previous_ll; +}; + #endif /* BOOST_TEST_TESTS_LOGGER_FOR_TESTS_HPP__ */ diff --git a/test/framework-ts/message-in-datatestcase-test.cpp b/test/framework-ts/message-in-datatestcase-test.cpp index 19686eb5..1da0d9fb 100644 --- a/test/framework-ts/message-in-datatestcase-test.cpp +++ b/test/framework-ts/message-in-datatestcase-test.cpp @@ -50,30 +50,26 @@ void check_pattern_loggers( bool bt_module_failed = false, log_level ll = log_successful_tests ) { - boost::unit_test::unit_test_log.set_format(log_format); - boost::unit_test::unit_test_log.set_stream(output); - boost::unit_test::unit_test_log.set_threshold_level(ll); + { + log_setup_teardown holder(output, log_format, ll); - // output before fixture registration - output << "* " << log_format << "-format *******************************************************************"; - output << std::endl; + // output before fixture registration + output << "* " << log_format << "-format *******************************************************************"; + output << std::endl; - framework::finalize_setup_phase( id ); + framework::finalize_setup_phase( id ); - bool setup_error_caught = false; - try { - framework::run( id, false ); // do not continue the test tree to have the test_log_start/end + bool setup_error_caught = false; + try { + framework::run( id, false ); // do not continue the test tree to have the test_log_start/end + } + catch (framework::setup_error&) { + BOOST_TEST_MESSAGE("Framework setup_error caught"); + setup_error_caught = true; + } + + output << std::endl; } - catch (framework::setup_error&) { - BOOST_TEST_MESSAGE("Framework setup_error caught"); - setup_error_caught = true; - } - - output << std::endl; - - // we do not want the result of the comparison go to the "output" stream - boost::unit_test::unit_test_log.set_format(OF_CLF); - boost::unit_test::unit_test_log.set_stream(std::cout); BOOST_TEST( bt_module_failed == (( results_collector.results( id ).result_code() != 0 ) )); BOOST_TEST( output.match_pattern(true) ); // flushes the stream at the end of the comparison. diff --git a/test/framework-ts/test-macro-global-fixture.cpp b/test/framework-ts/test-macro-global-fixture.cpp index 790c1ad6..9f2440f6 100644 --- a/test/framework-ts/test-macro-global-fixture.cpp +++ b/test/framework-ts/test-macro-global-fixture.cpp @@ -87,32 +87,29 @@ void check_global_fixture( bool has_setup_error = false, log_level ll = log_successful_tests ) { - boost::unit_test::unit_test_log.set_format(log_format); - boost::unit_test::unit_test_log.set_stream(output); - boost::unit_test::unit_test_log.set_threshold_level(ll); - - // output before fixture registration - output << "* " << log_format << "-format *******************************************************************"; - output << std::endl; - - // register this as a global fixture - boost::unit_test::ut_detail::global_fixture_impl fixture_stack_element; - framework::finalize_setup_phase( id ); - bool setup_error_caught = false; - try { - framework::run( id, false ); // do not continue the test tree to have the test_log_start/end - } - catch (framework::setup_error&) { - BOOST_TEST_MESSAGE("Framework setup_error caught"); - setup_error_caught = true; - } + + { + log_setup_teardown holder(output, log_format, ll); - output << std::endl; + // output before fixture registration + output << "* " << log_format << "-format *******************************************************************"; + output << std::endl; - // we do not want the result of the comparison go to the "output" stream - boost::unit_test::unit_test_log.set_format(OF_CLF); - boost::unit_test::unit_test_log.set_stream(std::cout); + // register this as a global fixture + boost::unit_test::ut_detail::global_fixture_impl fixture_stack_element; + framework::finalize_setup_phase( id ); + + try { + framework::run( id, false ); // do not continue the test tree to have the test_log_start/end + } + catch (framework::setup_error&) { + BOOST_TEST_MESSAGE("Framework setup_error caught"); + setup_error_caught = true; + } + + output << std::endl; + } BOOST_TEST( setup_error_caught == has_setup_error ); BOOST_TEST( bt_module_failed == (( results_collector.results( id ).result_code() != 0 ) || setup_error_caught )); diff --git a/test/writing-test-ts/test_tools-test.cpp b/test/writing-test-ts/test_tools-test.cpp index cc2b0fc6..e1c8e69c 100644 --- a/test/writing-test-ts/test_tools-test.cpp +++ b/test/writing-test-ts/test_tools-test.cpp @@ -37,6 +37,8 @@ # pragma warning(disable: 4702) // unreachable code #endif +#include "../framework-ts/logger-for-tests.hpp" + namespace ut=boost::unit_test; namespace tt=boost::test_tools; @@ -122,22 +124,27 @@ BOOST_AUTO_TEST_CASE( name ) \ __LINE__ ); \ impl->p_default_status.value = ut::test_unit::RS_ENABLED; \ \ - ut::unit_test_log.set_stream( ots() ); \ - ut::unit_test_log.set_threshold_level( ut::log_nothing ); \ - ut::unit_test_log.set_formatter( new shorten_lf ); \ - ut::framework::finalize_setup_phase( impl->p_id ); \ - ut::framework::run( impl ); \ + /* to detect for issues concerning the file pattern, we take + the stream now */ \ + tt::output_test_stream& stream = ots(); \ \ - ut::log_level ll = ut::runtime_config::get( \ - ut::runtime_config::btrt_log_level ); \ - ut::output_format lf = ut::runtime_config::get( \ - ut::runtime_config::btrt_log_format ); \ + { \ + ut::log_level ll = ut::runtime_config::get( \ + ut::runtime_config::btrt_log_level ); \ + ut::unit_test_log.set_formatter( new shorten_lf ); \ + log_setup_teardown holder(stream, \ + OF_CUSTOM_LOGGER, \ + ut::log_nothing, \ + ll != ut::invalid_log_level ? \ + ll \ + : ut::log_all_errors ); \ \ - ut::unit_test_log.set_threshold_level( \ - ll != ut::invalid_log_level ? ll : ut::log_all_errors ); \ - ut::unit_test_log.set_format( lf ); \ - ut::unit_test_log.set_stream( std::cout ); \ - BOOST_CHECK( ots().match_pattern() ); \ + ut::framework::finalize_setup_phase( impl->p_id ); \ + ut::framework::run( impl ); \ + \ + } \ + \ + BOOST_CHECK( stream.match_pattern() ); \ } \ \ void name ## _impl() \