test: average: avoid unwanted implicit type deduction
Avoid undesired implicit type deduction of std::make_pair with integer
literal arguments. Ensure the correct type of int64_t is always
deduced; long is not 64 bits wide on all platforms.
Change-Id: I48bbb8a9f4f8a9a0fececdd03052a7dbdeefd69c
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/test/average_unittest.cpp b/test/average_unittest.cpp
index 9eef0f8..84e4d3f 100644
--- a/test/average_unittest.cpp
+++ b/test/average_unittest.cpp
@@ -23,7 +23,8 @@
av.setAverageValue(std::make_pair("power", "1"), std::make_pair(2L, 2L));
auto value = av.getAverageValue(std::make_pair("power", "1"));
- EXPECT_TRUE(value == std::make_pair(2L, 2L));
+ auto expected = Average::averageValue(2, 2);
+ EXPECT_TRUE(value == expected);
}
TEST(AverageTest, ZeroDelta)