GCC Code Coverage Report


Directory: ./
File: unit_tests/test_basic_math/test_find_index.cpp
Date: 2025-10-24 15:43:41
Coverage Exec Excl Total
Lines: -% 0 0 0
Functions: -% 0 0 0
Branches: -% 0 0 0
Decisions: -% 0 - 0

Line Branch Decision Exec Source
1 /*
2 * test_find_index.cpp
3 *
4 * Created on: Oct 30, 2013
5 * @author Andrey Belomutskiy, (c) 2012-2020
6 */
7
8 #include "pch.h"
9 #include "efi_interpolation.h"
10
11 TEST(misc, testSetTableValue) {
12 printf("*************************************************** testSetTableValue\r\n");
13
14 persistent_config_s config;
15
16 for (int i = 0; i < CLT_CURVE_SIZE; i++) {
17 config.cltFuelCorrBins[i] = -40 + i * 10;
18 config.cltFuelCorr[i] = 1;
19 }
20
21 ASSERT_EQ(1, config.cltFuelCorr[0]);
22
23 setCurveValue(config.cltFuelCorrBins, config.cltFuelCorr, CLT_CURVE_SIZE, -40, 1.5);
24 ASSERT_FLOAT_EQ(1.5, config.cltFuelCorr[0]);
25
26 setCurveValue(config.cltFuelCorrBins, config.cltFuelCorr, CLT_CURVE_SIZE, -50, 1.4);
27 ASSERT_FLOAT_EQ(1.4, config.cltFuelCorr[0]);
28
29 }
30