2019-08-08 18:27:57 -07:00
|
|
|
/*
|
2019-10-07 18:54:03 -07:00
|
|
|
* @file test_issue_898.cpp
|
2019-08-08 18:27:57 -07:00
|
|
|
*
|
2019-10-07 18:54:03 -07:00
|
|
|
* @date Aug 8, 2019
|
2019-08-08 18:27:57 -07:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2019
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "engine_test_helper.h"
|
2019-08-08 19:57:22 -07:00
|
|
|
extern WarningCodeState unitTestWarningCodeState;
|
2019-08-08 18:27:57 -07:00
|
|
|
|
2019-08-08 19:12:51 -07:00
|
|
|
static void boardConfigurationForIssue898(engine_configuration_s *engineConfiguration) {
|
2019-08-08 18:27:57 -07:00
|
|
|
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
|
|
|
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
|
|
|
|
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST(issues, issue898) {
|
2019-08-08 20:11:56 -07:00
|
|
|
EngineTestHelper eth(ISSUE_898, &boardConfigurationForIssue898);
|
2019-08-08 18:27:57 -07:00
|
|
|
EXPAND_EngineTestHelper;
|
|
|
|
|
2019-08-08 19:57:22 -07:00
|
|
|
ASSERT_EQ(TRUE, engine->triggerCentral.triggerShape.shapeDefinitionError) << "MRE_MIATA_NA6 shapeDefinitionError";
|
2019-08-08 18:27:57 -07:00
|
|
|
|
2019-08-08 19:57:22 -07:00
|
|
|
ASSERT_EQ( 2, unitTestWarningCodeState.recentWarnings.getCount()) << "warningCounter#testFuelSchedulerBug299smallAndMedium";
|
|
|
|
ASSERT_EQ(CUSTOM_ERR_BOTH_FRONTS_REQUIRED, unitTestWarningCodeState.recentWarnings.get(0));
|
|
|
|
ASSERT_EQ(CUSTOM_ERR_TRIGGER_SYNC, unitTestWarningCodeState.recentWarnings.get(1));
|
2019-08-08 18:27:57 -07:00
|
|
|
}
|