mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +01:00
Build 22
This commit is contained in:
parent
e57a56bb28
commit
a04981b450
2
README
2
README
@ -1,4 +1,4 @@
|
|||||||
CATCH v0.9 build 21 (integration branch)
|
CATCH v0.9 build 22 (integration branch)
|
||||||
---------------------------------------------
|
---------------------------------------------
|
||||||
|
|
||||||
CATCH is an automated test framework for C, C++ and Objective-C.
|
CATCH is an automated test framework for C, C++ and Objective-C.
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
namespace Catch {
|
namespace Catch {
|
||||||
|
|
||||||
// These numbers are maintained by a script
|
// These numbers are maintained by a script
|
||||||
Version libraryVersion( 0, 9, 21, "integration" );
|
Version libraryVersion( 0, 9, 22, "integration" );
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED
|
#endif // TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
CatchSelfTest is a CATCH v0.9 b21 (integration) host application.
|
CatchSelfTest is a CATCH v0.9 b22 (integration) host application.
|
||||||
Run with -? for options
|
Run with -? for options
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
@ -4286,7 +4286,7 @@ with expansion:
|
|||||||
101 test cases - 47 failed (625 assertions - 104 failed)
|
101 test cases - 47 failed (625 assertions - 104 failed)
|
||||||
|
|
||||||
|
|
||||||
CatchSelfTest is a CATCH v0.9 b21 (integration) host application.
|
CatchSelfTest is a CATCH v0.9 b22 (integration) host application.
|
||||||
Run with -? for options
|
Run with -? for options
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* CATCH v0.9 build 21 (integration branch)
|
* CATCH v0.9 build 22 (integration branch)
|
||||||
* Generated: 2013-03-04 15:05:07.210014
|
* Generated: 2013-03-08 09:29:15.097480
|
||||||
* ----------------------------------------------------------
|
* ----------------------------------------------------------
|
||||||
* This file has been merged from multiple headers. Please don't edit it directly
|
* This file has been merged from multiple headers. Please don't edit it directly
|
||||||
* Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved.
|
* Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved.
|
||||||
@ -45,13 +45,13 @@
|
|||||||
|
|
||||||
namespace Catch {
|
namespace Catch {
|
||||||
|
|
||||||
class NonCopyable {
|
class NonCopyable {
|
||||||
NonCopyable( const NonCopyable& );
|
NonCopyable( const NonCopyable& );
|
||||||
void operator = ( const NonCopyable& );
|
void operator = ( const NonCopyable& );
|
||||||
protected:
|
protected:
|
||||||
NonCopyable() {}
|
NonCopyable() {}
|
||||||
virtual ~NonCopyable();
|
virtual ~NonCopyable();
|
||||||
};
|
};
|
||||||
|
|
||||||
class SafeBool {
|
class SafeBool {
|
||||||
public:
|
public:
|
||||||
@ -949,7 +949,7 @@ struct STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison;
|
|||||||
// in an ExpressionResultBuilder object
|
// in an ExpressionResultBuilder object
|
||||||
template<typename T>
|
template<typename T>
|
||||||
class ExpressionLhs {
|
class ExpressionLhs {
|
||||||
void operator = ( const ExpressionLhs& );
|
void operator = ( const ExpressionLhs& );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ExpressionLhs( T lhs ) : m_lhs( lhs ) {}
|
ExpressionLhs( T lhs ) : m_lhs( lhs ) {}
|
||||||
@ -1282,8 +1282,8 @@ namespace Catch {
|
|||||||
return IsDebuggerPresent() != 0;
|
return IsDebuggerPresent() != 0;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
inline void BreakIntoDebugger(){}
|
inline void BreakIntoDebugger(){}
|
||||||
inline bool isDebuggerActive() { return false; }
|
inline bool isDebuggerActive() { return false; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CATCH_PLATFORM_WINDOWS
|
#ifdef CATCH_PLATFORM_WINDOWS
|
||||||
@ -1753,7 +1753,7 @@ namespace Catch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int overflow( int c ) {
|
int overflow( int c ) {
|
||||||
sync();
|
sync();
|
||||||
|
|
||||||
if( c != EOF ) {
|
if( c != EOF ) {
|
||||||
@ -1765,7 +1765,7 @@ namespace Catch {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sync() {
|
int sync() {
|
||||||
if( pbase() != pptr() ) {
|
if( pbase() != pptr() ) {
|
||||||
m_writer( std::string( pbase(), static_cast<std::string::size_type>( pptr() - pbase() ) ) );
|
m_writer( std::string( pbase(), static_cast<std::string::size_type>( pptr() - pbase() ) ) );
|
||||||
setp( pbase(), epptr() );
|
setp( pbase(), epptr() );
|
||||||
@ -2757,12 +2757,12 @@ class CompositeGenerator {
|
|||||||
public:
|
public:
|
||||||
CompositeGenerator() : m_totalSize( 0 ) {}
|
CompositeGenerator() : m_totalSize( 0 ) {}
|
||||||
|
|
||||||
// *** Move semantics, similar to auto_ptr ***
|
// *** Move semantics, similar to auto_ptr ***
|
||||||
CompositeGenerator( CompositeGenerator& other )
|
CompositeGenerator( CompositeGenerator& other )
|
||||||
: m_fileInfo( other.m_fileInfo ),
|
: m_fileInfo( other.m_fileInfo ),
|
||||||
m_totalSize( 0 )
|
m_totalSize( 0 )
|
||||||
{
|
{
|
||||||
move( other );
|
move( other );
|
||||||
}
|
}
|
||||||
|
|
||||||
CompositeGenerator& setFileInfo( const char* fileInfo ) {
|
CompositeGenerator& setFileInfo( const char* fileInfo ) {
|
||||||
@ -2789,7 +2789,7 @@ public:
|
|||||||
index += generator->size();
|
index += generator->size();
|
||||||
}
|
}
|
||||||
CATCH_INTERNAL_ERROR( "Indexed past end of generated range" );
|
CATCH_INTERNAL_ERROR( "Indexed past end of generated range" );
|
||||||
return T(); // Suppress spurious "not all control paths return a value" warning in Visual Studio - if you know how to fix this please do so
|
return T(); // Suppress spurious "not all control paths return a value" warning in Visual Studio - if you know how to fix this please do so
|
||||||
}
|
}
|
||||||
|
|
||||||
void add( const IGenerator<T>* generator ) {
|
void add( const IGenerator<T>* generator ) {
|
||||||
@ -5869,7 +5869,7 @@ namespace Catch {
|
|||||||
namespace Catch {
|
namespace Catch {
|
||||||
|
|
||||||
// These numbers are maintained by a script
|
// These numbers are maintained by a script
|
||||||
Version libraryVersion( 0, 9, 21, "integration" );
|
Version libraryVersion( 0, 9, 22, "integration" );
|
||||||
}
|
}
|
||||||
|
|
||||||
// #included from: catch_line_wrap.hpp
|
// #included from: catch_line_wrap.hpp
|
||||||
@ -6957,7 +6957,7 @@ namespace Catch {
|
|||||||
struct ConsoleReporter : StreamingReporterBase {
|
struct ConsoleReporter : StreamingReporterBase {
|
||||||
ConsoleReporter( ReporterConfig const& _config )
|
ConsoleReporter( ReporterConfig const& _config )
|
||||||
: StreamingReporterBase( _config ),
|
: StreamingReporterBase( _config ),
|
||||||
m_printedCurrentSection( false ),
|
m_headerPrinted( false ),
|
||||||
m_atLeastOneTestCasePrinted( false )
|
m_atLeastOneTestCasePrinted( false )
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -6990,7 +6990,7 @@ namespace Catch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual void sectionStarting( SectionInfo const& _sectionInfo ) {
|
virtual void sectionStarting( SectionInfo const& _sectionInfo ) {
|
||||||
m_printedCurrentSection = false;
|
m_headerPrinted = false;
|
||||||
StreamingReporterBase::sectionStarting( _sectionInfo );
|
StreamingReporterBase::sectionStarting( _sectionInfo );
|
||||||
}
|
}
|
||||||
virtual void sectionEnded( SectionStats const& _sectionStats ) {
|
virtual void sectionEnded( SectionStats const& _sectionStats ) {
|
||||||
@ -6999,7 +6999,7 @@ namespace Catch {
|
|||||||
TextColour colour( TextColour::ResultError );
|
TextColour colour( TextColour::ResultError );
|
||||||
stream << "\nNo assertions in section, '" << _sectionStats.sectionInfo.name << "'\n" << std::endl;
|
stream << "\nNo assertions in section, '" << _sectionStats.sectionInfo.name << "'\n" << std::endl;
|
||||||
}
|
}
|
||||||
m_printedCurrentSection = false;
|
m_headerPrinted = false;
|
||||||
StreamingReporterBase::sectionEnded( _sectionStats );
|
StreamingReporterBase::sectionEnded( _sectionStats );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7011,6 +7011,7 @@ namespace Catch {
|
|||||||
stream << "\nNo assertions in test case, '" << _testCaseStats.testInfo.name << "'\n" << std::endl;
|
stream << "\nNo assertions in test case, '" << _testCaseStats.testInfo.name << "'\n" << std::endl;
|
||||||
}
|
}
|
||||||
StreamingReporterBase::testCaseEnded( _testCaseStats );
|
StreamingReporterBase::testCaseEnded( _testCaseStats );
|
||||||
|
m_headerPrinted = false;
|
||||||
}
|
}
|
||||||
virtual void testGroupEnded( TestGroupStats const& _testGroupStats ) {
|
virtual void testGroupEnded( TestGroupStats const& _testGroupStats ) {
|
||||||
if( !unusedGroupInfo ) {
|
if( !unusedGroupInfo ) {
|
||||||
@ -7190,11 +7191,11 @@ namespace Catch {
|
|||||||
lazyPrintRunInfo();
|
lazyPrintRunInfo();
|
||||||
if( unusedGroupInfo )
|
if( unusedGroupInfo )
|
||||||
lazyPrintGroupInfo();
|
lazyPrintGroupInfo();
|
||||||
if( unusedTestCaseInfo )
|
|
||||||
lazyPrintTestCaseInfo();
|
|
||||||
if( currentSectionInfo && !m_printedCurrentSection )
|
|
||||||
lazyPrintSectionInfo();
|
|
||||||
|
|
||||||
|
if( !m_headerPrinted ) {
|
||||||
|
printTestCaseAndSectionHeader();
|
||||||
|
m_headerPrinted = true;
|
||||||
|
}
|
||||||
m_atLeastOneTestCasePrinted = true;
|
m_atLeastOneTestCasePrinted = true;
|
||||||
}
|
}
|
||||||
void lazyPrintRunInfo() {
|
void lazyPrintRunInfo() {
|
||||||
@ -7211,42 +7212,42 @@ namespace Catch {
|
|||||||
}
|
}
|
||||||
void lazyPrintGroupInfo() {
|
void lazyPrintGroupInfo() {
|
||||||
if( !unusedGroupInfo->name.empty() && unusedGroupInfo->groupsCounts > 1 ) {
|
if( !unusedGroupInfo->name.empty() && unusedGroupInfo->groupsCounts > 1 ) {
|
||||||
printHeader( "Group: " + unusedGroupInfo->name );
|
printClosedHeader( "Group: " + unusedGroupInfo->name );
|
||||||
unusedGroupInfo.reset();
|
unusedGroupInfo.reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void lazyPrintTestCaseInfo() {
|
void lazyPrintTestCaseInfo() {
|
||||||
if( !currentSectionInfo ) {
|
if( !currentSectionInfo ) {
|
||||||
printHeader( unusedTestCaseInfo->name );
|
printClosedHeader( unusedTestCaseInfo->name );
|
||||||
stream << std::endl;
|
stream << std::endl;
|
||||||
// unusedTestCaseInfo.reset();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void lazyPrintSectionInfo() {
|
void printTestCaseAndSectionHeader() {
|
||||||
|
printOpenHeader( unusedTestCaseInfo->name );
|
||||||
|
if( currentSectionInfo ) {
|
||||||
|
std::vector<ThreadedSectionInfo*> sections;
|
||||||
|
for( ThreadedSectionInfo* section = currentSectionInfo.get();
|
||||||
|
section;
|
||||||
|
section = section->parent )
|
||||||
|
sections.push_back( section );
|
||||||
|
|
||||||
std::vector<ThreadedSectionInfo*> sections;
|
// Sections
|
||||||
for( ThreadedSectionInfo* section = currentSectionInfo.get();
|
if( !sections.empty() ) {
|
||||||
section;
|
typedef std::vector<ThreadedSectionInfo*>::const_reverse_iterator It;
|
||||||
section = section->parent )
|
for( It it = sections.rbegin(), itEnd = sections.rend(); it != itEnd; ++it )
|
||||||
sections.push_back( section );
|
stream << " " << (*it)->name << "\n";
|
||||||
|
}
|
||||||
// Sections
|
|
||||||
if( !sections.empty() ) {
|
|
||||||
printHeader( unusedTestCaseInfo->name, false );
|
|
||||||
|
|
||||||
typedef std::vector<ThreadedSectionInfo*>::const_reverse_iterator It;
|
|
||||||
for( It it = sections.rbegin(), itEnd = sections.rend(); it != itEnd; ++it )
|
|
||||||
stream << " " << (*it)->name << "\n";
|
|
||||||
stream << getDots() << "\n" << std::endl;
|
|
||||||
}
|
}
|
||||||
m_printedCurrentSection = true;
|
stream << getDots() << "\n" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void printHeader( std::string const& _name, bool closed = true ) {
|
void printClosedHeader( std::string const& _name ) {
|
||||||
|
printOpenHeader( _name );
|
||||||
|
stream << getDots() << "\n";
|
||||||
|
}
|
||||||
|
void printOpenHeader( std::string const& _name ) {
|
||||||
stream << getDashes() << "\n"
|
stream << getDashes() << "\n"
|
||||||
<< _name << "\n";
|
<< _name << "\n";
|
||||||
if( closed )
|
|
||||||
stream << getDots() << "\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void printTotals( const Totals& totals ) {
|
void printTotals( const Totals& totals ) {
|
||||||
@ -7316,7 +7317,7 @@ namespace Catch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_printedCurrentSection;
|
bool m_headerPrinted;
|
||||||
bool m_atLeastOneTestCasePrinted;
|
bool m_atLeastOneTestCasePrinted;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user