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