From 2c24b1b7f7ed29ea41d954ad1a2a7713d1774965 Mon Sep 17 00:00:00 2001 From: rusefi Date: Wed, 16 Oct 2019 16:46:34 -0400 Subject: [PATCH] preparing for #973 wall wetting was not covered by any unit test?! --- unit_tests/tests/test_accel_enrichment.cpp | 4 +-- unit_tests/tests/test_fuelCut.cpp | 5 ++-- unit_tests/tests/test_fuel_wall_wetting.cpp | 28 +++++++++++++++++++++ unit_tests/tests/tests.mk | 2 +- 4 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 unit_tests/tests/test_fuel_wall_wetting.cpp diff --git a/unit_tests/tests/test_accel_enrichment.cpp b/unit_tests/tests/test_accel_enrichment.cpp index 2f504c73b9..993b55a836 100644 --- a/unit_tests/tests/test_accel_enrichment.cpp +++ b/unit_tests/tests/test_accel_enrichment.cpp @@ -1,7 +1,7 @@ /** * @file test_accel_enrichment.cpp * - * Created on: apr 29, 2014 + * @date Apr 29, 2014 * Author: Dmitry Sidin * Author: Andrey Belomutskiy, (c) 2012-2018 */ @@ -11,7 +11,7 @@ #include "accel_enrichment.h" #include "engine_test_helper.h" -TEST(big, testAccelEnrichment) { +TEST(fuel, testTpsAccelEnrichment) { printf("====================================================================================== testAccelEnrichment\r\n"); WITH_ENGINE_TEST_HELPER(FORD_ASPIRE_1996); diff --git a/unit_tests/tests/test_fuelCut.cpp b/unit_tests/tests/test_fuelCut.cpp index e70ca0301c..aac2da0cfa 100644 --- a/unit_tests/tests/test_fuelCut.cpp +++ b/unit_tests/tests/test_fuelCut.cpp @@ -1,7 +1,8 @@ /* - * test_fuelCut.cpp + * @file test_fuelCut.cpp * - * Created on: Mar 22, 2018 + * @date Mar 22, 2018 + * @author Andrey Belomutskiy, (c) 2012-2019 */ #include "engine_math.h" diff --git a/unit_tests/tests/test_fuel_wall_wetting.cpp b/unit_tests/tests/test_fuel_wall_wetting.cpp new file mode 100644 index 0000000000..810960c9f5 --- /dev/null +++ b/unit_tests/tests/test_fuel_wall_wetting.cpp @@ -0,0 +1,28 @@ +/* + * @file test_fuel_wall_wetting.cpp + * + * See also test_accel_enrichment.cpp + * + * @date Oct 16, 2019 + * @author Andrey Belomutskiy, (c) 2012-2019 + */ + + +#include "engine_test_helper.h" + + +TEST(fuel, testWallWettingEnrichment) { + WITH_ENGINE_TEST_HELPER(FORD_ASPIRE_1996); + + engineConfiguration->wwaeTau = 1.0f; + engineConfiguration->wwaeBeta = 0.40f; + + engine->rpmCalculator.setRpmValue(3000 PASS_ENGINE_PARAMETER_SUFFIX); + + ASSERT_NEAR(16.6666, ENGINE(wallFuel).adjust(0, 10.0 PASS_ENGINE_PARAMETER_SUFFIX), EPS4D); + + + ASSERT_NEAR(16.198, ENGINE(wallFuel).adjust(0, 10.0 PASS_ENGINE_PARAMETER_SUFFIX), EPS4D); + + +} diff --git a/unit_tests/tests/tests.mk b/unit_tests/tests/tests.mk index 3bc2de1b28..6eece7e57c 100644 --- a/unit_tests/tests/tests.mk +++ b/unit_tests/tests/tests.mk @@ -15,6 +15,7 @@ TESTS_SRC_CPP = \ tests/test_trigger_noiseless.cpp \ tests/test_issue_898.cpp \ tests/test_fuel_map.cpp \ + tests/test_fuel_wall_wetting.cpp \ tests/test_one_cylinder_logic.cpp \ tests/test_maf2map.cpp \ tests/test_fuelCut.cpp \ @@ -29,7 +30,6 @@ TESTS_SRC_CPP = \ tests/test_pid.cpp \ tests/test_accel_enrichment.cpp \ tests/test_gpiochip.cpp \ -\ tests/sensor/basic_sensor.cpp \ tests/sensor/func_sensor.cpp \ tests/sensor/function_pointer_sensor.cpp \