summaryrefslogtreecommitdiff
path: root/boost/test/impl/results_reporter.ipp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/test/impl/results_reporter.ipp')
-rw-r--r--boost/test/impl/results_reporter.ipp31
1 files changed, 15 insertions, 16 deletions
diff --git a/boost/test/impl/results_reporter.ipp b/boost/test/impl/results_reporter.ipp
index 885295c928..87c1172e12 100644
--- a/boost/test/impl/results_reporter.ipp
+++ b/boost/test/impl/results_reporter.ipp
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2005-2014.
+// (C) Copyright Gennadiy Rozental 2001.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -19,6 +19,7 @@
#include <boost/test/results_reporter.hpp>
#include <boost/test/results_collector.hpp>
#include <boost/test/framework.hpp>
+
#include <boost/test/output/plain_report_formatter.hpp>
#include <boost/test/output/xml_report_formatter.hpp>
@@ -26,8 +27,6 @@
#include <boost/test/tree/test_unit.hpp>
#include <boost/test/tree/traverse.hpp>
-#include <boost/test/unit_test_parameters.hpp>
-
// Boost
#include <boost/scoped_ptr.hpp>
#include <boost/io/ios_state.hpp>
@@ -53,8 +52,8 @@ namespace {
struct results_reporter_impl : test_tree_visitor {
// Constructor
results_reporter_impl()
- : m_output( runtime_config::report_sink() )
- , m_stream_state_saver( new io_saver_type( *m_output ) )
+ : m_stream( &std::cerr )
+ , m_stream_state_saver( new io_saver_type( std::cerr ) )
, m_report_level( CONFIRMATION_REPORT )
, m_formatter( new output::plain_report_formatter )
{}
@@ -62,28 +61,28 @@ struct results_reporter_impl : test_tree_visitor {
// test tree visitor interface implementation
void visit( test_case const& tc )
{
- m_formatter->test_unit_report_start( tc, *m_output );
- m_formatter->test_unit_report_finish( tc, *m_output );
+ m_formatter->test_unit_report_start( tc, *m_stream );
+ m_formatter->test_unit_report_finish( tc, *m_stream );
}
bool test_suite_start( test_suite const& ts )
{
- m_formatter->test_unit_report_start( ts, *m_output );
+ m_formatter->test_unit_report_start( ts, *m_stream );
if( m_report_level == DETAILED_REPORT && !results_collector.results( ts.p_id ).p_skipped )
return true;
- m_formatter->test_unit_report_finish( ts, *m_output );
+ m_formatter->test_unit_report_finish( ts, *m_stream );
return false;
}
void test_suite_finish( test_suite const& ts )
{
- m_formatter->test_unit_report_finish( ts, *m_output );
+ m_formatter->test_unit_report_finish( ts, *m_stream );
}
typedef scoped_ptr<io_saver_type> saver_ptr;
// Data members
- std::ostream* m_output;
+ std::ostream* m_stream;
saver_ptr m_stream_state_saver;
report_level m_report_level;
scoped_ptr<format> m_formatter;
@@ -109,7 +108,7 @@ set_level( report_level l )
void
set_stream( std::ostream& ostr )
{
- s_rr_impl().m_output = &ostr;
+ s_rr_impl().m_stream = &ostr;
s_rr_impl().m_stream_state_saver.reset( new io_saver_type( ostr ) );
}
@@ -118,7 +117,7 @@ set_stream( std::ostream& ostr )
std::ostream&
get_stream()
{
- return *s_rr_impl().m_output;
+ return *s_rr_impl().m_stream;
}
//____________________________________________________________________________//
@@ -169,11 +168,11 @@ make_report( report_level l, test_unit_id id )
report_level bkup = s_rr_impl().m_report_level;
s_rr_impl().m_report_level = l;
- s_rr_impl().m_formatter->results_report_start( *s_rr_impl().m_output );
+ s_rr_impl().m_formatter->results_report_start( *s_rr_impl().m_stream );
switch( l ) {
case CONFIRMATION_REPORT:
- s_rr_impl().m_formatter->do_confirmation_report( framework::get<test_unit>( id ), *s_rr_impl().m_output );
+ s_rr_impl().m_formatter->do_confirmation_report( framework::get<test_unit>( id ), *s_rr_impl().m_stream );
break;
case SHORT_REPORT:
case DETAILED_REPORT:
@@ -183,7 +182,7 @@ make_report( report_level l, test_unit_id id )
break;
}
- s_rr_impl().m_formatter->results_report_finish( *s_rr_impl().m_output );
+ s_rr_impl().m_formatter->results_report_finish( *s_rr_impl().m_stream );
s_rr_impl().m_report_level = bkup;
}