initial draft of changes to support Borland c++ Builder 5 / free compiler 5.5

This commit is contained in:
Patrick Martin
2012-07-19 23:03:51 +01:00
parent b981632f7c
commit 203fd68187
8 changed files with 19 additions and 17 deletions

View File

@@ -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 );

View File

@@ -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 );
}

View File

@@ -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();
}
}

View File

@@ -73,7 +73,7 @@ namespace Catch {
}
std::string getExpandedExpression() const {
return hasExpression() ? getExpandedExpressionInternal() : "";
return hasExpression() ? getExpandedExpressionInternal() : std::string();
}
std::string getMessage() const {

View File

@@ -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 {

View File

@@ -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 " ) {