mirror of
https://github.com/catchorg/Catch2.git
synced 2025-10-19 00:25:39 +02:00
initial draft of changes to support Borland c++ Builder 5 / free compiler 5.5
This commit is contained in:
@@ -61,7 +61,7 @@ namespace Catch {
|
||||
|
||||
class CommandParser {
|
||||
public:
|
||||
CommandParser( int argc, char const * const * argv ) : m_argc( static_cast<std::size_t>( argc ) ), m_argv( argv ) {}
|
||||
CommandParser( int argc, char* const argv[] ) : m_argc( static_cast<std::size_t>( argc ) ), m_argv( argv ) {}
|
||||
|
||||
Command find( const std::string& arg1, const std::string& arg2, const std::string& arg3 ) const {
|
||||
return find( arg1 ) + find( arg2 ) + find( arg3 );
|
||||
|
@@ -54,7 +54,7 @@ namespace Catch {
|
||||
}
|
||||
|
||||
void set( TextColour::Colours colour ) {
|
||||
WORD consoleColour = mapConsoleColour( colour );
|
||||
WORD consoleColour = Catch::mapConsoleColour( colour );
|
||||
if( consoleColour > 0 )
|
||||
SetConsoleTextAttribute( hStdout, consoleColour );
|
||||
}
|
||||
|
@@ -62,7 +62,7 @@ namespace Catch
|
||||
std::string::size_type start = str.find_first_not_of( "\n\r\t " );
|
||||
std::string::size_type end = str.find_last_not_of( "\n\r\t " );
|
||||
|
||||
return start != std::string::npos ? str.substr( start, 1+end-start ) : "";
|
||||
return start != std::string::npos ? str.substr( start, 1+end-start ) : std::string();
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -73,7 +73,7 @@ namespace Catch {
|
||||
}
|
||||
|
||||
std::string getExpandedExpression() const {
|
||||
return hasExpression() ? getExpandedExpressionInternal() : "";
|
||||
return hasExpression() ? getExpandedExpressionInternal() : std::string();
|
||||
}
|
||||
|
||||
std::string getMessage() const {
|
||||
|
@@ -227,7 +227,7 @@ namespace Catch {
|
||||
virtual std::string getCurrentTestName() const {
|
||||
return m_runningTest
|
||||
? m_runningTest->getTestCaseInfo().getName()
|
||||
: "";
|
||||
: std::string();
|
||||
}
|
||||
|
||||
virtual const ResultInfo* getLastResult() const {
|
||||
|
@@ -71,7 +71,7 @@ namespace Catch {
|
||||
if( counts.passed )
|
||||
m_config.stream() << counts.failed << " of " << counts.total() << " " << label << "s failed";
|
||||
else
|
||||
m_config.stream() << ( counts.failed > 1 ? allPrefix : "" ) << pluralise( counts.failed, label ) << " failed";
|
||||
m_config.stream() << ( counts.failed > 1 ? allPrefix : std::string() ) << pluralise( counts.failed, label ) << " failed";
|
||||
}
|
||||
|
||||
void ReportCounts( const Totals& totals, const std::string& allPrefix = "All " ) {
|
||||
|
Reference in New Issue
Block a user