Update utils_test explicit unsigned literals
There exist a combination of gmock, and std::filesystem that creates an
error of the from:
```
if (lhs == rhs) {
'const int' and 'const long long unsigned int'
```
for the follow block
```
EXPECT_EQ(3, std::filesystem::remove_all("mmcblk0"));
```
We don't see it in CI testing, but we do see it in builds.
Possibly an architecture related issue.
Signed-off-by: John Edward Broadbent <jebr@google.com>
Change-Id: I8170567494082914e338104e7e126b54d86ddc5e
diff --git a/src/test/util_test.cpp b/src/test/util_test.cpp
index 807eb20..9059d76 100644
--- a/src/test/util_test.cpp
+++ b/src/test/util_test.cpp
@@ -93,9 +93,9 @@
EXPECT_EQ("luks-mmcblk0", luksName);
/* Delete the dummy files. */
- EXPECT_EQ(3, std::filesystem::remove_all("mmcblk0"));
- EXPECT_EQ(3, std::filesystem::remove_all("abc"));
- EXPECT_EQ(2, std::filesystem::remove_all("def"));
+ EXPECT_EQ(3U, std::filesystem::remove_all("mmcblk0"));
+ EXPECT_EQ(3U, std::filesystem::remove_all("abc"));
+ EXPECT_EQ(2U, std::filesystem::remove_all("def"));
}
/* Test case where the "Type" property doesn't exist. */
@@ -131,9 +131,9 @@
deviceFile, sysfsDir, luksName));
/* Delete the dummy files. */
- EXPECT_EQ(3, std::filesystem::remove_all("mmcblk0"));
- EXPECT_EQ(3, std::filesystem::remove_all("abc"));
- EXPECT_EQ(2, std::filesystem::remove_all("def"));
+ EXPECT_EQ(3U, std::filesystem::remove_all("mmcblk0"));
+ EXPECT_EQ(3U, std::filesystem::remove_all("abc"));
+ EXPECT_EQ(2U, std::filesystem::remove_all("def"));
}
/* Test case where the device type is not supported. */
@@ -171,9 +171,9 @@
deviceFile, sysfsDir, luksName));
/* Delete the dummy files. */
- EXPECT_EQ(3, std::filesystem::remove_all("mmcblk0"));
- EXPECT_EQ(3, std::filesystem::remove_all("abc"));
- EXPECT_EQ(2, std::filesystem::remove_all("def"));
+ EXPECT_EQ(3U, std::filesystem::remove_all("mmcblk0"));
+ EXPECT_EQ(3U, std::filesystem::remove_all("abc"));
+ EXPECT_EQ(2U, std::filesystem::remove_all("def"));
}
/* Test case where we can't find the device file. */
@@ -204,8 +204,8 @@
deviceFile, sysfsDir, luksName));
/* Delete the dummy files. */
- EXPECT_EQ(3, std::filesystem::remove_all("abc"));
- EXPECT_EQ(2, std::filesystem::remove_all("def"));
+ EXPECT_EQ(3U, std::filesystem::remove_all("abc"));
+ EXPECT_EQ(2U, std::filesystem::remove_all("def"));
}
} // namespace estoraged_test