test coverage for antilag #4920

This commit is contained in:
Andrey 2022-12-30 12:11:57 -05:00
parent 3a3f12756b
commit 57d76d902f
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,16 @@
#include "pch.h"
TEST(Actuators, AntiLag) {
EngineTestHelper eth(TEST_ENGINE);
engineConfiguration->antiLagEnabled = true;
Sensor::setMockValue(SensorType::Clt, 70);
engine->periodicFastCallback();
ASSERT_EQ(1, engine->antilagController.ALSMinCLTCondition);
ASSERT_EQ(1, engine->antilagController.ALSMaxCLTCondition);
// todo: let's have this 'true'
ASSERT_EQ(0, engine->antilagController.isAntilagCondition);
}

View File

@ -104,6 +104,7 @@ TESTS_SRC_CPP = \
tests/sensor/test_turbocharger_speed_converter.cpp \
tests/sensor/test_vehicle_speed_converter.cpp \
tests/actuators/test_aux_valves.cpp \
tests/actuators/test_antilag.cpp \
tests/actuators/test_boost.cpp \
tests/actuators/test_dc_motor.cpp \
tests/actuators/test_etb.cpp \