mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-19 11:25:38 +02:00
Replaced some uses of tbc_text_format with TextFlow (from Clara)
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
#include "internal/catch_run_context.hpp"
|
||||
#include "internal/catch_test_spec.hpp"
|
||||
#include "internal/catch_version.h"
|
||||
#include "internal/catch_text.h"
|
||||
#include "internal/catch_interfaces_reporter.h"
|
||||
#include "internal/catch_startup_exception_registry.h"
|
||||
|
||||
@@ -24,6 +23,8 @@
|
||||
|
||||
namespace Catch {
|
||||
|
||||
using namespace clara::TextFlow;
|
||||
|
||||
IStreamingReporterPtr createReporter( std::string const& reporterName, IConfigPtr const& config ) {
|
||||
auto reporter = getRegistryHub().getReporterRegistry().create( reporterName, config );
|
||||
CATCH_ENFORCE( reporter, "No reporter registered with name: '" << reporterName << "'" );
|
||||
@@ -120,13 +121,12 @@ namespace Catch {
|
||||
int applyCommandLine( int argc, char* argv[] ) {
|
||||
auto result = m_cli.parse( clara::Args( argc, argv ) );
|
||||
if( !result ) {
|
||||
{
|
||||
Colour colourGuard( Colour::Red );
|
||||
Catch::cerr()
|
||||
<< "\nError(s) in input:\n"
|
||||
<< Text( result.errorMessage(), TextAttributes().setIndent(2) )
|
||||
<< "\n\n";
|
||||
}
|
||||
Catch::cerr()
|
||||
<< Colour( Colour::Red )
|
||||
<< "\nError(s) in input:\n"
|
||||
<< Column( result.errorMessage() ).indent( 2 )
|
||||
<< "\n\n";
|
||||
|
||||
Catch::cerr() << m_cli << std::endl;
|
||||
return MaxExitCode;
|
||||
}
|
||||
|
Reference in New Issue
Block a user