removed final use of tbc_text_format (console reporter)

This commit is contained in:
Phil Nash 2017-07-20 23:13:08 +01:00
parent 58d8bc6985
commit 6ec7709e07
2 changed files with 6 additions and 7 deletions

View File

@ -11,13 +11,15 @@
#include "../internal/catch_reporter_registrars.hpp" #include "../internal/catch_reporter_registrars.hpp"
#include "../internal/catch_console_colour.hpp" #include "../internal/catch_console_colour.hpp"
#include "../internal/catch_version.h" #include "../internal/catch_version.h"
#include "../internal/catch_text.h" #include "../internal/catch_clara.h" // For TextFlow
#include <cfloat> #include <cfloat>
#include <cstdio> #include <cstdio>
namespace Catch { namespace Catch {
using namespace clara::TextFlow;
struct ConsoleReporter : StreamingReporterBase<ConsoleReporter> { struct ConsoleReporter : StreamingReporterBase<ConsoleReporter> {
using StreamingReporterBase::StreamingReporterBase; using StreamingReporterBase::StreamingReporterBase;
@ -209,7 +211,7 @@ namespace Catch {
if( result.hasExpandedExpression() ) { if( result.hasExpandedExpression() ) {
stream << "with expansion:\n"; stream << "with expansion:\n";
Colour colourGuard( Colour::ReconstructedExpression ); Colour colourGuard( Colour::ReconstructedExpression );
stream << Text( result.getExpandedExpression(), TextAttributes().setIndent(2) ) << '\n'; stream << Column( result.getExpandedExpression() ).indent(2) << '\n';
} }
} }
void printMessage() const { void printMessage() const {
@ -218,7 +220,7 @@ namespace Catch {
for( auto const& msg : messages ) { for( auto const& msg : messages ) {
// If this assertion is a warning ignore any INFO messages // If this assertion is a warning ignore any INFO messages
if( printInfoMessages || msg.type != ResultWas::Info ) if( printInfoMessages || msg.type != ResultWas::Info )
stream << Text( msg.message, TextAttributes().setIndent(2) ) << '\n'; stream << Column( msg.message ).indent(2) << '\n';
} }
} }
void printSourceInfo() const { void printSourceInfo() const {
@ -311,9 +313,7 @@ namespace Catch {
i+=2; i+=2;
else else
i = 0; i = 0;
stream << Text( _string, TextAttributes() stream << Column( _string ).indent( indent+i ).initialIndent( indent ) << '\n';
.setIndent( indent+i)
.setInitialIndent( indent ) ) << '\n';
} }
struct SummaryColumn { struct SummaryColumn {

View File

@ -8,7 +8,6 @@
#define CATCH_CONFIG_MAIN #define CATCH_CONFIG_MAIN
#include "catch.hpp" #include "catch.hpp"
#include "internal/catch_text.h" // temporarily
#include "../include/reporters/catch_reporter_teamcity.hpp" #include "../include/reporters/catch_reporter_teamcity.hpp"
#include "../include/reporters/catch_reporter_tap.hpp" #include "../include/reporters/catch_reporter_tap.hpp"
#include "../include/reporters/catch_reporter_automake.hpp" #include "../include/reporters/catch_reporter_automake.hpp"