refactoring unit tests
This commit is contained in:
parent
d4f24f8da8
commit
ac003bbaad
|
@ -92,6 +92,8 @@ void EngineTestHelper::fireTriggerEvents2(int count, int durationUs) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EngineTestHelper::clearQueue() {
|
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
|
engine.iHead = NULL; // let's drop whatever was scheduled just to start from a clean state
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -329,8 +329,6 @@ void testRpmCalculator(void) {
|
||||||
assertEqualsM("index #1", 15, eth.engine.triggerCentral.triggerState.getCurrentIndex());
|
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();
|
eth.clearQueue();
|
||||||
|
|
||||||
debugSignalExecutor = true;
|
debugSignalExecutor = true;
|
||||||
|
@ -655,7 +653,6 @@ static void setTestBug299(EngineTestHelper *eth) {
|
||||||
eth->fireTriggerEvents2(1, MS2US(20));
|
eth->fireTriggerEvents2(1, MS2US(20));
|
||||||
assertEqualsM("RPM#2", 3000, engine->rpmCalculator.getRpm(PASS_ENGINE_PARAMETER_SIGNATURE));
|
assertEqualsM("RPM#2", 3000, engine->rpmCalculator.getRpm(PASS_ENGINE_PARAMETER_SIGNATURE));
|
||||||
|
|
||||||
schedulingQueue.executeAll(99999999); // this is needed to clear 'isScheduled' flag
|
|
||||||
eth->clearQueue();
|
eth->clearQueue();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue