anna::xml::Node* result = TestStep::asXML(parent);
//parent->createChild("TestStepDelay");
- result->createAttribute("Delay", a_delay.asString());
+ result->createAttribute("Delay", ((a_delay == 0) ? "dummy step, no delay" : a_delay.asString()));
return result;
}
bool TestStepDelay::do_execute() throw() {
+ if (a_delay == 0) { complete(); return true; } // special case
try {
a_timer = TestManager::instantiate().createTimer((TestCaseStep*)this, a_delay, TestTimer::Type::Delay);
}
}
void TestStepDelay::do_complete() throw() {
+ if (a_delay == 0) return; // special case
a_timer = NULL;
next(); // next() invoked here because execute() is always false for delay and never advance the iterator
// TODO, avoid this recursion
}
void TestStepDelay::do_reset() throw() {
+ if (a_delay == 0) return; // special case
try {
TestManager::instantiate().cancelTimer(a_timer);
}