parent
c62deeb12a
commit
415b3d55df
|
@ -19,7 +19,7 @@ static std::unique_ptr<EngineTestHelper> ethPtr;
|
|||
static EngineTestHelper* getEth() {
|
||||
if (!ethPtr) {
|
||||
printf("make_unique<EngineTestHelper>(TEST_ENGINE)\n");
|
||||
ethPtr = std::make_unique<EngineTestHelper>(TEST_ENGINE);
|
||||
ethPtr = std::make_unique<EngineTestHelper>(engine_type_e::TEST_ENGINE);
|
||||
}
|
||||
return ethPtr.get();
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "fuel_math.h"
|
||||
|
||||
TEST(Actuators, AntiLag) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
engineConfiguration->antiLagEnabled = true;
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
TEST(Actuators, AuxValves) {
|
||||
Sensor::setMockValue(SensorType::DriverThrottleIntent, 0);
|
||||
|
||||
EngineTestHelper eth(NISSAN_PRIMERA);
|
||||
EngineTestHelper eth(engine_type_e::NISSAN_PRIMERA);
|
||||
|
||||
// Engine must be "spinning" for scheduleByAngle to work
|
||||
engine->rpmCalculator.setRpmValue(1000);
|
||||
|
|
|
@ -12,7 +12,7 @@ TEST(BoostControl, Setpoint) {
|
|||
EXPECT_CALL(targetMap, getValue(_, _))
|
||||
.WillRepeatedly([](float xRpm, float tps) { return tps; });
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
engineConfiguration->boostType = CLOSED_LOOP;
|
||||
|
||||
BoostController bc;
|
||||
|
@ -32,7 +32,7 @@ TEST(BoostControl, Setpoint) {
|
|||
}
|
||||
|
||||
TEST(BoostControl, ObservePlant) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
BoostController bc;
|
||||
|
||||
|
@ -53,7 +53,7 @@ TEST(BoostControl, OpenLoop) {
|
|||
EXPECT_CALL(openMap, getValue(_, _))
|
||||
.WillRepeatedly([](float xRpm, float tps) { return tps; });
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
BoostController bc;
|
||||
|
||||
|
@ -68,7 +68,7 @@ TEST(BoostControl, OpenLoop) {
|
|||
}
|
||||
|
||||
TEST(BoostControl, TestClosedLoop) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
BoostController bc;
|
||||
|
||||
|
@ -107,7 +107,7 @@ TEST(BoostControl, TestClosedLoop) {
|
|||
}
|
||||
|
||||
TEST(BoostControl, SetOutput) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
engineConfiguration->isBoostControlEnabled = true;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ using ::testing::StrictMock;
|
|||
TEST(etb, initializationNoPedal) {
|
||||
StrictMock<MockEtb> mocks[ETB_COUNT];
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
for (int i = 0; i < ETB_COUNT; i++) {
|
||||
engine->etbControllers[i] = &mocks[i];
|
||||
|
@ -37,7 +37,7 @@ TEST(etb, initializationNoPedal) {
|
|||
TEST(etb, initializationMissingThrottle) {
|
||||
StrictMock<MockEtb> mocks[ETB_COUNT];
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE, [](engine_configuration_s* engineConfiguration) {
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE, [](engine_configuration_s* engineConfiguration) {
|
||||
engineConfiguration->etbFunctions[0] = DC_None;
|
||||
engineConfiguration->etbFunctions[1] = DC_None;
|
||||
});
|
||||
|
@ -63,7 +63,7 @@ TEST(etb, initializationSingleThrottle) {
|
|||
EXPECT_CALL(mocks[0], isEtbMode())
|
||||
.WillOnce(Return(TRUE));
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE, [](engine_configuration_s* engineConfiguration) {
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE, [](engine_configuration_s* engineConfiguration) {
|
||||
engineConfiguration->etbFunctions[0] = DC_Throttle1;
|
||||
engineConfiguration->etbFunctions[1] = DC_None;
|
||||
});
|
||||
|
@ -91,7 +91,7 @@ TEST(etb, initializationSingleThrottleInSecondSlot) {
|
|||
EXPECT_CALL(mocks[1], isEtbMode())
|
||||
.WillOnce(Return(TRUE));
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE, [](engine_configuration_s* engineConfiguration) {
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE, [](engine_configuration_s* engineConfiguration) {
|
||||
engineConfiguration->etbFunctions[0] = DC_None;
|
||||
engineConfiguration->etbFunctions[1] = DC_Throttle1;
|
||||
});
|
||||
|
@ -121,7 +121,7 @@ TEST(etb, initializationDualThrottle) {
|
|||
EXPECT_CALL(mocks[1], isEtbMode())
|
||||
.WillOnce(Return(TRUE));
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
for (int i = 0; i < ETB_COUNT; i++) {
|
||||
engine->etbControllers[i] = &mocks[i];
|
||||
|
@ -152,7 +152,7 @@ TEST(etb, initializationWastegate) {
|
|||
EXPECT_CALL(mocks[0], isEtbMode())
|
||||
.WillOnce(Return(false));
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE, [](engine_configuration_s* engineConfiguration) {
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE, [](engine_configuration_s* engineConfiguration) {
|
||||
engineConfiguration->etbFunctions[0] = DC_Wastegate;
|
||||
engineConfiguration->etbFunctions[1] = DC_None;
|
||||
});
|
||||
|
@ -231,7 +231,7 @@ TEST(etb, initializationNoThrottles) {
|
|||
// This tests the case where you don't want an ETB, and expect everything to go fine
|
||||
EtbController duts[2];
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
for (int i = 0; i < ETB_COUNT; i++) {
|
||||
engine->etbControllers[i] = &duts[i];
|
||||
|
@ -254,7 +254,7 @@ TEST(etb, initializationNoThrottles) {
|
|||
TEST(etb, idlePlumbing) {
|
||||
StrictMock<MockEtb> mocks[ETB_COUNT];
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
Sensor::setMockValue(SensorType::AcceleratorPedal, 50.0f, true);
|
||||
|
||||
|
@ -268,7 +268,7 @@ TEST(etb, idlePlumbing) {
|
|||
}
|
||||
|
||||
TEST(etb, testSetpointOnlyPedal) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
EtbController etb;
|
||||
|
||||
|
@ -327,7 +327,7 @@ TEST(etb, testSetpointOnlyPedal) {
|
|||
}
|
||||
|
||||
TEST(etb, setpointSecondThrottleTrim) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
// Mock pedal map that's just passthru pedal -> target
|
||||
StrictMock<MockVp3d> pedalMap;
|
||||
|
@ -354,7 +354,7 @@ TEST(etb, setpointSecondThrottleTrim) {
|
|||
}
|
||||
|
||||
TEST(etb, setpointIdle) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
// Use ETB for idle, but don't give it any range (yet)
|
||||
engineConfiguration->etbIdleThrottleRange = 0;
|
||||
|
@ -410,7 +410,7 @@ TEST(etb, setpointIdle) {
|
|||
}
|
||||
|
||||
TEST(etb, setpointRevLimit) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
// Configure 5000 limit start, with 750 rpm taper
|
||||
engineConfiguration->etbRevLimitStart = 5000;
|
||||
|
@ -504,7 +504,7 @@ TEST(etb, setpointWastegateController) {
|
|||
}
|
||||
|
||||
TEST(etb, setpointLuaAdder) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
// Must have TPS & PPS initialized for ETB setup
|
||||
Sensor::setMockValue(SensorType::Tps1Primary, 0);
|
||||
|
@ -594,7 +594,7 @@ TEST(etb, etbTpsSensor) {
|
|||
}
|
||||
|
||||
TEST(etb, setOutputInvalid) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
// Redundant TPS & accelerator pedal required for init
|
||||
Sensor::setMockValue(SensorType::Tps1Primary, 0);
|
||||
|
@ -613,7 +613,7 @@ TEST(etb, setOutputInvalid) {
|
|||
}
|
||||
|
||||
TEST(etb, setOutputValid) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
StrictMock<MockMotor> motor;
|
||||
|
||||
// Must have TPS & PPS initialized for ETB setup
|
||||
|
@ -633,7 +633,7 @@ TEST(etb, setOutputValid) {
|
|||
}
|
||||
|
||||
TEST(etb, setOutputValid2) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
StrictMock<MockMotor> motor;
|
||||
|
||||
// Must have TPS & PPS initialized for ETB setup
|
||||
|
@ -653,7 +653,7 @@ TEST(etb, setOutputValid2) {
|
|||
}
|
||||
|
||||
TEST(etb, setOutputOutOfRangeHigh) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
StrictMock<MockMotor> motor;
|
||||
|
||||
// Must have TPS & PPS initialized for ETB setup
|
||||
|
@ -673,7 +673,7 @@ TEST(etb, setOutputOutOfRangeHigh) {
|
|||
}
|
||||
|
||||
TEST(etb, setOutputOutOfRangeLow) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
StrictMock<MockMotor> motor;
|
||||
|
||||
// Must have TPS & PPS initialized for ETB setup
|
||||
|
@ -693,7 +693,7 @@ TEST(etb, setOutputOutOfRangeLow) {
|
|||
}
|
||||
|
||||
TEST(etb, setOutputPauseControl) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
StrictMock<MockMotor> motor;
|
||||
|
||||
// Must have TPS & PPS initialized for ETB setup
|
||||
|
@ -714,7 +714,7 @@ TEST(etb, setOutputPauseControl) {
|
|||
}
|
||||
|
||||
TEST(etb, setOutputLimpHome) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
StrictMock<MockMotor> motor;
|
||||
|
||||
// Must have TPS & PPS initialized for ETB setup
|
||||
|
@ -766,7 +766,7 @@ TEST(etb, closedLoopPid) {
|
|||
extern int timeNowUs;
|
||||
|
||||
TEST(etb, jamDetection) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
pid_s pid = {};
|
||||
|
||||
|
@ -817,7 +817,7 @@ TEST(etb, jamDetection) {
|
|||
}
|
||||
|
||||
TEST(etb, openLoopThrottle) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
// Redundant TPS & accelerator pedal required for init
|
||||
Sensor::setMockValue(SensorType::Tps1Primary, 0);
|
||||
|
@ -839,7 +839,7 @@ TEST(etb, openLoopThrottle) {
|
|||
}
|
||||
|
||||
TEST(etb, openLoopNonThrottle) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
// Redundant TPS & accelerator pedal required for init
|
||||
Sensor::setMockValue(SensorType::Tps1Primary, 0);
|
||||
|
|
|
@ -24,7 +24,7 @@ static EtbController * initEtbIntegratedTest() {
|
|||
}
|
||||
|
||||
TEST(etb, integrated) {
|
||||
EngineTestHelper eth(TEST_ENGINE); // we have a destructor so cannot move EngineTestHelper into utility method
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE); // we have a destructor so cannot move EngineTestHelper into utility method
|
||||
EtbController *etb = initEtbIntegratedTest();
|
||||
|
||||
Sensor::setMockValue(SensorType::AcceleratorPedalPrimary, 40);
|
||||
|
@ -51,7 +51,7 @@ extern int timeNowUs;
|
|||
extern WarningCodeState unitTestWarningCodeState;
|
||||
|
||||
TEST(etb, intermittentTps) {
|
||||
EngineTestHelper eth(TEST_ENGINE); // we have a destructor so cannot move EngineTestHelper into utility method
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE); // we have a destructor so cannot move EngineTestHelper into utility method
|
||||
EtbController *etb = initEtbIntegratedTest();
|
||||
warningBuffer_t &recentWarnings = unitTestWarningCodeState.recentWarnings;
|
||||
recentWarnings.clear();
|
||||
|
@ -108,7 +108,7 @@ TEST(etb, intermittentTps) {
|
|||
}
|
||||
|
||||
TEST(etb, intermittentPps) {
|
||||
EngineTestHelper eth(TEST_ENGINE); // we have a destructor so cannot move EngineTestHelper into utility method
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE); // we have a destructor so cannot move EngineTestHelper into utility method
|
||||
|
||||
Sensor::setMockValue(SensorType::AcceleratorPedal, 10, true);
|
||||
EtbController *etb = initEtbIntegratedTest();
|
||||
|
@ -153,7 +153,7 @@ TEST(etb, intermittentPps) {
|
|||
}
|
||||
|
||||
TEST(etb, sentTpsIntegrated) {
|
||||
EngineTestHelper eth(TEST_ENGINE); // we have a destructor so cannot move EngineTestHelper into utility method
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE); // we have a destructor so cannot move EngineTestHelper into utility method
|
||||
|
||||
engineConfiguration->sentInputPins[0] = Gpio::B3;
|
||||
engineConfiguration->sentEtbType = SentEtbType::GM_TYPE_1;
|
||||
|
@ -168,7 +168,7 @@ TEST(etb, sentTpsIntegrated) {
|
|||
}
|
||||
|
||||
TEST(etb, sentTpsIntegratedDecode) {
|
||||
EngineTestHelper eth(TEST_ENGINE); // we have a destructor so cannot move EngineTestHelper into utility method
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE); // we have a destructor so cannot move EngineTestHelper into utility method
|
||||
|
||||
engineConfiguration->sentEtbType = SentEtbType::GM_TYPE_1;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include "fan_control.h"
|
||||
|
||||
TEST(Actuators, Fan) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
engineConfiguration->fanOnTemperature = 90;
|
||||
engineConfiguration->fanOffTemperature = 80;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
extern int timeNowUs;
|
||||
|
||||
TEST(Actuators, FuelPump) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
FuelPumpController dut;
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ TEST(GpPwm, OutputOnOff) {
|
|||
}
|
||||
|
||||
TEST(GpPwm, TestGetOutput) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
GppwmChannel ch;
|
||||
|
||||
gppwm_channel cfg;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include "main_relay.h"
|
||||
|
||||
TEST(Actuators, MainRelay) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
MainRelayController dut;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ extern float getTachDuty(void);
|
|||
|
||||
TEST(Actuators, Tachometer) {
|
||||
// This engine has a tach pin set - we need that
|
||||
EngineTestHelper eth(FRANKENSO_MAZDA_MIATA_2003);
|
||||
EngineTestHelper eth(engine_type_e::FRANKENSO_MAZDA_MIATA_2003);
|
||||
|
||||
// We don't actually care about ign/inj at all, just tach
|
||||
engineConfiguration->isInjectionEnabled = false;
|
||||
|
|
|
@ -6,7 +6,7 @@ using ::testing::StrictMock;
|
|||
using ::testing::Return;
|
||||
|
||||
TEST(Vvt, TestSetPoint) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
// Set up a mock target map
|
||||
StrictMock<MockVp3d> targetMap;
|
||||
|
@ -25,7 +25,7 @@ TEST(Vvt, TestSetPoint) {
|
|||
}
|
||||
|
||||
TEST(Vvt, observePlant) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
engine->triggerCentral.vvtPosition[0][0] = 23;
|
||||
|
||||
|
@ -43,7 +43,7 @@ TEST(Vvt, openLoop) {
|
|||
}
|
||||
|
||||
TEST(Vvt, ClosedLoopNotInverted) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
VvtController dut;
|
||||
dut.init(0, 0, 0, nullptr);
|
||||
|
@ -58,7 +58,7 @@ TEST(Vvt, ClosedLoopNotInverted) {
|
|||
}
|
||||
|
||||
TEST(Vvt, ClosedLoopInverted) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
VvtController dut;
|
||||
dut.init(0, 0, 0, nullptr);
|
||||
|
|
|
@ -30,7 +30,7 @@ static void doRevolution(EngineTestHelper& eth, int periodMs) {
|
|||
|
||||
// https://github.com/rusefi/rusefi/issues/1592
|
||||
TEST(fuelControl, transitionIssue1592) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
engine->tdcMarkEnabled = false;
|
||||
setupSimpleTestEngineWithMafAndTT_ONE_trigger(ð, IM_SEQUENTIAL);
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
TEST(scheduler, dwellIssue796) {
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
setupSimpleTestEngineWithMafAndTT_ONE_trigger(ð, IM_SEQUENTIAL);
|
||||
|
||||
eth.fireTriggerEvents2(4 /* count */ , 600 /* ms */);
|
||||
|
|
|
@ -16,7 +16,7 @@ using ::testing::_;
|
|||
#define EXPECT_CUT() EXPECT_FLOAT_EQ(0, engine->engineState.injectionDuration)
|
||||
|
||||
TEST(fuelCut, coasting) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
EXPECT_CALL(*eth.mockAirmass, getAirmass(_, _))
|
||||
.WillRepeatedly(Return(AirmassResult{0.1008f, 50.0f}));
|
||||
|
||||
|
@ -131,7 +131,7 @@ TEST(fuelCut, coasting) {
|
|||
}
|
||||
|
||||
TEST(fuelCut, delay) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
EXPECT_CALL(*eth.mockAirmass, getAirmass(_, _))
|
||||
.WillRepeatedly(Return(AirmassResult{0.1008f, 50.0f}));
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ public:
|
|||
};
|
||||
|
||||
TEST(FuelComputer, getCycleFuel) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
MockFuelComputer dut;
|
||||
|
||||
|
@ -30,7 +30,7 @@ TEST(FuelComputer, getCycleFuel) {
|
|||
}
|
||||
|
||||
TEST(FuelComputer, FlexFuel) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
FuelComputer dut;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ using ::testing::FloatNear;
|
|||
|
||||
TEST(misc, testFuelMap) {
|
||||
printf("Setting up FORD_ASPIRE_1996\r\n");
|
||||
EngineTestHelper eth(FORD_ASPIRE_1996);
|
||||
EngineTestHelper eth(engine_type_e::FORD_ASPIRE_1996);
|
||||
|
||||
for (int i = 0; i < VBAT_INJECTOR_CURVE_SIZE; i++) {
|
||||
engineConfiguration->injector.battLagCorrBins[i] = i;
|
||||
|
@ -129,7 +129,7 @@ static void configureFordAspireTriggerWaveform(TriggerWaveform * s) {
|
|||
TEST(misc, testAngleResolver) {
|
||||
printf("*************************************************** testAngleResolver\r\n");
|
||||
|
||||
EngineTestHelper eth(FORD_ASPIRE_1996);
|
||||
EngineTestHelper eth(engine_type_e::FORD_ASPIRE_1996);
|
||||
|
||||
engineConfiguration->globalTriggerAngleOffset = 175;
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ using ::testing::InSequence;
|
|||
using ::testing::_;
|
||||
|
||||
TEST(FuelMath, getStandardAirCharge) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
// Miata 1839cc 4cyl
|
||||
engineConfiguration->displacement = 1.839f;
|
||||
|
@ -37,7 +37,7 @@ TEST(FuelMath, getStandardAirCharge) {
|
|||
}
|
||||
|
||||
TEST(AirmassModes, AlphaNNormal) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
// 4 cylinder 4 liter = easy math
|
||||
engineConfiguration->displacement = 4.0f;
|
||||
engineConfiguration->cylindersCount = 4;
|
||||
|
@ -61,7 +61,7 @@ TEST(AirmassModes, AlphaNNormal) {
|
|||
}
|
||||
|
||||
TEST(AirmassModes, AlphaNFailedTps) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
// Shouldn't get called
|
||||
StrictMock<MockVp3d> veTable;
|
||||
|
@ -78,7 +78,7 @@ TEST(AirmassModes, AlphaNFailedTps) {
|
|||
}
|
||||
|
||||
TEST(AirmassModes, MafNormal) {
|
||||
EngineTestHelper eth(FORD_ASPIRE_1996);
|
||||
EngineTestHelper eth(engine_type_e::FORD_ASPIRE_1996);
|
||||
engineConfiguration->fuelAlgorithm = LM_REAL_MAF;
|
||||
engineConfiguration->injector.flow = 200;
|
||||
|
||||
|
@ -119,7 +119,7 @@ TEST(AirmassModes, VeOverride) {
|
|||
}
|
||||
};
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
DummyAirmassModel dut(veTable);
|
||||
|
||||
// Use default mode - will call with 10
|
||||
|
@ -148,7 +148,7 @@ TEST(AirmassModes, FallbackMap) {
|
|||
EXPECT_CALL(mapFallback, getValue(5678, 20)).WillOnce(Return(75));
|
||||
}
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
SpeedDensityAirmass dut(veTable, mapFallback);
|
||||
|
||||
|
@ -167,7 +167,7 @@ TEST(AirmassModes, FallbackMap) {
|
|||
void setInjectionMode(int value);
|
||||
|
||||
TEST(FuelMath, testDifferentInjectionModes) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
setupSimpleTestEngineWithMafAndTT_ONE_trigger(ð);
|
||||
|
||||
EXPECT_CALL(*eth.mockAirmass, getAirmass(_, _))
|
||||
|
@ -192,7 +192,7 @@ TEST(FuelMath, testDifferentInjectionModes) {
|
|||
}
|
||||
|
||||
TEST(FuelMath, deadtime) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
setupSimpleTestEngineWithMafAndTT_ONE_trigger(ð);
|
||||
|
||||
|
@ -212,7 +212,7 @@ TEST(FuelMath, deadtime) {
|
|||
}
|
||||
|
||||
TEST(FuelMath, CylinderFuelTrim) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
EXPECT_CALL(*eth.mockAirmass, getAirmass(_, _))
|
||||
.WillRepeatedly(Return(AirmassResult{1, 50.0f}));
|
||||
|
@ -242,7 +242,7 @@ struct MockIdle : public MockIdleController {
|
|||
};
|
||||
|
||||
TEST(FuelMath, IdleVeTable) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
MockAirmass dut;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ struct MockWallController : public IWallFuelController {
|
|||
};
|
||||
|
||||
TEST(fuel, testWallWettingEnrichmentMath) {
|
||||
EngineTestHelper eth(FORD_ASPIRE_1996);
|
||||
EngineTestHelper eth(engine_type_e::FORD_ASPIRE_1996);
|
||||
|
||||
MockWallController wallController;
|
||||
|
||||
|
@ -62,7 +62,7 @@ TEST(fuel, testWallWettingEnrichmentMath) {
|
|||
|
||||
TEST(fuel, testWallWettingEnrichmentScheduling) {
|
||||
|
||||
EngineTestHelper eth(FORD_ASPIRE_1996);
|
||||
EngineTestHelper eth(engine_type_e::FORD_ASPIRE_1996);
|
||||
engineConfiguration->isFasterEngineSpinUpEnabled = false;
|
||||
|
||||
setCrankOperationMode();
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
using ::testing::_;
|
||||
|
||||
TEST(ignition, twoCoils) {
|
||||
EngineTestHelper eth(FRANKENSO_BMW_M73_F);
|
||||
EngineTestHelper eth(engine_type_e::FRANKENSO_BMW_M73_F);
|
||||
|
||||
// let's recalculate with zero timing so that we can focus on relation advance between cylinders
|
||||
setArrayValues(engine->engineState.timingAdvance, 0.0f);
|
||||
|
@ -43,7 +43,7 @@ TEST(ignition, twoCoils) {
|
|||
}
|
||||
|
||||
TEST(ignition, trailingSpark) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
engineConfiguration->isFasterEngineSpinUpEnabled = false;
|
||||
|
||||
/**
|
||||
|
@ -127,7 +127,7 @@ TEST(ignition, trailingSpark) {
|
|||
}
|
||||
|
||||
TEST(ignition, CylinderTimingTrim) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
// Base timing 15 degrees
|
||||
setTable(config->ignitionTable, 15);
|
||||
|
|
|
@ -106,7 +106,7 @@ TEST(InjectorModel, nonLinearFordMode) {
|
|||
}
|
||||
|
||||
TEST(InjectorModel, nonlinearPolynomial) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
InjectorModel dut;
|
||||
|
||||
engineConfiguration->applyNonlinearBelowPulse = 10;
|
||||
|
@ -130,7 +130,7 @@ TEST(InjectorModel, nonlinearPolynomial) {
|
|||
}
|
||||
|
||||
TEST(InjectorModel, Deadtime) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
// Some test data in the injector correction table
|
||||
for (size_t i = 0; i < efi::size(engineConfiguration->injector.battLagCorr); i++) {
|
||||
|
@ -172,7 +172,7 @@ TEST_P(FlowRateFixture, PressureRatio) {
|
|||
StrictMock<TesterGetRailPressure> dut;
|
||||
EXPECT_CALL(dut, getFuelDifferentialPressure()).WillOnce(Return(400 * pressureRatio));
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
// Use injector compensation
|
||||
engineConfiguration->injectorCompensationMode = ICM_SensedRailPressure;
|
||||
|
@ -187,7 +187,7 @@ TEST_P(FlowRateFixture, PressureRatio) {
|
|||
TEST(InjectorModel, NegativePressureDelta) {
|
||||
StrictMock<TesterGetRailPressure> dut;
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
// Use injector compensation
|
||||
engineConfiguration->injectorCompensationMode = ICM_SensedRailPressure;
|
||||
|
@ -204,7 +204,7 @@ TEST(InjectorModel, NegativePressureDelta) {
|
|||
TEST(InjectorModel, VariableInjectorFlowModeNone) {
|
||||
StrictMock<TesterGetRailPressure> dut;
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
engineConfiguration->injectorCompensationMode = ICM_None;
|
||||
|
||||
|
@ -215,7 +215,7 @@ TEST(InjectorModel, VariableInjectorFlowModeNone) {
|
|||
TEST(InjectorModel, RailPressureFixed) {
|
||||
InjectorModel dut;
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
// Reference pressure is 350kpa
|
||||
engineConfiguration->fuelReferencePressure = 350;
|
||||
|
@ -234,7 +234,7 @@ TEST(InjectorModel, RailPressureFixed) {
|
|||
TEST(InjectorModel, RailPressureSensedAbsolute) {
|
||||
InjectorModel dut;
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
// Reference pressure is 350kpa
|
||||
engineConfiguration->injectorCompensationMode = ICM_SensedRailPressure;
|
||||
|
@ -254,7 +254,7 @@ TEST(InjectorModel, RailPressureSensedAbsolute) {
|
|||
TEST(InjectorModel, RailPressureSensedGauge) {
|
||||
InjectorModel dut;
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
// Reference pressure is 350kpa
|
||||
engineConfiguration->injectorCompensationMode = ICM_SensedRailPressure;
|
||||
|
@ -275,7 +275,7 @@ TEST(InjectorModel, RailPressureSensedGauge) {
|
|||
TEST(InjectorModel, RailPressureSensedDifferential) {
|
||||
InjectorModel dut;
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
// Reference pressure is 350kpa
|
||||
engineConfiguration->injectorCompensationMode = ICM_SensedRailPressure;
|
||||
|
@ -293,7 +293,7 @@ TEST(InjectorModel, RailPressureSensedDifferential) {
|
|||
TEST(InjectorModel, FailedPressureSensor) {
|
||||
InjectorModel dut;
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
// Reference pressure is 350kpa
|
||||
engineConfiguration->injectorCompensationMode = ICM_SensedRailPressure;
|
||||
|
@ -311,7 +311,7 @@ TEST(InjectorModel, FailedPressureSensor) {
|
|||
TEST(InjectorModel, MissingPressureSensor) {
|
||||
InjectorModel dut;
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
// Reference pressure is 350kpa
|
||||
engineConfiguration->injectorCompensationMode = ICM_SensedRailPressure;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "advance_map.h"
|
||||
|
||||
TEST(Multispark, DefaultConfiguration) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
EXPECT_EQ(0, getMultiSparkCount(0 ));
|
||||
EXPECT_EQ(0, getMultiSparkCount(100 ));
|
||||
|
@ -37,7 +37,7 @@ static void multisparkCfg() {
|
|||
}
|
||||
|
||||
TEST(Multispark, EnabledNoMaxRpm) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
multisparkCfg();
|
||||
|
||||
|
@ -62,7 +62,7 @@ TEST(Multispark, EnabledNoMaxRpm) {
|
|||
}
|
||||
|
||||
TEST(Multispark, RpmLimit) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
multisparkCfg();
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "spark_logic.h"
|
||||
|
||||
TEST(issues, issueOneCylinderSpecialCase968) {
|
||||
EngineTestHelper eth(GY6_139QMB);
|
||||
EngineTestHelper eth(engine_type_e::GY6_139QMB);
|
||||
setTable(config->injectionPhase, -180.0f);
|
||||
engineConfiguration->isFasterEngineSpinUpEnabled = false;
|
||||
engine->tdcMarkEnabled = false;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "pch.h"
|
||||
|
||||
TEST(engine, testPlainCrankingWithoutAdvancedFeatures) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
setTable(config->injectionPhase, -180.0f);
|
||||
engineConfiguration->isFasterEngineSpinUpEnabled = false;
|
||||
engine->tdcMarkEnabled = false;
|
||||
|
@ -34,7 +34,7 @@ TEST(engine, testPlainCrankingWithoutAdvancedFeatures) {
|
|||
|
||||
|
||||
TEST(priming, startScheduling) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
ASSERT_EQ( 0, Sensor::getOrZero(SensorType::Rpm)) << "RPM=0";
|
||||
|
||||
|
@ -45,7 +45,7 @@ TEST(priming, startScheduling) {
|
|||
}
|
||||
|
||||
TEST(priming, duration) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
MockInjectorModel2 injectorModel;
|
||||
engine->module<InjectorModel>().set(&injectorModel);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "value_lookup.h"
|
||||
|
||||
TEST(LuaBasic, configLookup) {
|
||||
EngineTestHelper eth(FORD_ESCORT_GT);
|
||||
EngineTestHelper eth(engine_type_e::FORD_ESCORT_GT);
|
||||
{
|
||||
const char * name = "ignitionDwellForCrankingMs";
|
||||
setConfigValueByName(name, 1.6);
|
||||
|
|
|
@ -23,7 +23,7 @@ TEST(LuaHooks, TestCrc8) {
|
|||
}
|
||||
|
||||
TEST(LuaHooks, TestGetCalibration) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
const char* sourceCode = R"(
|
||||
|
||||
function testFunc()
|
||||
|
@ -35,7 +35,7 @@ TEST(LuaHooks, TestGetCalibration) {
|
|||
}
|
||||
|
||||
TEST(LuaHooks, TestSetCalibration) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
const char* sourceCode = R"(
|
||||
|
||||
function testFunc()
|
||||
|
@ -92,7 +92,7 @@ TEST(LuaHooks, Table3d) {
|
|||
end
|
||||
)";
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
setTable(config->scriptTable2, (uint8_t)33);
|
||||
EXPECT_EQ(testLuaReturnsNumber(tableTest), 33);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
|
||||
TEST(LuaVin, Test) {
|
||||
EngineTestHelper eth(TEST_CRANK_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_CRANK_ENGINE);
|
||||
|
||||
strcpy(engineConfiguration->vinNumber, "GM123");
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ end
|
|||
)";
|
||||
|
||||
TEST(LuaHooks, TestCurve) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
strcpy(engineConfiguration->scriptCurveName[3], "hello");
|
||||
setLinearCurve(config->scriptCurve4, 500, 600, 1);
|
||||
|
|
|
@ -50,7 +50,7 @@ public:
|
|||
*/
|
||||
TEST_F(FrequencySensorTest, testValidWithPwm) {
|
||||
ASSERT_TRUE(dut.Register());
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
// Should be invalid - not set yet
|
||||
{
|
||||
|
|
|
@ -24,7 +24,7 @@ static void postToFuncSensor(Sensor* s, float value) {
|
|||
}
|
||||
|
||||
TEST(SensorInit, Tps) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
engineConfiguration->tpsMin = 200; // 1 volt
|
||||
engineConfiguration->tpsMax = 800; // 4 volts
|
||||
|
@ -50,7 +50,7 @@ TEST(SensorInit, Tps) {
|
|||
}
|
||||
|
||||
TEST(SensorInit, TpsValuesTooClose) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
// Should fail, 0.49 volts apart
|
||||
engineConfiguration->tpsMin = 200; // 1.00 volt
|
||||
|
@ -97,7 +97,7 @@ TEST(SensorInit, TpsValuesTooClose) {
|
|||
}
|
||||
|
||||
TEST(SensorInit, Pedal) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_0;
|
||||
engineConfiguration->throttlePedalUpVoltage = 1;
|
||||
|
@ -124,7 +124,7 @@ TEST(SensorInit, Pedal) {
|
|||
}
|
||||
|
||||
TEST(SensorInit, DriverIntentNoPedal) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
// We have no pedal - so we should get the TPS
|
||||
engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_NONE;
|
||||
|
@ -145,7 +145,7 @@ TEST(SensorInit, DriverIntentNoPedal) {
|
|||
|
||||
|
||||
TEST(SensorInit, DriverIntentWithPedal) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
// We have a pedal, so we should get it
|
||||
engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_0;
|
||||
|
@ -164,7 +164,7 @@ TEST(SensorInit, DriverIntentWithPedal) {
|
|||
}
|
||||
|
||||
TEST(SensorInit, OilPressure) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
engineConfiguration->oilPressure.hwChannel = EFI_ADC_0;
|
||||
engineConfiguration->oilPressure.v1 = 1;
|
||||
|
@ -189,7 +189,7 @@ TEST(SensorInit, OilPressure) {
|
|||
}
|
||||
|
||||
TEST(SensorInit, Clt) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
// 2003 neon sensor
|
||||
engineConfiguration->clt.config = {0, 30, 100, 32500, 7550, 700, 2700};
|
||||
|
@ -212,7 +212,7 @@ TEST(SensorInit, Clt) {
|
|||
}
|
||||
|
||||
TEST(SensorInit, Lambda) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
initLambda();
|
||||
|
||||
|
@ -221,7 +221,7 @@ TEST(SensorInit, Lambda) {
|
|||
}
|
||||
|
||||
TEST(SensorInit, Map) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
engineConfiguration->map.sensor.hwChannel = EFI_ADC_4;
|
||||
|
||||
initMap();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "pch.h"
|
||||
#include "turbocharger_speed_converter.h"
|
||||
|
||||
static constexpr engine_type_e ENGINE_TEST_HELPER = TEST_ENGINE;
|
||||
static constexpr engine_type_e ENGINE_TEST_HELPER = engine_type_e::TEST_ENGINE;
|
||||
|
||||
class TurbochargerSpeedConverterTest : public ::testing::Test {
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
|
||||
float GetVssFor(float revPerKm, float axle, float teeth, float hz) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
VehicleSpeedConverter dut;
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
TEST(fuel, testTpsAccelEnrichmentMath) {
|
||||
printf("====================================================================================== testAccelEnrichment\r\n");
|
||||
|
||||
EngineTestHelper eth(FORD_ASPIRE_1996);
|
||||
EngineTestHelper eth(engine_type_e::FORD_ASPIRE_1996);
|
||||
|
||||
engine->rpmCalculator.setRpmValue(600);
|
||||
engine->periodicFastCallback();
|
||||
|
@ -40,7 +40,7 @@ TEST(fuel, testTpsAccelEnrichmentMath) {
|
|||
}
|
||||
|
||||
TEST(fuel, testTpsAccelEnrichmentScheduling) {
|
||||
EngineTestHelper eth(FORD_ASPIRE_1996);
|
||||
EngineTestHelper eth(engine_type_e::FORD_ASPIRE_1996);
|
||||
|
||||
setCrankOperationMode();
|
||||
|
||||
|
@ -97,7 +97,7 @@ static void doFractionalTpsIteration(int period, int divisor, int numCycles, std
|
|||
TEST(fuel, testAccelEnrichmentFractionalTps) {
|
||||
printf("====================================================================================== testAccelEnrichmentFractionalTps\r\n");
|
||||
|
||||
EngineTestHelper eth(FORD_ASPIRE_1996);
|
||||
EngineTestHelper eth(engine_type_e::FORD_ASPIRE_1996);
|
||||
|
||||
// setup
|
||||
engineConfiguration->tpsAccelEnrichmentThreshold = 5;
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
TestCanStreamerState() : CanStreamerState(&streamer) {}
|
||||
|
||||
void test(const std::vector<std::string> & dataList, const std::vector<std::string> & frames, int fifoLeftoverSize, const std::vector<size_t> & receiveChunks) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
size_t totalSize = 0;
|
||||
std::string totalData;
|
||||
|
|
|
@ -99,7 +99,7 @@ TEST(CanWideband, DecodeValidAemFormat) {
|
|||
|
||||
TEST(CanWideband, DecodeRusefiStandard)
|
||||
{
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
AemXSeriesWideband dut(0, SensorType::Lambda1);
|
||||
dut.Register();
|
||||
|
@ -139,7 +139,7 @@ TEST(CanWideband, DecodeRusefiStandard)
|
|||
|
||||
TEST(CanWideband, DecodeRusefiStandardWrongVersion)
|
||||
{
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
AemXSeriesWideband dut(0, SensorType::Lambda1);
|
||||
dut.Register();
|
||||
|
|
|
@ -13,7 +13,7 @@ TEST(misc, changeEngineType) {
|
|||
/**
|
||||
* this configuration has triggerInputDebugPins defined
|
||||
*/
|
||||
EngineTestHelper eth (FORD_ASPIRE_1996);
|
||||
EngineTestHelper eth(engine_type_e::FORD_ASPIRE_1996);
|
||||
|
||||
brain_pin_e brainPin = engineConfiguration->triggerInputDebugPins[0];
|
||||
ASSERT_TRUE(brainPin != Gpio::Unassigned);
|
||||
|
@ -25,7 +25,7 @@ TEST(misc, changeEngineType) {
|
|||
// above we have asserted that triggerInputDebugPins is in fact used
|
||||
// now let's change into engine type without triggerInputDebugPins and assert shut down
|
||||
|
||||
setEngineType((int)CITROEN_TU3JP);
|
||||
setEngineType((int)engine_type_e::CITROEN_TU3JP);
|
||||
ASSERT_TRUE(activeConfiguration.triggerInputDebugPins[0] == Gpio::Unassigned);
|
||||
|
||||
ASSERT_TRUE(engineConfiguration->triggerInputDebugPins[0] == Gpio::Unassigned);
|
||||
|
|
|
@ -17,7 +17,7 @@ void printResults(DynoView *dut) {
|
|||
|
||||
|
||||
TEST(DynoView, VSS_T1) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
DynoView dut;
|
||||
|
||||
|
@ -36,7 +36,7 @@ TEST(DynoView, VSS_T1) {
|
|||
}
|
||||
|
||||
TEST(DynoView, algo) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
DynoView dut;
|
||||
|
||||
|
@ -60,7 +60,7 @@ TEST(DynoView, algo) {
|
|||
}
|
||||
|
||||
TEST(DynoView, VSS_fast) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
DynoView dut;
|
||||
|
||||
|
@ -83,7 +83,7 @@ TEST(DynoView, VSS_fast) {
|
|||
|
||||
|
||||
TEST(DynoView, VSS_Torque) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
DynoView dut;
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
TEST(misc, testIgnitionPlanning) {
|
||||
printf("*************************************************** testIgnitionPlanning\r\n");
|
||||
EngineTestHelper eth(FORD_ESCORT_GT);
|
||||
EngineTestHelper eth(engine_type_e::FORD_ESCORT_GT);
|
||||
|
||||
engine->periodicFastCallback();
|
||||
assertEqualsM("testIgnitionPlanning_AFR", 13.5, engine->fuelComputer.targetAFR);
|
||||
|
@ -25,7 +25,7 @@ TEST(misc, testEngineMath) {
|
|||
printf("*************************************************** testEngineMath\r\n");
|
||||
|
||||
// todo: let's see if we can make 'engine' unneeded in this test?
|
||||
EngineTestHelper eth(FORD_ESCORT_GT);
|
||||
EngineTestHelper eth(engine_type_e::FORD_ESCORT_GT);
|
||||
|
||||
setCamOperationMode();
|
||||
engineConfiguration->fuelAlgorithm = LM_SPEED_DENSITY;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "pch.h"
|
||||
|
||||
float GetGearRatioFor(float revPerKm, float axle, float kph, float rpm) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
engineConfiguration->driveWheelRevPerKm = revPerKm;
|
||||
engineConfiguration->finalGearRatio = axle;
|
||||
|
@ -29,7 +29,7 @@ TEST(GearDetector, ComputeGearRatio) {
|
|||
|
||||
|
||||
TEST(GearDetector, GetRpmInGear) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
engineConfiguration->driveWheelRevPerKm = 507;
|
||||
engineConfiguration->finalGearRatio = 4.10f;
|
||||
|
@ -68,7 +68,7 @@ TEST(GearDetector, GetRpmInGear) {
|
|||
}
|
||||
|
||||
TEST(GearDetector, DetermineGearSingleSpeed) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
auto& dut = engine->module<GearDetector>().unmock();
|
||||
|
||||
engineConfiguration->totalGearsCount = 1;
|
||||
|
@ -92,7 +92,7 @@ TEST(GearDetector, DetermineGearSingleSpeed) {
|
|||
}
|
||||
|
||||
TEST(GearDetector, DetermineGear5Speed) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
auto& dut = engine->module<GearDetector>().unmock();
|
||||
|
||||
engineConfiguration->totalGearsCount = 5;
|
||||
|
@ -136,7 +136,7 @@ TEST(GearDetector, DetermineGear5Speed) {
|
|||
}
|
||||
|
||||
TEST(GearDetector, MiataNb6Speed) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
auto& dut = engine->module<GearDetector>().unmock();
|
||||
|
||||
engineConfiguration->totalGearsCount = 6;
|
||||
|
@ -164,7 +164,7 @@ TEST(GearDetector, MiataNb6Speed) {
|
|||
}
|
||||
|
||||
TEST(GearDetector, DetermineGear8Speed) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
auto& dut = engine->module<GearDetector>().unmock();
|
||||
|
||||
// ZF 8HP 70
|
||||
|
@ -203,7 +203,7 @@ TEST(GearDetector, DetermineGear8Speed) {
|
|||
}
|
||||
|
||||
TEST(GearDetector, ParameterValidation) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
auto& dut = engine->module<GearDetector>().unmock();
|
||||
|
||||
// Defaults should work
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "pch.h"
|
||||
|
||||
TEST(gpio, testPinInitNonInverted) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
OutputPin dut;
|
||||
|
||||
|
@ -17,7 +17,7 @@ TEST(gpio, testPinInitNonInverted) {
|
|||
}
|
||||
|
||||
TEST(gpio, testPinInitInverted) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
OutputPin dut;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "pch.h"
|
||||
|
||||
TEST(hardware, reinit) {
|
||||
EngineTestHelper eth(FRANKENSO_MIATA_NA6_MAP);
|
||||
EngineTestHelper eth(engine_type_e::FRANKENSO_MIATA_NA6_MAP);
|
||||
|
||||
ButtonDebounce::stopConfigurationList();
|
||||
ButtonDebounce::startConfigurationList();
|
||||
|
@ -10,6 +10,6 @@ TEST(hardware, reinit) {
|
|||
ButtonDebounce::startConfigurationList();
|
||||
|
||||
|
||||
resetConfigurationExt(nullptr, DODGE_NEON_1995);
|
||||
resetConfigurationExt(nullptr, FRANKENSO_MIATA_NA6_MAP);
|
||||
resetConfigurationExt(nullptr, engine_type_e::DODGE_NEON_1995);
|
||||
resetConfigurationExt(nullptr, engine_type_e::FRANKENSO_MIATA_NA6_MAP);
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ using ::testing::_;
|
|||
using ::testing::StrictMock;
|
||||
|
||||
TEST(HPFP, Lobe) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
engineConfiguration->hpfpCam = HPFP_CAM_NONE;
|
||||
engineConfiguration->hpfpPeakPos = 123;
|
||||
|
@ -51,7 +51,7 @@ TEST(HPFP, Lobe) {
|
|||
}
|
||||
|
||||
TEST(HPFP, InjectionReplacementFuel) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
engineConfiguration->cylindersCount = 4;
|
||||
engineConfiguration->hpfpCamLobes = 4;
|
||||
|
@ -104,7 +104,7 @@ TEST(HPFP, InjectionReplacementFuel) {
|
|||
}
|
||||
|
||||
TEST(HPFP, PI) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
engineConfiguration->cylindersCount = 4;
|
||||
engineConfiguration->hpfpCamLobes = 4;
|
||||
|
@ -161,7 +161,7 @@ TEST(HPFP, PI) {
|
|||
}
|
||||
|
||||
TEST(HPFP, Angle) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
engineConfiguration->cylindersCount = 4;
|
||||
engineConfiguration->hpfpCamLobes = 4;
|
||||
|
@ -207,7 +207,7 @@ TEST(HPFP, Angle) {
|
|||
}
|
||||
|
||||
TEST(HPFP, Schedule) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
engineConfiguration->cylindersCount = 4;
|
||||
engineConfiguration->hpfpCamLobes = 4;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "pch.h"
|
||||
|
||||
TEST(HPFP, IntegratedSchedule) {
|
||||
EngineTestHelper eth(TEST_ENGINE, [](engine_configuration_s* engineConfiguration) {
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE, [](engine_configuration_s* engineConfiguration) {
|
||||
engineConfiguration->hpfpValvePin = Gpio::A2; // arbitrary
|
||||
});
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ using ::testing::_;
|
|||
using ICP = IIdleController::Phase;
|
||||
|
||||
TEST(idle_v2, timingPid) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
IdleController dut;
|
||||
|
||||
engineConfiguration->useIdleTimingPidControl = true;
|
||||
|
@ -50,7 +50,7 @@ TEST(idle_v2, timingPid) {
|
|||
}
|
||||
|
||||
TEST(idle_v2, testTargetRpm) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
IdleController dut;
|
||||
|
||||
for (size_t i = 0; i < efi::size(config->cltIdleRpmBins); i++) {
|
||||
|
@ -63,7 +63,7 @@ TEST(idle_v2, testTargetRpm) {
|
|||
}
|
||||
|
||||
TEST(idle_v2, testDeterminePhase) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
IdleController dut;
|
||||
|
||||
// TPS threshold 5% for easy test
|
||||
|
@ -108,7 +108,7 @@ TEST(idle_v2, testDeterminePhase) {
|
|||
}
|
||||
|
||||
TEST(idle_v2, crankingOpenLoop) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
IdleController dut;
|
||||
|
||||
engineConfiguration->crankingIACposition = 50;
|
||||
|
@ -133,7 +133,7 @@ TEST(idle_v2, crankingOpenLoop) {
|
|||
}
|
||||
|
||||
TEST(idle_v2, runningOpenLoopBasic) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
IdleController dut;
|
||||
|
||||
engineConfiguration->manIdlePosition = 50;
|
||||
|
@ -148,7 +148,7 @@ TEST(idle_v2, runningOpenLoopBasic) {
|
|||
}
|
||||
|
||||
TEST(idle_v2, runningFanAcBump) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
IdleController dut;
|
||||
|
||||
engineConfiguration->manIdlePosition = 50;
|
||||
|
@ -186,7 +186,7 @@ TEST(idle_v2, runningFanAcBump) {
|
|||
}
|
||||
|
||||
TEST(idle_v2, runningOpenLoopTpsTaper) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
IdleController dut;
|
||||
|
||||
// Zero out base tempco table
|
||||
|
@ -208,7 +208,7 @@ TEST(idle_v2, runningOpenLoopTpsTaper) {
|
|||
}
|
||||
|
||||
TEST(idle_v2, runningOpenLoopRpmTaper) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
IdleController dut;
|
||||
|
||||
// Zero out base tempco table
|
||||
|
@ -236,7 +236,7 @@ struct MockOpenLoopIdler : public IdleController {
|
|||
};
|
||||
|
||||
TEST(idle_v2, testOpenLoopCranking) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
StrictMock<MockOpenLoopIdler> dut;
|
||||
|
||||
engineConfiguration->overrideCrankingIacSetting = true;
|
||||
|
@ -248,7 +248,7 @@ TEST(idle_v2, testOpenLoopCranking) {
|
|||
}
|
||||
|
||||
TEST(idle_v2, openLoopRunningTaper) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
StrictMock<MockOpenLoopIdler> dut;
|
||||
|
||||
EXPECT_CALL(dut, getRunningOpenLoop(0, 30, SensorResult(0))).WillRepeatedly(Return(25));
|
||||
|
@ -272,7 +272,7 @@ TEST(idle_v2, openLoopRunningTaper) {
|
|||
}
|
||||
|
||||
TEST(idle_v2, getCrankingTaperFraction) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
StrictMock<MockOpenLoopIdler> dut;
|
||||
|
||||
engineConfiguration->afterCrankingIACtaperDuration = 500;
|
||||
|
@ -300,7 +300,7 @@ TEST(idle_v2, getCrankingTaperFraction) {
|
|||
}
|
||||
|
||||
TEST(idle_v2, openLoopCoastingTable) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
IdleController dut;
|
||||
|
||||
// enable & configure feature
|
||||
|
@ -317,7 +317,7 @@ TEST(idle_v2, openLoopCoastingTable) {
|
|||
extern int timeNowUs;
|
||||
|
||||
TEST(idle_v2, closedLoopBasic) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
IdleController dut;
|
||||
dut.init();
|
||||
|
||||
|
@ -344,7 +344,7 @@ TEST(idle_v2, closedLoopBasic) {
|
|||
}
|
||||
|
||||
TEST(idle_v2, closedLoopDeadzone) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
IdleController dut;
|
||||
dut.init();
|
||||
|
||||
|
@ -380,7 +380,7 @@ struct IntegrationIdleMock : public IdleController {
|
|||
};
|
||||
|
||||
TEST(idle_v2, IntegrationManual) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
StrictMock<IntegrationIdleMock> dut;
|
||||
|
||||
SensorResult expectedTps = 1;
|
||||
|
@ -411,7 +411,7 @@ TEST(idle_v2, IntegrationManual) {
|
|||
}
|
||||
|
||||
TEST(idle_v2, IntegrationAutomatic) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
StrictMock<IntegrationIdleMock> dut;
|
||||
|
||||
engineConfiguration->idleMode = IM_AUTO;
|
||||
|
@ -447,7 +447,7 @@ TEST(idle_v2, IntegrationAutomatic) {
|
|||
}
|
||||
|
||||
TEST(idle_v2, IntegrationClamping) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
StrictMock<IntegrationIdleMock> dut;
|
||||
|
||||
engineConfiguration->idleMode = IM_AUTO;
|
||||
|
|
|
@ -15,7 +15,7 @@ struct MockKnockController : public KnockControllerBase {
|
|||
};
|
||||
|
||||
TEST(Knock, Retards) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
// Aggression of 10%
|
||||
engineConfiguration->knockRetardAggression = 10;
|
||||
|
@ -48,7 +48,7 @@ TEST(Knock, Retards) {
|
|||
}
|
||||
|
||||
TEST(Knock, Reapply) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
MockKnockController dut;
|
||||
dut.onFastCallback();
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include "launch_control.h"
|
||||
|
||||
TEST(LaunchControl, TpsCondition) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
LaunchControlBase dut;
|
||||
|
||||
|
@ -24,7 +24,7 @@ TEST(LaunchControl, TpsCondition) {
|
|||
|
||||
|
||||
TEST(LaunchControl, VSSCondition) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
LaunchControlBase dut;
|
||||
|
||||
|
@ -41,7 +41,7 @@ TEST(LaunchControl, VSSCondition) {
|
|||
}
|
||||
|
||||
TEST(LaunchControl, RPMCondition) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
LaunchControlBase dut;
|
||||
|
||||
|
@ -53,7 +53,7 @@ TEST(LaunchControl, RPMCondition) {
|
|||
}
|
||||
|
||||
TEST(LaunchControl, SwitchInputCondition) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
LaunchControlBase dut;
|
||||
|
||||
|
@ -95,7 +95,7 @@ TEST(LaunchControl, SwitchInputCondition) {
|
|||
}
|
||||
|
||||
TEST(LaunchControl, CombinedCondition) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
LaunchControlBase dut;
|
||||
|
||||
|
@ -138,7 +138,7 @@ static void setDefaultLaunchParameters() {
|
|||
}
|
||||
|
||||
TEST(LaunchControl, CompleteRun) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
//load default config
|
||||
setDefaultLaunchParameters();
|
||||
|
|
|
@ -22,7 +22,7 @@ TEST(limp, testFatalError) {
|
|||
}
|
||||
|
||||
TEST(limp, revLimit) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
engineConfiguration->rpmHardLimit = 2500;
|
||||
|
||||
|
@ -45,7 +45,7 @@ TEST(limp, revLimit) {
|
|||
}
|
||||
|
||||
TEST(limp, revLimitCltBased) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
engineConfiguration->rpmHardLimit = 2500;
|
||||
|
||||
|
@ -95,7 +95,7 @@ TEST(limp, revLimitCltBased) {
|
|||
}
|
||||
|
||||
TEST(limp, revHardLimitHyst) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
engineConfiguration->rpmHardLimit = 2500;
|
||||
engineConfiguration->rpmHardLimitHyst = 200;
|
||||
|
@ -124,7 +124,7 @@ TEST(limp, revHardLimitHyst) {
|
|||
}
|
||||
|
||||
TEST(limp, revSoftLimit) {
|
||||
EngineTestHelper eth(FORD_ASPIRE_1996);
|
||||
EngineTestHelper eth(engine_type_e::FORD_ASPIRE_1996);
|
||||
|
||||
engineConfiguration->rpmHardLimit = 2500;
|
||||
engineConfiguration->rpmHardLimitHyst = 200;
|
||||
|
@ -168,7 +168,7 @@ TEST(limp, revSoftLimit) {
|
|||
}
|
||||
|
||||
TEST(limp, boostCut) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
// Cut above 100kPa
|
||||
engineConfiguration->boostCutPressure = 100;
|
||||
|
@ -206,7 +206,7 @@ TEST(limp, boostCut) {
|
|||
extern int timeNowUs;
|
||||
|
||||
TEST(limp, oilPressureFailureCase) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
engineConfiguration->minOilPressureAfterStart = 200;
|
||||
|
||||
LimpManager dut;
|
||||
|
@ -239,7 +239,7 @@ TEST(limp, oilPressureFailureCase) {
|
|||
}
|
||||
|
||||
TEST(limp, oilPressureSuccessCase) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
engineConfiguration->minOilPressureAfterStart = 200;
|
||||
|
||||
LimpManager dut;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
TEST(start, startStop) {
|
||||
std::unordered_map<SensorType, float> sensorVals = {{ SensorType::AcceleratorPedal, 0 }};
|
||||
EngineTestHelper eth(PROTEUS_BMW_M73, sensorVals);
|
||||
EngineTestHelper eth(engine_type_e::PROTEUS_BMW_M73, sensorVals);
|
||||
eth.moveTimeForwardAndInvokeEventsSec(1); // '0' time has special meaning for implementation so let's move forward
|
||||
|
||||
// this is a pull-up, so 'true' on start-up
|
||||
|
|
|
@ -77,7 +77,7 @@ TEST(ClosedLoopFuel, CellSelection) {
|
|||
}
|
||||
|
||||
TEST(ClosedLoopFuel, afrLimits) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
engineConfiguration->stft.minAfr = 10; // 10.0 AFR
|
||||
engineConfiguration->stft.maxAfr = 18; // 18.0 AFR
|
||||
|
|
|
@ -68,7 +68,7 @@ TEST(binary, testWriteCrc) {
|
|||
}
|
||||
|
||||
TEST(TunerstudioCommands, writeChunkEngineConfig) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
::testing::NiceMock<MockTsChannel> channel;
|
||||
|
||||
uint8_t* configBytes = reinterpret_cast<uint8_t*>(config);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "pch.h"
|
||||
|
||||
TEST(sensors, test2jz) {
|
||||
EngineTestHelper eth(TOYOTA_2JZ_GTE_VVTi);
|
||||
EngineTestHelper eth(engine_type_e::TOYOTA_2JZ_GTE_VVTi);
|
||||
engineConfiguration->isFasterEngineSpinUpEnabled = false;
|
||||
|
||||
eth.setTriggerType(TT_ONE);
|
||||
|
|
|
@ -13,7 +13,7 @@ extern WarningCodeState unitTestWarningCodeState;
|
|||
extern WaveChart waveChart;
|
||||
|
||||
TEST(trigger, testNoStartUpWarningsNoSyncronizationTrigger) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
// one tooth does not need synchronization it just counts tooth
|
||||
eth.setTriggerType(TT_ONE);
|
||||
ASSERT_EQ( 0, round(Sensor::getOrZero(SensorType::Rpm))) << "testNoStartUpWarnings RPM";
|
||||
|
@ -24,7 +24,7 @@ TEST(trigger, testNoStartUpWarningsNoSyncronizationTrigger) {
|
|||
}
|
||||
|
||||
TEST(trigger, testNoStartUpWarnings) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
// for this test we need a trigger with isSynchronizationNeeded=true
|
||||
engineConfiguration->trigger.customTotalToothCount = 3;
|
||||
engineConfiguration->trigger.customSkippedToothCount = 1;
|
||||
|
@ -58,7 +58,7 @@ TEST(trigger, testNoStartUpWarnings) {
|
|||
}
|
||||
|
||||
TEST(trigger, testNoisyInput) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
ASSERT_EQ( 0, round(Sensor::getOrZero(SensorType::Rpm))) << "testNoisyInput RPM";
|
||||
|
||||
|
@ -80,7 +80,7 @@ TEST(trigger, testNoisyInput) {
|
|||
|
||||
TEST(trigger, testCamInput) {
|
||||
// setting some weird engine
|
||||
EngineTestHelper eth(FORD_ESCORT_GT);
|
||||
EngineTestHelper eth(engine_type_e::FORD_ESCORT_GT);
|
||||
|
||||
// changing to 'ONE TOOTH' trigger on CRANK with CAM/VVT
|
||||
setCrankOperationMode();
|
||||
|
@ -132,7 +132,7 @@ TEST(trigger, testCamInput) {
|
|||
}
|
||||
|
||||
TEST(trigger, testNB2CamInput) {
|
||||
EngineTestHelper eth(FRANKENSO_MAZDA_MIATA_2003);
|
||||
EngineTestHelper eth(engine_type_e::FRANKENSO_MAZDA_MIATA_2003);
|
||||
|
||||
engineConfiguration->isFasterEngineSpinUpEnabled = false;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "pch.h"
|
||||
|
||||
TEST(cranking, testFasterEngineSpinningUp) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
setTable(config->injectionPhase, -180.0f);
|
||||
engine->tdcMarkEnabled = false;
|
||||
// turn on FasterEngineSpinUp mode
|
||||
|
@ -104,7 +104,7 @@ TEST(cranking, testFasterEngineSpinningUp) {
|
|||
}
|
||||
|
||||
static void doTestFasterEngineSpinningUp60_2(int startUpDelayMs, int rpm1, int expectedRpm) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
// turn on FasterEngineSpinUp mode
|
||||
engineConfiguration->isFasterEngineSpinUpEnabled = true;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ using ::testing::InSequence;
|
|||
TEST(injectionScheduling, InjectionIsScheduled) {
|
||||
StrictMock<MockExecutor> mockExec;
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
engine->executor.setMockExecutor(&mockExec);
|
||||
|
||||
efitick_t nowNt = 1000000;
|
||||
|
@ -49,7 +49,7 @@ TEST(injectionScheduling, InjectionIsScheduled) {
|
|||
TEST(injectionScheduling, InjectionIsScheduledBeforeWraparound) {
|
||||
StrictMock<MockExecutor> mockExec;
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
engine->executor.setMockExecutor(&mockExec);
|
||||
|
||||
efitick_t nowNt = 1000000;
|
||||
|
@ -88,7 +88,7 @@ TEST(injectionScheduling, InjectionIsScheduledBeforeWraparound) {
|
|||
TEST(injectionScheduling, InjectionIsScheduledAfterWraparound) {
|
||||
StrictMock<MockExecutor> mockExec;
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
engine->executor.setMockExecutor(&mockExec);
|
||||
|
||||
efitick_t nowNt = 1000000;
|
||||
|
@ -128,7 +128,7 @@ TEST(injectionScheduling, InjectionNotScheduled) {
|
|||
// StrictMock since we expect no scheduler calls!
|
||||
StrictMock<MockExecutor> mockExec;
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
engine->executor.setMockExecutor(&mockExec);
|
||||
|
||||
efitick_t nowNt = 1000000;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
TEST(trigger, map_cam_by_magic_point) {
|
||||
|
||||
EngineTestHelper eth(TEST_CRANK_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_CRANK_ENGINE);
|
||||
engineConfiguration->isFasterEngineSpinUpEnabled = false;
|
||||
|
||||
engineConfiguration->camInputs[0] = Gpio::A0;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "trigger_emulator_algo.h"
|
||||
|
||||
TEST(miata, miata_na_tdc) {
|
||||
EngineTestHelper eth(FRANKENSO_MIATA_NA6_MAP);
|
||||
EngineTestHelper eth(engine_type_e::FRANKENSO_MIATA_NA6_MAP);
|
||||
engineConfiguration->alwaysInstantRpm = true;
|
||||
|
||||
#define TEST_REVOLUTIONS 6
|
||||
|
|
|
@ -71,7 +71,7 @@ TEST(nissan, vq_vvt) {
|
|||
// hold a reference to the heap allocated scheduling events until the test is done
|
||||
std::vector<std::shared_ptr<TriggerCallback>> ptrs;
|
||||
|
||||
EngineTestHelper eth (HELLEN_121_NISSAN_6_CYL);
|
||||
EngineTestHelper eth (engine_type_e::HELLEN_121_NISSAN_6_CYL);
|
||||
engineConfiguration->isFasterEngineSpinUpEnabled = false;
|
||||
engineConfiguration->isIgnitionEnabled = false;
|
||||
engineConfiguration->isInjectionEnabled = false;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "pch.h"
|
||||
|
||||
TEST(subaru, overrideGap) {
|
||||
EngineTestHelper eth(FRANKENSO_MIATA_NA6_MAP);
|
||||
EngineTestHelper eth(engine_type_e::FRANKENSO_MIATA_NA6_MAP);
|
||||
|
||||
engineConfiguration->overrideTriggerGaps = true;
|
||||
engineConfiguration->gapTrackingLengthOverride = 2;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
TEST(trigger, testQuadCam) {
|
||||
// setting some weird engine
|
||||
EngineTestHelper eth(FORD_ESCORT_GT);
|
||||
EngineTestHelper eth(engine_type_e::FORD_ESCORT_GT);
|
||||
engineConfiguration->isFasterEngineSpinUpEnabled = false;
|
||||
engineConfiguration->alwaysInstantRpm = true;
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ TEST(real4b11, running) {
|
|||
CsvReader reader(1, /* vvtCount */ 0);
|
||||
|
||||
reader.open("tests/trigger/resources/4b11-running.csv");
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
engineConfiguration->isFasterEngineSpinUpEnabled = true;
|
||||
engineConfiguration->alwaysInstantRpm = true;
|
||||
|
||||
|
@ -46,7 +46,7 @@ TEST(real4b11, runningDoubledEdge) {
|
|||
|
||||
// This log has an extra duplicate edge at 5.393782 seconds (hand added)
|
||||
reader.open("tests/trigger/resources/4b11-running-doubled-edge.csv");
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
engineConfiguration->isFasterEngineSpinUpEnabled = true;
|
||||
engineConfiguration->alwaysInstantRpm = true;
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ TEST(real4g93, cranking) {
|
|||
CsvReader reader(1, /* vvtCount */ 1);
|
||||
|
||||
reader.open("tests/trigger/resources/4g93-cranking.csv");
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
engineConfiguration->isFasterEngineSpinUpEnabled = true;
|
||||
engineConfiguration->alwaysInstantRpm = true;
|
||||
|
||||
|
@ -73,7 +73,7 @@ TEST(real4g93, crankingOn11) {
|
|||
CsvReader reader(2, /* vvtCount */ 0);
|
||||
|
||||
reader.open("tests/trigger/resources/4g93-cranking.csv");
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
engineConfiguration->isFasterEngineSpinUpEnabled = true;
|
||||
|
||||
engineConfiguration->isPhaseSyncRequiredForIgnition = true;
|
||||
|
@ -102,7 +102,7 @@ TEST(real4g93, crankingCamOnly) {
|
|||
CsvReader reader(1, /* vvtCount */ 0);
|
||||
|
||||
reader.open("tests/trigger/resources/4g93-cranking-cam-only.csv");
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
engineConfiguration->isFasterEngineSpinUpEnabled = true;
|
||||
engineConfiguration->alwaysInstantRpm = true;
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ TEST(cranking, realCrankingFromFile) {
|
|||
// this logic data file has first trigger channel in second column and second trigger channel in first column
|
||||
reader.open("tests/trigger/resources/cranking_na_3.csv", REVERSE_ORDER);
|
||||
|
||||
EngineTestHelper eth (FRANKENSO_MIATA_NA6_MAP);
|
||||
EngineTestHelper eth (engine_type_e::FRANKENSO_MIATA_NA6_MAP);
|
||||
engineConfiguration->alwaysInstantRpm = true;
|
||||
|
||||
ssize_t read;
|
||||
|
|
|
@ -35,7 +35,7 @@ static void fireTriggerEvent(EngineTestHelper*eth, double timestampS, TriggerWhe
|
|||
}
|
||||
|
||||
TEST(cranking, hardcodedRealCranking) {
|
||||
EngineTestHelper eth(FRANKENSO_MIATA_NA6_MAP);
|
||||
EngineTestHelper eth(engine_type_e::FRANKENSO_MIATA_NA6_MAP);
|
||||
engineConfiguration->alwaysInstantRpm = true;
|
||||
|
||||
#define EVENT(timestamp, channel, value) { fireTriggerEvent(ð, timestamp, channel, value); }
|
||||
|
@ -169,7 +169,7 @@ TEST(cranking, naCrankFromFile) {
|
|||
CsvReader reader(2, /* vvtCount */ 0);
|
||||
reader.open("tests/trigger/resources/cranking_na_4.csv", REVERSE_ORDER);
|
||||
|
||||
EngineTestHelper eth(FRANKENSO_MIATA_NA6_MAP);
|
||||
EngineTestHelper eth(engine_type_e::FRANKENSO_MIATA_NA6_MAP);
|
||||
engineConfiguration->alwaysInstantRpm = true;
|
||||
|
||||
while (reader.haveMore()) {
|
||||
|
|
|
@ -12,7 +12,7 @@ static void test(int engineSyncCam, float camOffsetAdd) {
|
|||
CsvReader reader(1, /* vvtCount */ 2);
|
||||
|
||||
reader.open("tests/trigger/resources/nissan_vq40_cranking-1.csv");
|
||||
EngineTestHelper eth (HELLEN_121_NISSAN_6_CYL);
|
||||
EngineTestHelper eth (engine_type_e::HELLEN_121_NISSAN_6_CYL);
|
||||
engineConfiguration->isFasterEngineSpinUpEnabled = false;
|
||||
engineConfiguration->alwaysInstantRpm = true;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ TEST(crankingGm24x, gmRealCrankingFromFile) {
|
|||
CsvReader reader(1, /* vvtCount */ 0);
|
||||
|
||||
reader.open("tests/trigger/resources/gm_24x_cranking.csv");
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
engineConfiguration->isFasterEngineSpinUpEnabled = true;
|
||||
engineConfiguration->alwaysInstantRpm = true;
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ TEST(realk20, cranking) {
|
|||
reader.open("tests/trigger/resources/civic-K20-cranking.csv", NORMAL_ORDER, REVERSE_ORDER);
|
||||
reader.twoBanksSingleCamMode = false;
|
||||
|
||||
EngineTestHelper eth (PROTEUS_HONDA_K);
|
||||
EngineTestHelper eth (engine_type_e::PROTEUS_HONDA_K);
|
||||
|
||||
while (reader.haveMore()) {
|
||||
reader.processLine(ð);
|
||||
|
|
|
@ -6,7 +6,7 @@ static void doTest(const char* testFile, int expectedRpm) {
|
|||
CsvReader reader(/* triggerCount */ 1, /* vvtCount */ 0);
|
||||
|
||||
reader.open(testFile);
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
engineConfiguration->isFasterEngineSpinUpEnabled = true;
|
||||
engineConfiguration->alwaysInstantRpm = true;
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ TEST(realCrankingNB2, normalCranking) {
|
|||
CsvReader reader(1, /* vvtCount */ 1);
|
||||
|
||||
reader.open("tests/trigger/resources/nb2-cranking-good.csv");
|
||||
EngineTestHelper eth (HELLEN_NB2);
|
||||
EngineTestHelper eth (engine_type_e::HELLEN_NB2);
|
||||
engineConfiguration->alwaysInstantRpm = true;
|
||||
|
||||
while (reader.haveMore()) {
|
||||
|
@ -37,7 +37,7 @@ TEST(realCrankingNB2, crankingMissingInjector) {
|
|||
CsvReader reader(1, /* vvtCount */ 1);
|
||||
|
||||
reader.open("tests/trigger/resources/nb2-cranking-good-missing-injector-1.csv");
|
||||
EngineTestHelper eth (HELLEN_NB2);
|
||||
EngineTestHelper eth (engine_type_e::HELLEN_NB2);
|
||||
engineConfiguration->alwaysInstantRpm = true;
|
||||
|
||||
while (reader.haveMore()) {
|
||||
|
|
|
@ -13,7 +13,7 @@ TEST(crankingVW, vwRealCrankingFromFile) {
|
|||
CsvReader reader(1, /* vvtCount */ 0);
|
||||
|
||||
reader.open("tests/trigger/resources/nick_1.csv");
|
||||
EngineTestHelper eth (VW_ABA);
|
||||
EngineTestHelper eth (engine_type_e::VW_ABA);
|
||||
engineConfiguration->alwaysInstantRpm = true;
|
||||
eth.setTriggerType(TT_60_2_VW);
|
||||
|
||||
|
@ -26,7 +26,7 @@ TEST(crankingVW, vwRealCrankingFromFile) {
|
|||
}
|
||||
|
||||
TEST(crankingVW, crankingTwiceWithGap) {
|
||||
EngineTestHelper eth (VW_ABA);
|
||||
EngineTestHelper eth (engine_type_e::VW_ABA);
|
||||
engineConfiguration->alwaysInstantRpm = true;
|
||||
eth.setTriggerType(TT_60_2_VW);
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "pch.h"
|
||||
|
||||
static void runRpmTest(bool isTwoStroke, bool isCam, int expected) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
engineConfiguration->twoStroke = isTwoStroke;
|
||||
engineConfiguration->skippedWheelOnCam = isCam;
|
||||
eth.setTriggerType(TT_ONE);
|
||||
|
|
|
@ -15,7 +15,7 @@ static void postFourEvents(EngineTestHelper *eth, float mult) {
|
|||
}
|
||||
|
||||
TEST(engine, testAngleLogicInSymmetricalCrankIssue2980) {
|
||||
EngineTestHelper eth(FRANKENSO_MAZDA_MIATA_2003);
|
||||
EngineTestHelper eth(engine_type_e::FRANKENSO_MAZDA_MIATA_2003);
|
||||
|
||||
TriggerFormDetails *triggerForm = &engine->triggerCentral.triggerFormDetails;
|
||||
|
||||
|
@ -44,7 +44,7 @@ TEST(engine, testAngleLogicInSymmetricalCrankIssue2980) {
|
|||
|
||||
TEST(engine, testSymmetricalCrank) {
|
||||
|
||||
EngineTestHelper eth(FRANKENSO_MAZDA_MIATA_2003);
|
||||
EngineTestHelper eth(engine_type_e::FRANKENSO_MAZDA_MIATA_2003);
|
||||
|
||||
// this test is not about isFasterEngineSpinUpEnabled so let's disable it to simplify things
|
||||
engineConfiguration->isFasterEngineSpinUpEnabled = false;
|
||||
|
|
|
@ -44,7 +44,7 @@ static int getTriggerZeroEventIndex(engine_type_e engineType) {
|
|||
}
|
||||
|
||||
TEST(trigger, testSkipped2_0) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
// for this test we need a trigger with isSynchronizationNeeded=true
|
||||
engineConfiguration->trigger.customTotalToothCount = 2;
|
||||
engineConfiguration->trigger.customSkippedToothCount = 0;
|
||||
|
@ -53,7 +53,7 @@ TEST(trigger, testSkipped2_0) {
|
|||
}
|
||||
|
||||
TEST(trigger, testSomethingWeird) {
|
||||
EngineTestHelper eth(FORD_INLINE_6_1995);
|
||||
EngineTestHelper eth(engine_type_e::FORD_INLINE_6_1995);
|
||||
|
||||
TriggerDecoderBase state_("test");
|
||||
TriggerDecoderBase *sta = &state_;
|
||||
|
@ -80,9 +80,9 @@ TEST(trigger, testSomethingWeird) {
|
|||
}
|
||||
|
||||
TEST(trigger, test1995FordInline6TriggerDecoder) {
|
||||
ASSERT_EQ( 0, getTriggerZeroEventIndex(FORD_INLINE_6_1995)) << "triggerIndex ";
|
||||
ASSERT_EQ( 0, getTriggerZeroEventIndex(engine_type_e::FORD_INLINE_6_1995)) << "triggerIndex ";
|
||||
|
||||
EngineTestHelper eth(FORD_INLINE_6_1995);
|
||||
EngineTestHelper eth(engine_type_e::FORD_INLINE_6_1995);
|
||||
engineConfiguration->isFasterEngineSpinUpEnabled = false;
|
||||
setWholeTimingTable(-13);
|
||||
|
||||
|
@ -110,7 +110,7 @@ TEST(trigger, test1995FordInline6TriggerDecoder) {
|
|||
}
|
||||
|
||||
TEST(misc, testGetCoilDutyCycleIssue977) {
|
||||
EngineTestHelper eth(FORD_ASPIRE_1996);
|
||||
EngineTestHelper eth(engine_type_e::FORD_ASPIRE_1996);
|
||||
|
||||
int rpm = 2000;
|
||||
engine->rpmCalculator.setRpmValue(rpm);
|
||||
|
@ -122,9 +122,9 @@ TEST(misc, testGetCoilDutyCycleIssue977) {
|
|||
TEST(misc, testFordAspire) {
|
||||
printf("*************************************************** testFordAspire\r\n");
|
||||
|
||||
ASSERT_EQ( 4, getTriggerZeroEventIndex(FORD_ASPIRE_1996)) << "getTriggerZeroEventIndex";
|
||||
ASSERT_EQ( 4, getTriggerZeroEventIndex(engine_type_e::FORD_ASPIRE_1996)) << "getTriggerZeroEventIndex";
|
||||
|
||||
EngineTestHelper eth(FORD_ASPIRE_1996);
|
||||
EngineTestHelper eth(engine_type_e::FORD_ASPIRE_1996);
|
||||
|
||||
ASSERT_EQ( 4, getTriggerCentral()->triggerShape.getTriggerWaveformSynchPointIndex()) << "getTriggerWaveformSynchPointIndex";
|
||||
|
||||
|
@ -169,7 +169,7 @@ static void assertREqualsM(const char *msg, void *expected, void *actual) {
|
|||
extern bool_t debugSignalExecutor;
|
||||
|
||||
TEST(misc, testRpmCalculator) {
|
||||
EngineTestHelper eth(FORD_INLINE_6_1995);
|
||||
EngineTestHelper eth(engine_type_e::FORD_INLINE_6_1995);
|
||||
|
||||
setTable(config->injectionPhase, -180.0f);
|
||||
|
||||
|
@ -316,7 +316,7 @@ TEST(misc, testRpmCalculator) {
|
|||
}
|
||||
|
||||
TEST(trigger, testAnotherTriggerDecoder) {
|
||||
testTriggerDecoder2("Miata 2003", FRANKENSO_MAZDA_MIATA_2003, 3, 0.38888889, 0.0);
|
||||
testTriggerDecoder2("Miata 2003", engine_type_e::FRANKENSO_MAZDA_MIATA_2003, 3, 0.38888889, 0.0);
|
||||
}
|
||||
|
||||
TEST(trigger, testTriggerDecoder) {
|
||||
|
@ -338,39 +338,39 @@ TEST(trigger, testTriggerDecoder) {
|
|||
}
|
||||
|
||||
printf("====================================================================================== testTriggerDecoder part 2\r\n");
|
||||
testTriggerDecoder2("Dodge Neon 1995", DODGE_NEON_1995, 0, 0.4931, 0.2070);
|
||||
testTriggerDecoder2("Dodge Neon 1995", engine_type_e::DODGE_NEON_1995, 0, 0.4931, 0.2070);
|
||||
|
||||
testTriggerDecoder2("ford aspire", FORD_ASPIRE_1996, 4, 0.0000, 0.5);
|
||||
testTriggerDecoder2("ford aspire", engine_type_e::FORD_ASPIRE_1996, 4, 0.0000, 0.5);
|
||||
|
||||
testTriggerDecoder2("dodge ram", DODGE_RAM, 16, 0.5000, 0.06);
|
||||
testTriggerDecoder2("dodge ram", engine_type_e::DODGE_RAM, 16, 0.5000, 0.06);
|
||||
|
||||
testTriggerDecoder2("Miata NB2", HELLEN_NB2, 3, 0.3888888955, 0);
|
||||
testTriggerDecoder2("Miata NB2", engine_type_e::HELLEN_NB2, 3, 0.3888888955, 0);
|
||||
|
||||
printf("====================================================================================== testTriggerDecoder part 3\r\n");
|
||||
|
||||
testTriggerDecoder2("test 2/1 both", TEST_ISSUE_366_BOTH, 0, 0.2500, 0.0);
|
||||
testTriggerDecoder2("test 2/1 rise", TEST_ISSUE_366_RISE, 0, 0.0000, 0.0);
|
||||
testTriggerDecoder2("test 2/1 both", engine_type_e::TEST_ISSUE_366_BOTH, 0, 0.2500, 0.0);
|
||||
testTriggerDecoder2("test 2/1 rise", engine_type_e::TEST_ISSUE_366_RISE, 0, 0.0000, 0.0);
|
||||
|
||||
testTriggerDecoder2("test engine", TEST_ENGINE, 0, 0.7500, 0.2500);
|
||||
testTriggerDecoder2("testGY6_139QMB", GY6_139QMB, 0, 0.4375, 0.0);
|
||||
testTriggerDecoder2("testSubary", SUBARU_2003_WRX, 0, 0.4000, 0.0);
|
||||
testTriggerDecoder2("test engine", engine_type_e::TEST_ENGINE, 0, 0.7500, 0.2500);
|
||||
testTriggerDecoder2("testGY6_139QMB", engine_type_e::GY6_139QMB, 0, 0.4375, 0.0);
|
||||
testTriggerDecoder2("testSubary", engine_type_e::SUBARU_2003_WRX, 0, 0.4000, 0.0);
|
||||
|
||||
testTriggerDecoder2("testFordEscortGt", FORD_ESCORT_GT, 0, 0.8096, 0.3844);
|
||||
testTriggerDecoder2("testFordEscortGt", engine_type_e::FORD_ESCORT_GT, 0, 0.8096, 0.3844);
|
||||
|
||||
testTriggerDecoder2("NISSAN_PRIMERA", NISSAN_PRIMERA, 2, 0.9611, 0.0);
|
||||
testTriggerDecoder2("NISSAN_PRIMERA", engine_type_e::NISSAN_PRIMERA, 2, 0.9611, 0.0);
|
||||
|
||||
testTriggerDecoder2("test1+1", DEFAULT_FRANKENSO, 0, 0.7500, 0.2500);
|
||||
testTriggerDecoder2("test1+1", engine_type_e::DEFAULT_FRANKENSO, 0, 0.7500, 0.2500);
|
||||
|
||||
testTriggerDecoder2("testCitroen", CITROEN_TU3JP, 0, 0.4833, 0);
|
||||
testTriggerDecoder2("testCitroen", engine_type_e::CITROEN_TU3JP, 0, 0.4833, 0);
|
||||
|
||||
testTriggerDecoder2("citroen", CITROEN_TU3JP, 0, 0.4833, 0.0, 2.9994);
|
||||
testTriggerDecoder2("citroen", engine_type_e::CITROEN_TU3JP, 0, 0.4833, 0.0, 2.9994);
|
||||
|
||||
testTriggerDecoder2("CAMARO_4", CAMARO_4, 40, 0.5, 0);
|
||||
testTriggerDecoder2("CAMARO_4", engine_type_e::CAMARO_4, 40, 0.5, 0);
|
||||
|
||||
testTriggerDecoder2("neon NGC4", DODGE_NEON_2003_CRANK, 6, 0.5000, 0.0, CHRYSLER_NGC4_GAP);
|
||||
testTriggerDecoder2("neon NGC4", engine_type_e::DODGE_NEON_2003_CRANK, 6, 0.5000, 0.0, CHRYSLER_NGC4_GAP);
|
||||
|
||||
{
|
||||
EngineTestHelper eth(DODGE_NEON_2003_CRANK);
|
||||
EngineTestHelper eth(engine_type_e::DODGE_NEON_2003_CRANK);
|
||||
|
||||
printf("!!!!!!!!!!!!!!!!!! Now trying with only rising edges !!!!!!!!!!!!!!!!!\r\n");
|
||||
|
||||
|
@ -379,9 +379,9 @@ TEST(trigger, testTriggerDecoder) {
|
|||
|
||||
}
|
||||
|
||||
testTriggerDecoder2("sachs", SACHS, 0, 0.4800, 0.000);
|
||||
testTriggerDecoder2("sachs", engine_type_e::SACHS, 0, 0.4800, 0.000);
|
||||
|
||||
testTriggerDecoder2("vw ABA", VW_ABA, 0, 0.51666, 0.0);
|
||||
testTriggerDecoder2("vw ABA", engine_type_e::VW_ABA, 0, 0.51666, 0.0);
|
||||
}
|
||||
|
||||
static void assertInjectionEventBase(const char *msg, InjectionEvent *ev, int injectorIndex, int eventIndex, angle_t angleOffset) {
|
||||
|
@ -530,7 +530,7 @@ static void setArray(float* p, size_t count, float value) {
|
|||
void doTestFuelSchedulerBug299smallAndMedium(int startUpDelayMs) {
|
||||
printf("*************************************************** testFuelSchedulerBug299 small to medium\r\n");
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
setTable(config->injectionPhase, -180.0f);
|
||||
engineConfiguration->isFasterEngineSpinUpEnabled = false;
|
||||
engine->tdcMarkEnabled = false;
|
||||
|
@ -778,7 +778,7 @@ TEST(big, testFuelSchedulerBug299smallAndMedium) {
|
|||
}
|
||||
|
||||
TEST(big, testTwoWireBatch) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
setTable(config->injectionPhase, -180.0f);
|
||||
setupSimpleTestEngineWithMafAndTT_ONE_trigger(ð);
|
||||
EXPECT_CALL(*eth.mockAirmass, getAirmass(_, _))
|
||||
|
@ -807,7 +807,7 @@ TEST(big, testTwoWireBatch) {
|
|||
|
||||
|
||||
TEST(big, testSequential) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
setTable(config->injectionPhase, -180.0f);
|
||||
EXPECT_CALL(*eth.mockAirmass, getAirmass(_, _))
|
||||
.WillRepeatedly(Return(AirmassResult{0.1008f, 50.0f}));
|
||||
|
@ -835,7 +835,7 @@ TEST(big, testSequential) {
|
|||
}
|
||||
|
||||
TEST(big, testFuelSchedulerBug299smallAndLarge) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
setTable(config->injectionPhase, -180.0f);
|
||||
engineConfiguration->isFasterEngineSpinUpEnabled = false;
|
||||
engine->tdcMarkEnabled = false;
|
||||
|
@ -954,7 +954,7 @@ TEST(big, testFuelSchedulerBug299smallAndLarge) {
|
|||
TEST(big, testSparkReverseOrderBug319) {
|
||||
printf("*************************************************** testSparkReverseOrderBug319 small to medium\r\n");
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
engineConfiguration->isFasterEngineSpinUpEnabled = false;
|
||||
engine->tdcMarkEnabled = false;
|
||||
|
||||
|
@ -1059,7 +1059,7 @@ TEST(big, testSparkReverseOrderBug319) {
|
|||
TEST(big, testMissedSpark299) {
|
||||
printf("*************************************************** testMissedSpark299\r\n");
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
||||
setupSimpleTestEngineWithMafAndTT_ONE_trigger(ð);
|
||||
engineConfiguration->isIgnitionEnabled = true;
|
||||
|
|
|
@ -72,7 +72,7 @@ static void simulateTrigger(TriggerAdcDetector &trigAdcState, CsvReader &reader,
|
|||
TEST(big, testTriggerInputAdc) {
|
||||
printf("====================================================================================== testTriggerInputAdc\r\n");
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
||||
|
||||
|
|
|
@ -161,7 +161,7 @@ static void testNoiselessDecoderProcedure(EngineTestHelper ð, int errorTolera
|
|||
TEST(trigger, noiselessDecoder) {
|
||||
printf("====================================================================================== testNoiselessDecoder\r\n");
|
||||
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include "trigger_decoder.h"
|
||||
|
||||
TEST(trigger, testCustomSkipped) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
|
||||
engineConfiguration->trigger.customTotalToothCount = 24;
|
||||
engineConfiguration->trigger.customSkippedToothCount = 2;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "timer.h"
|
||||
|
||||
TEST(util, timer) {
|
||||
EngineTestHelper eth(TEST_ENGINE);
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
Timer timer;
|
||||
ASSERT_TRUE(timer.hasElapsedSec(3));
|
||||
timer.reset();
|
||||
|
|
Loading…
Reference in New Issue