This commit is contained in:
Matthew Kennedy 2023-06-23 02:21:53 -07:00
parent 07f0360dd9
commit 8cb484f3e0
1 changed files with 7 additions and 2 deletions

View File

@ -319,6 +319,11 @@ TEST(InjectorModel, MissingPressureSensor) {
// Sensor is missing!
Sensor::resetMockValue(SensorType::FuelPressureInjector);
// Missing sensor should trigger a fatal as it's a misconfiguration
EXPECT_FATAL_ERROR(dut.getInjectorFlowRatio());
// no warning before
ASSERT_EQ(0, eth.recentWarnings()->getCount());
// Missing sensor should return 1.0 flow ratio and log a warning
EXPECT_EQ(1.0f, dut.getInjectorFlowRatio());
EXPECT_EQ(1, eth.recentWarnings()->getCount());
}