mirror of
https://github.com/catchorg/Catch2.git
synced 2025-06-02 18:07:59 +00:00
Added warnings - first one: no assertions
This commit is contained in:
parent
78c92e68aa
commit
55764c8d47
8 changed files with 59 additions and 12 deletions
|
@ -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 << "' ";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue