Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincenzo Innocente committed Jun 7, 2007
1 parent aba5467 commit 8c4bdc6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions PerfTools/Callgrind/test/ProfilerServiceTest.cppunit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,12 @@ struct CheckPaths {
void operator()(std::string const & path) const {
bool found = std::find(selpaths.begin(),selpaths.end(),path)!= selpaths.end();
bool ok = ps.doEvent() && ( exc ? !found : found);
noselPath();
noselPath(true);
ps.beginPath(path);
if (ok) selPath(path);
else noselPath();
ps.endPath(path);
noselPath();
noselPath(true);
}

void selPath(const std::string & path) const {
Expand All @@ -284,10 +284,11 @@ struct CheckPaths {
doSomething(path);
}

void noselPath() const {
void noselPath(bool f=false) const {
CPPUNIT_ASSERT(ps.m_active==base);
CPPUNIT_ASSERT(ps.m_activePath.empty());
CPPUNIT_ASSERT((!exc)||ps.m_paused);
CPPUNIT_ASSERT(f||(!exc)||ps.m_paused);
CPPUNIT_ASSERT(!(f&&ps.m_paused));
doSomethingElse("else");
}

Expand Down

0 comments on commit 8c4bdc6

Please sign in to comment.