LCOV - code coverage report
Current view: top level - firmware/libfirmware/util/test - test_scaled.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 9 9 100.0 %
Date: 2024-04-25 02:23:43 Functions: 4 4 100.0 %

          Line data    Source code
       1             : #include <rusefi/scaled_channel.h>
       2             : 
       3             : #include <gtest/gtest.h>
       4             : #include <math.h>
       5             : 
       6           4 : TEST(Util_Scaled, float_equals) {
       7             : 
       8           1 :         float f1 = 3;
       9           1 :         float f2 = 3;
      10           1 :         EXPECT_TRUE(f1 == f2);
      11             : 
      12           1 :         scaled_channel<float, 1, 1> s1 = 3;
      13           1 :         EXPECT_TRUE(f1 == s1);
      14             : 
      15           1 :         scaled_channel<float, 1, 1> s3 = 3.1;
      16           1 :         EXPECT_FALSE(f1 == s3);
      17           1 : }

Generated by: LCOV version 1.14