diff options
Diffstat (limited to 'boost/test/impl/compiler_log_formatter.ipp')
-rw-r--r-- | boost/test/impl/compiler_log_formatter.ipp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/boost/test/impl/compiler_log_formatter.ipp b/boost/test/impl/compiler_log_formatter.ipp index a4e045cae0..0e83448b14 100644 --- a/boost/test/impl/compiler_log_formatter.ipp +++ b/boost/test/impl/compiler_log_formatter.ipp @@ -52,7 +52,7 @@ namespace { std::string test_phase_identifier() { - return framework::test_in_progress() ? framework::current_test_case().full_name() : std::string( "Test setup" ); + return framework::test_in_progress() ? framework::current_test_unit().full_name() : std::string( "Test setup" ); } } // local namespace @@ -260,21 +260,29 @@ compiler_log_formatter::print_prefix( std::ostream& output, const_string file_na void compiler_log_formatter::entry_context_start( std::ostream& output, log_level l ) { - output << (l == log_successful_tests ? "\nAssertion" : "\nFailure" ) << " occurred in a following context:"; + if( l == log_messages ) { + output << "\n[context:"; + } + else { + output << (l == log_successful_tests ? "\nAssertion" : "\nFailure" ) << " occurred in a following context:"; + } } //____________________________________________________________________________// void -compiler_log_formatter::entry_context_finish( std::ostream& output ) +compiler_log_formatter::entry_context_finish( std::ostream& output, log_level l ) { + if( l == log_messages ) { + output << "]"; + } output.flush(); } //____________________________________________________________________________// void -compiler_log_formatter::log_entry_context( std::ostream& output, const_string context_descr ) +compiler_log_formatter::log_entry_context( std::ostream& output, log_level l, const_string context_descr ) { output << "\n " << context_descr; } |