From a91ff4d788720a2ea94e309796729ffb83c58df5 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Sun, 4 Sep 2022 23:38:43 -0400 Subject: [PATCH] coverage --- util/test/test_scaled.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 util/test/test_scaled.cpp diff --git a/util/test/test_scaled.cpp b/util/test/test_scaled.cpp new file mode 100644 index 0000000..ce8fa93 --- /dev/null +++ b/util/test/test_scaled.cpp @@ -0,0 +1,17 @@ +#include + +#include +#include + +TEST(Util_Scaled, float_equals) { + + float f1 = 3; + float f2 = 3; + EXPECT_TRUE(f1 == f2); + + scaled_channel s1 = 3; + EXPECT_TRUE(f1 == s1); + + scaled_channel s3 = 3.1; + EXPECT_FALSE(f1 == s3); +}