Usability: critical error in case of unneeded second channel #6419

only: unit tests
This commit is contained in:
rusEFI LLC 2024-04-26 22:18:01 -04:00
parent 32cd0080dc
commit aed124bae2
5 changed files with 5 additions and 2 deletions

View File

@ -20,6 +20,7 @@ GTEST_API_ int main(int argc, char **argv) {
* See TEST_FROM_TRIGGER_ID to limit test just for last trigger
*/
// setVerboseTrigger(true);
// --gtest_filter=*TEST_NAME*
//::testing::GTEST_FLAG(filter) = "*AllTriggersFixture*";
int result = RUN_ALL_TESTS();
// windows ERRORLEVEL in Jenkins batch file seems to want negative value to detect failure

View File

@ -79,6 +79,7 @@ TEST(trigger, testNoisyInput) {
TEST(trigger, testCamInput) {
// setting some weird engine
EngineTestHelper eth(engine_type_e::FORD_ESCORT_GT);
engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
// changing to 'ONE TOOTH' trigger on CRANK with CAM/VVT
setCrankOperationMode();

View File

@ -8,6 +8,7 @@
TEST(trigger, testQuadCamInput) {
// setting some weird engine
EngineTestHelper eth(engine_type_e::FORD_ESCORT_GT);
engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
engineConfiguration->isFasterEngineSpinUpEnabled = false;
engineConfiguration->alwaysInstantRpm = true;

View File

@ -174,6 +174,7 @@ extern bool debugSignalExecutor;
TEST(misc, testRpmCalculator) {
EngineTestHelper eth(engine_type_e::FORD_INLINE_6_1995);
efiAssertVoid(ObdCode::CUSTOM_ERR_6670, engineConfiguration!=NULL, "null config in engine");
setTable(config->injectionPhase, -180.0f);
@ -190,8 +191,6 @@ TEST(misc, testRpmCalculator) {
ASSERT_EQ( 720, engine->engineState.engineCycle) << "engineCycle";
efiAssertVoid(ObdCode::CUSTOM_ERR_6670, engineConfiguration!=NULL, "null config in engine");
engineConfiguration->minimumIgnitionTiming = -15;
float timingAdvance = -13;
setWholeTimingTable(timingAdvance);

View File

@ -44,6 +44,7 @@ static auto makeTriggerShape(operation_mode_e mode, const TriggerConfiguration&
TEST(TriggerDecoder, FindsFirstSyncPoint) {
MockTriggerConfiguration cfg({trigger_type_e::TT_TOOTHED_WHEEL, 4, 1});
cfg.update();
engineConfiguration = nullptr;
auto shape = makeTriggerShape(FOUR_STROKE_CAM_SENSOR, cfg);