LCOV - code coverage report
Current view: top level - unit_tests/test_basic_math - test_find_index.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 11 11 100.0 %
Date: 2024-07-27 05:50:15 Functions: 4 4 100.0 %

          Line data    Source code
       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           4 : TEST(misc, testSetTableValue) {
      12           1 :         printf("*************************************************** testSetTableValue\r\n");
      13             : 
      14           1 :         persistent_config_s config;
      15             : 
      16          17 :         for (int i = 0; i < CLT_CURVE_SIZE; i++) {
      17          16 :                 config.cltFuelCorrBins[i] = -40 + i * 10;
      18          16 :                 config.cltFuelCorr[i] = 1;
      19             :         }
      20             : 
      21           1 :         ASSERT_EQ(1, config.cltFuelCorr[0]);
      22             : 
      23           1 :         setCurveValue(config.cltFuelCorrBins, config.cltFuelCorr, CLT_CURVE_SIZE, -40, 1.5);
      24           1 :         ASSERT_FLOAT_EQ(1.5, config.cltFuelCorr[0]);
      25             : 
      26           1 :         setCurveValue(config.cltFuelCorrBins, config.cltFuelCorr, CLT_CURVE_SIZE, -50, 1.4);
      27           1 :         ASSERT_FLOAT_EQ(1.4, config.cltFuelCorr[0]);
      28             : 
      29             : }

Generated by: LCOV version 1.14