mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 07:16:10 +01:00
TAP Reporter: count success tests even if not printed
This fixes a bug whereas running the TAP reporter without the -s switch causes the reporter to print 1..0.
This commit is contained in:
parent
470561cbbd
commit
da023b2f9a
@ -46,6 +46,7 @@ namespace Catch {
|
|||||||
|
|
||||||
virtual bool assertionEnded( AssertionStats const& _assertionStats ) {
|
virtual bool assertionEnded( AssertionStats const& _assertionStats ) {
|
||||||
AssertionResult const& result = _assertionStats.assertionResult;
|
AssertionResult const& result = _assertionStats.assertionResult;
|
||||||
|
++counter;
|
||||||
|
|
||||||
bool printInfoMessages = true;
|
bool printInfoMessages = true;
|
||||||
|
|
||||||
@ -56,7 +57,7 @@ namespace Catch {
|
|||||||
printInfoMessages = false;
|
printInfoMessages = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
AssertionPrinter printer( stream, _assertionStats, printInfoMessages, ++counter );
|
AssertionPrinter printer( stream, _assertionStats, printInfoMessages, counter );
|
||||||
printer.print();
|
printer.print();
|
||||||
stream << " # " << currentTestCaseInfo->name ;
|
stream << " # " << currentTestCaseInfo->name ;
|
||||||
|
|
||||||
@ -75,7 +76,7 @@ namespace Catch {
|
|||||||
class AssertionPrinter {
|
class AssertionPrinter {
|
||||||
void operator= ( AssertionPrinter const& );
|
void operator= ( AssertionPrinter const& );
|
||||||
public:
|
public:
|
||||||
AssertionPrinter( std::ostream& _stream, AssertionStats const& _stats, bool _printInfoMessages, size_t counter = 0 )
|
AssertionPrinter( std::ostream& _stream, AssertionStats const& _stats, bool _printInfoMessages, size_t counter )
|
||||||
: stream( _stream )
|
: stream( _stream )
|
||||||
, stats( _stats )
|
, stats( _stats )
|
||||||
, result( _stats.assertionResult )
|
, result( _stats.assertionResult )
|
||||||
|
Loading…
Reference in New Issue
Block a user