Tidied up reporting of missing assertions in test cases

- also removed basic reporter from approval test
This commit is contained in:
Phil Nash
2013-07-26 19:19:44 +01:00
parent 801672b962
commit b80280f428
4 changed files with 42 additions and 2829 deletions

View File

@@ -62,7 +62,11 @@ namespace Catch {
if( _sectionStats.missingAssertions ) {
lazyPrint();
Colour colour( Colour::ResultError );
stream << "\nNo assertions in section, '" << _sectionStats.sectionInfo.name << "'\n" << std::endl;
if( currentSectionInfo->parent )
stream << "\nNo assertions in section";
else
stream << "\nNo assertions in test case";
stream << " '" << _sectionStats.sectionInfo.name << "'\n" << std::endl;
}
m_headerPrinted = false;
StreamingReporterBase::sectionEnded( _sectionStats );
@@ -262,6 +266,7 @@ namespace Catch {
}
void printTestCaseAndSectionHeader() {
printOpenHeader( unusedTestCaseInfo->name );
assert( currentSectionInfo );
if( currentSectionInfo ) {
Colour colourGuard( Colour::Headers );
std::vector<ThreadedSectionInfo*> sections;