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
|
2020-01-07 21:02:40 -08:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2020
|
2019-08-08 18:27:57 -07:00
|
|
|
*/
|
|
|
|
|
2021-08-03 19:05:01 -07:00
|
|
|
#include "pch.h"
|
2019-11-17 06:03:20 -08: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) {
|
2020-12-18 06:01:18 -08:00
|
|
|
EngineTestHelper eth(TEST_ISSUE_898, &boardConfigurationForIssue898);
|
2019-08-08 18:27:57 -07:00
|
|
|
|
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
|
|
|
|
2021-06-23 03:37:32 -07:00
|
|
|
ASSERT_EQ( 2, eth.recentWarnings()->getCount()) << "warningCounter#testFuelSchedulerBug299smallAndMedium";
|
|
|
|
ASSERT_EQ(CUSTOM_ERR_BOTH_FRONTS_REQUIRED, eth.recentWarnings()->get(0));
|
|
|
|
ASSERT_EQ(CUSTOM_ERR_TRIGGER_SYNC, eth.recentWarnings()->get(1));
|
2019-08-08 18:27:57 -07:00
|
|
|
}
|