Added warnings - first one: no assertions

This commit is contained in:
Phil Nash 2012-08-28 08:20:18 +01:00
parent 78c92e68aa
commit 55764c8d47
8 changed files with 59 additions and 12 deletions

View file

@ -129,6 +129,11 @@ namespace Catch {
}
virtual void EndSection( const std::string& sectionName, const Counts& assertions ) {
if( ( m_config.fullConfig.warnings & ConfigData::WarnAbout::NoAssertions ) && assertions.total() == 0 ) {
StartSpansLazily();
m_config.stream << "** No assertions in section **" << std::endl;
}
SpanInfo& sectionSpan = m_sectionSpans.back();
if( sectionSpan.emitted && !sectionSpan.name.empty() ) {
m_config.stream << "[End of section: '" << sectionName << "' ";