This commit is contained in:
rusefillc 2022-09-04 23:38:43 -04:00
parent e5fda69161
commit a91ff4d788
1 changed files with 17 additions and 0 deletions

17
util/test/test_scaled.cpp Normal file
View File

@ -0,0 +1,17 @@
#include <rusefi/scaled_channel.h>
#include <gtest/gtest.h>
#include <math.h>
TEST(Util_Scaled, float_equals) {
float f1 = 3;
float f2 = 3;
EXPECT_TRUE(f1 == f2);
scaled_channel<float, 1, 1> s1 = 3;
EXPECT_TRUE(f1 == s1);
scaled_channel<float, 1, 1> s3 = 3.1;
EXPECT_FALSE(f1 == s3);
}