fome-fw/unit_tests/tests/test_maf2map.cpp

29 lines
511 B
C++
Raw Normal View History

2019-01-12 22:53:58 -08:00
/*
* @file test_maf2map.cpp
2019-01-12 22:53:58 -08:00
*
* @date Jan 13, 2019
2020-01-07 21:02:40 -08:00
* @author Andrey Belomutskiy, (c) 2012-2020
2019-01-12 22:53:58 -08:00
*/
#include "engine_test_helper.h"
#include "maf2map.h"
#define round_2d(x) efiRound(x, 0.01)
2019-01-19 17:29:10 -08:00
TEST(maf2map, util) {
2019-01-12 22:53:58 -08:00
2019-01-19 17:42:29 -08:00
WITH_ENGINE_TEST_HELPER(FORD_ASPIRE_1996);
2019-01-12 22:53:58 -08:00
engineConfiguration->fuelAlgorithm = LM_REAL_MAF;
ASSERT_FLOAT_EQ(61.1, estimateMapByRpmAndMaf(8000, 0.6));
ASSERT_FLOAT_EQ(1.4, estimateMapByRpmAndMaf(2000, 5.6));
2019-01-19 17:29:10 -08:00
}
TEST(maf2map, integrated) {
2019-01-19 17:42:29 -08:00
WITH_ENGINE_TEST_HELPER(MIATA_NA6_VAF);
2019-01-12 22:53:58 -08:00
}