rusefi/unit_tests/tests/trigger/test_real_gm_24x.cpp

24 lines
670 B
C++
Raw Normal View History

#include "pch.h"
#include "logicdata_csv_reader.h"
TEST(crankingGm24x, gmRealCrankingFromFile) {
CsvReader reader(1, /* vvtCount */ 0);
2022-09-24 12:33:01 -07:00
reader.open("tests/trigger/resources/gm_24x_cranking.csv", SINGLE_TRIGGER_FIRST);
EngineTestHelper eth(TEST_ENGINE);
engineConfiguration->isFasterEngineSpinUpEnabled = true;
engineConfiguration->alwaysInstantRpm = true;
eth.setTriggerType(TT_GM_24x);
while (reader.haveMore()) {
reader.processLine(&eth);
engine->rpmCalculator.onSlowCallback();
}
ASSERT_EQ( 0, eth.recentWarnings()->getCount())<< "warningCounter#vwRealCranking";
ASSERT_EQ( 139, round(Sensor::getOrZero(SensorType::Rpm)))<< reader.lineIndex();
}