refactoring unit tests

This commit is contained in:
rusefi 2018-03-04 16:39:33 -05:00
parent f7b3e16d8f
commit f861d0aabe
2 changed files with 2 additions and 3 deletions

View File

@ -92,6 +92,8 @@ void EngineTestHelper::fireTriggerEvents2(int count, int durationUs) {
}
void EngineTestHelper::clearQueue() {
schedulingQueue.executeAll(99999999); // this is needed to clear 'isScheduled' flag
assertEqualsM("queue size/0", 0, schedulingQueue.size());
engine.iHead = NULL; // let's drop whatever was scheduled just to start from a clean state
}

View File

@ -329,8 +329,6 @@ void testRpmCalculator(void) {
assertEqualsM("index #1", 15, eth.engine.triggerCentral.triggerState.getCurrentIndex());
schedulingQueue.executeAll(99999999); // this is needed to clear 'isScheduled' flag
assertEqualsM("queue size/0", 0, schedulingQueue.size());
eth.clearQueue();
debugSignalExecutor = true;
@ -655,7 +653,6 @@ static void setTestBug299(EngineTestHelper *eth) {
eth->fireTriggerEvents2(1, MS2US(20));
assertEqualsM("RPM#2", 3000, engine->rpmCalculator.getRpm(PASS_ENGINE_PARAMETER_SIGNATURE));
schedulingQueue.executeAll(99999999); // this is needed to clear 'isScheduled' flag
eth->clearQueue();
/**