From 7c9a99fb72a2cb542451eaf289aed6557e01a210 Mon Sep 17 00:00:00 2001 From: rusefi Date: Thu, 10 Jan 2019 23:33:50 -0500 Subject: [PATCH] random test refactoring --- unit_tests/engine_test_helper.cpp | 2 +- unit_tests/tests/test_trigger_decoder.cpp | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/unit_tests/engine_test_helper.cpp b/unit_tests/engine_test_helper.cpp index 298e80d056..dbeb975190 100644 --- a/unit_tests/engine_test_helper.cpp +++ b/unit_tests/engine_test_helper.cpp @@ -93,7 +93,7 @@ void EngineTestHelper::firePrimaryTriggerFall() { } void EngineTestHelper::fireTriggerEventsWithDuration(int durationMs) { - fireTriggerEvents2(1, durationMs); + fireTriggerEvents2(/*count*/1, durationMs); } /** diff --git a/unit_tests/tests/test_trigger_decoder.cpp b/unit_tests/tests/test_trigger_decoder.cpp index 9db7d00d4c..b7f00e37c1 100644 --- a/unit_tests/tests/test_trigger_decoder.cpp +++ b/unit_tests/tests/test_trigger_decoder.cpp @@ -326,7 +326,7 @@ void testRpmCalculator(void) { assertEquals(5, TRIGGER_SHAPE(triggerIndexByAngle[240])); assertEquals(5, TRIGGER_SHAPE(triggerIndexByAngle[241])); - eth.fireTriggerEvents(48); + eth.fireTriggerEvents(/* count */ 48); assertEqualsM("RPM", 1500, engine->rpmCalculator.getRpm(PASS_ENGINE_PARAMETER_SIGNATURE)); assertEqualsM("index #1", 15, engine->triggerCentral.triggerState.getCurrentIndex()); @@ -343,9 +343,6 @@ void testRpmCalculator(void) { int start = eth.getTimeNowUs(); assertEqualsM("start value", 485000, start); - // todo: why is this required here? we already have one 'prepareOutputSignals' in constructor, what's wrong with it? - prepareOutputSignals(PASS_ENGINE_PARAMETER_SIGNATURE); - eth.engine.periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE); assertEqualsM("fuel #1", 4.5450, engine->injectionDuration);