fix compile error when enable meson test option
- Fix compile error:
[-Werror=sign-compare]
Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com>
Change-Id: Iaedcf75b14b7b5526ff6728a33305735470967ca
diff --git a/test/pid_json_unittest.cpp b/test/pid_json_unittest.cpp
index c58f3f4..c76849a 100644
--- a/test/pid_json_unittest.cpp
+++ b/test/pid_json_unittest.cpp
@@ -249,12 +249,14 @@
)"_json;
std::tie(pidConfig, zoneConfig) = buildPIDsFromJson(j2);
- EXPECT_EQ(pidConfig.size(), 1);
- EXPECT_EQ(zoneConfig.size(), 1);
+ EXPECT_EQ(pidConfig.size(), static_cast<u_int64_t>(1));
+ EXPECT_EQ(zoneConfig.size(), static_cast<u_int64_t>(1));
EXPECT_EQ(pidConfig[1]["fan1-5"].type, "fan");
- EXPECT_EQ(zoneConfig[1].cycleTime.cycleIntervalTimeMS, 1000);
- EXPECT_EQ(zoneConfig[1].cycleTime.updateThermalsTimeMS, 1000);
+ EXPECT_EQ(zoneConfig[1].cycleTime.cycleIntervalTimeMS,
+ static_cast<u_int64_t>(1000));
+ EXPECT_EQ(zoneConfig[1].cycleTime.updateThermalsTimeMS,
+ static_cast<u_int64_t>(1000));
EXPECT_DOUBLE_EQ(zoneConfig[1].minThermalOutput, 3000.0);
}