Sections are, once again, eagerly entered.

When the section tracking code was rewritten a while back to simplify and iron out some bugs the order of evaluation was changed so that each new section was skipped on the first run through.
This had unwelcome consequences for some people.
This commit restores the original semantics (while maintaining the simpler, less buggy, new code).
This commit is contained in:
Phil Nash 2014-04-21 19:02:38 +01:00
parent d7e1790347
commit a020865990
10 changed files with 107 additions and 917 deletions

View file

@ -271,8 +271,8 @@ namespace Catch {
}
// If sections ended prematurely due to an exception we stored their
// infos here so we can tear them down outside the unwind process.
for( std::vector<UnfinishedSections>::const_iterator it = m_unfinishedSections.begin(),
itEnd = m_unfinishedSections.end();
for( std::vector<UnfinishedSections>::const_reverse_iterator it = m_unfinishedSections.rbegin(),
itEnd = m_unfinishedSections.rend();
it != itEnd;
++it )
sectionEnded( it->info, it->prevAssertions, it->durationInSeconds );