diff -r 33a55dda0884 -r f26dd3e3030b sourcehook/test/testevents.h --- a/sourcehook/test/testevents.h Sun Oct 21 21:18:40 2007 +0000 +++ b/sourcehook/test/testevents.h Sun Oct 21 21:47:53 2007 +0000 @@ -31,9 +31,25 @@ return (typeid(other) == typeid(this)) ? true : false; } + virtual bool Ignore() + { + return false; + } + virtual void Dump() = 0; }; +struct IgnoreState : public State +{ + virtual bool Ignore() + { + return true; + } + virtual void Dump() + { + } +}; + typedef std::list StateList; namespace { @@ -53,6 +69,8 @@ State *cs = va_arg(argptr, State*); if (!cs) break; + if (cs->Ignore()) + continue; requiredstates.push_back(cs); } va_end(argptr); @@ -86,6 +104,14 @@ } } + if (!ok && g_Verbose) + { + std::cout << std::endl << "FAIL: Should be:" << std::endl; + DumpStates(&requiredstates); + std::cout << std::endl << "FAIL: Is:" << std::endl; + DumpStates(sl); + } + for (StateList::iterator iter = requiredstates.begin(); iter != requiredstates.end(); ++iter) delete *iter; for (StateList::iterator iter = sl->begin(); iter != sl->end(); ++iter)