Boost logo

Boost-Commit :

From: gennadiy.rozental_at_[hidden]
Date: 2007-10-14 15:27:32


Author: rogeeff
Date: 2007-10-14 15:27:32 EDT (Sun, 14 Oct 2007)
New Revision: 40030
URL: http://svn.boost.org/trac/boost/changeset/40030

Log:
avoid start/finish messages if log is disabled completely
Text files modified:
   trunk/boost/test/impl/unit_test_log.ipp | 6 ++++++
   1 files changed, 6 insertions(+), 0 deletions(-)

Modified: trunk/boost/test/impl/unit_test_log.ipp
==============================================================================
--- trunk/boost/test/impl/unit_test_log.ipp (original)
+++ trunk/boost/test/impl/unit_test_log.ipp 2007-10-14 15:27:32 EDT (Sun, 14 Oct 2007)
@@ -124,6 +124,9 @@
 void
 unit_test_log_t::test_start( counter_t test_cases_amount )
 {
+ if( s_log_impl().m_threshold_level == log_nothing )
+ return;
+
     s_log_impl().m_log_formatter->log_start( s_log_impl().stream(), test_cases_amount );
 
     if( runtime_config::show_build_info() )
@@ -137,6 +140,9 @@
 void
 unit_test_log_t::test_finish()
 {
+ if( s_log_impl().m_threshold_level == log_nothing )
+ return;
+
     s_log_impl().m_log_formatter->log_finish( s_log_impl().stream() );
 
     s_log_impl().stream().flush();


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk