From 10eb790dbe8feb1184dbdd871ba32095a4ddc86d Mon Sep 17 00:00:00 2001 From: LI Daobing Date: Tue, 13 Apr 2021 13:30:19 +0800 Subject: [PATCH] fix ut fail under 32bit system --- src/iptux-utils/UtilsTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/iptux-utils/UtilsTest.cpp b/src/iptux-utils/UtilsTest.cpp index 997b22ea..88a05541 100644 --- a/src/iptux-utils/UtilsTest.cpp +++ b/src/iptux-utils/UtilsTest.cpp @@ -27,7 +27,7 @@ TEST(Utils, numeric_to_size) { EXPECT_STREQ(numeric_to_size(1000000000), "953.7MiB"); EXPECT_STREQ(numeric_to_size(1 << 30), "1.0GiB"); EXPECT_STREQ(numeric_to_size(1000000000000L), "931.3GiB"); - EXPECT_STREQ(numeric_to_size(1L << 40), "1.0TiB"); + EXPECT_STREQ(numeric_to_size((int64_t)1 << 40), "1.0TiB"); EXPECT_STREQ(numeric_to_size(-1), "-1B"); EXPECT_STREQ(numeric_to_size(-1024), "-1024B"); }