mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-23 11:43:29 +01:00
Fixed SCOPED_INFO (#123)
This commit is contained in:
parent
5f66d1d001
commit
ec2fccf6b8
@ -35,8 +35,8 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
std::string getInfo () const {
|
||||
return m_oss.str();
|
||||
ResultInfo getInfo () const {
|
||||
return ResultInfo( "", ResultWas::Info, false, SourceLineInfo(), "SCOPED_INFO", m_oss.str().c_str() );
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -156,10 +156,18 @@ namespace Catch {
|
||||
else if( !result.ok() ) {
|
||||
m_totals.assertions.failed++;
|
||||
|
||||
std::vector<ResultInfo>::const_iterator it = m_info.begin();
|
||||
std::vector<ResultInfo>::const_iterator itEnd = m_info.end();
|
||||
for(; it != itEnd; ++it )
|
||||
m_reporter->Result( *it );
|
||||
{
|
||||
std::vector<ScopedInfo*>::const_iterator it = m_scopedInfos.begin();
|
||||
std::vector<ScopedInfo*>::const_iterator itEnd = m_scopedInfos.end();
|
||||
for(; it != itEnd; ++it )
|
||||
m_reporter->Result( (*it)->getInfo() );
|
||||
}
|
||||
{
|
||||
std::vector<ResultInfo>::const_iterator it = m_info.begin();
|
||||
std::vector<ResultInfo>::const_iterator itEnd = m_info.end();
|
||||
for(; it != itEnd; ++it )
|
||||
m_reporter->Result( *it );
|
||||
}
|
||||
m_info.clear();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user