fix tests
This commit is contained in:
parent
d57465a6d3
commit
8b305acf68
|
@ -319,7 +319,6 @@ void setupSimpleTestEngineWithMaf(EngineTestHelper *eth, injection_mode_e inject
|
|||
|
||||
eth->clearQueue();
|
||||
|
||||
ASSERT_EQ(LM_MOCK, engineConfiguration->fuelAlgorithm);
|
||||
engineConfiguration->isIgnitionEnabled = false; // let's focus on injection
|
||||
engineConfiguration->specs.cylindersCount = 4;
|
||||
// a bit of flexibility - the mode may be changed by some tests
|
||||
|
|
|
@ -11,8 +11,12 @@
|
|||
#include "sensor.h"
|
||||
#include "fsio_impl.h"
|
||||
|
||||
using ::testing::_;
|
||||
|
||||
TEST(fuelCut, coasting) {
|
||||
WITH_ENGINE_TEST_HELPER(TEST_ENGINE);
|
||||
EXPECT_CALL(eth.mockAirmass, getAirmass(_))
|
||||
.WillRepeatedly(Return(AirmassResult{0.1008f, 50.0f}));
|
||||
|
||||
// configure coastingFuelCut
|
||||
engineConfiguration->coastingFuelCutEnabled = true;
|
||||
|
|
|
@ -21,6 +21,7 @@ using ::testing::FloatNear;
|
|||
TEST(misc, testFuelMap) {
|
||||
printf("Setting up FORD_ASPIRE_1996\r\n");
|
||||
WITH_ENGINE_TEST_HELPER(FORD_ASPIRE_1996);
|
||||
engineConfiguration->fuelAlgorithm = LM_PLAIN_MAF;
|
||||
|
||||
printf("Filling fuel map\r\n");
|
||||
for (int k = 0; k < FUEL_LOAD_COUNT; k++) {
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
#include "trigger_universal.h"
|
||||
#include "sensor.h"
|
||||
|
||||
using ::testing::_;
|
||||
|
||||
extern WarningCodeState unitTestWarningCodeState;
|
||||
extern bool printTriggerDebug;
|
||||
extern float actualSynchGap;
|
||||
|
@ -295,9 +297,10 @@ static void assertREqualsM(const char *msg, void *expected, void *actual) {
|
|||
extern bool_t debugSignalExecutor;
|
||||
|
||||
TEST(misc, testRpmCalculator) {
|
||||
printf("*************************************************** testRpmCalculator\r\n");
|
||||
|
||||
WITH_ENGINE_TEST_HELPER(FORD_INLINE_6_1995);
|
||||
EXPECT_CALL(eth.mockAirmass, getAirmass(_))
|
||||
.WillRepeatedly(Return(AirmassResult{0.1008f, 50.0f}));
|
||||
|
||||
IgnitionEventList *ilist = &engine->ignitionEvents;
|
||||
ASSERT_EQ( 0, ilist->isReady) << "size #1";
|
||||
|
||||
|
@ -588,6 +591,8 @@ static void assertInjectionEventBatch(const char *msg, InjectionEvent *ev, int i
|
|||
}
|
||||
|
||||
static void setTestBug299(EngineTestHelper *eth) {
|
||||
// TODO: switch to mock airmass
|
||||
eth->persistentConfig.engineConfiguration.fuelAlgorithm = LM_PLAIN_MAF;
|
||||
setupSimpleTestEngineWithMafAndTT_ONE_trigger(eth);
|
||||
Engine *engine = ð->engine;
|
||||
EXPAND_Engine
|
||||
|
@ -977,6 +982,8 @@ TEST(big, testFuelSchedulerBug299smallAndMedium) {
|
|||
TEST(big, testTwoWireBatch) {
|
||||
WITH_ENGINE_TEST_HELPER(TEST_ENGINE);
|
||||
setupSimpleTestEngineWithMafAndTT_ONE_trigger(ð);
|
||||
EXPECT_CALL(eth.mockAirmass, getAirmass(_))
|
||||
.WillRepeatedly(Return(AirmassResult{0.1008f, 50.0f}));
|
||||
|
||||
engineConfiguration->injectionMode = IM_BATCH;
|
||||
engineConfiguration->twoWireBatchInjection = true;
|
||||
|
@ -1002,6 +1009,9 @@ TEST(big, testTwoWireBatch) {
|
|||
|
||||
TEST(big, testSequential) {
|
||||
WITH_ENGINE_TEST_HELPER(TEST_ENGINE);
|
||||
EXPECT_CALL(eth.mockAirmass, getAirmass(_))
|
||||
.WillRepeatedly(Return(AirmassResult{0.1008f, 50.0f}));
|
||||
|
||||
setupSimpleTestEngineWithMafAndTT_ONE_trigger(ð);
|
||||
|
||||
engineConfiguration->injectionMode = IM_SEQUENTIAL;
|
||||
|
|
Loading…
Reference in New Issue