summaryrefslogtreecommitdiff
path: root/cmds/idmap2/tests/Idmap2BinaryTests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cmds/idmap2/tests/Idmap2BinaryTests.cpp')
-rw-r--r--cmds/idmap2/tests/Idmap2BinaryTests.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/cmds/idmap2/tests/Idmap2BinaryTests.cpp b/cmds/idmap2/tests/Idmap2BinaryTests.cpp
index 5c4e8576985b..255f3c102b85 100644
--- a/cmds/idmap2/tests/Idmap2BinaryTests.cpp
+++ b/cmds/idmap2/tests/Idmap2BinaryTests.cpp
@@ -51,15 +51,17 @@ namespace idmap2 {
class Idmap2BinaryTests : public Idmap2Tests {};
-static void AssertIdmap(const Idmap& idmap, const std::string& target_apk_path,
- const std::string& overlay_apk_path) {
+namespace {
+
+void AssertIdmap(const Idmap& idmap, const std::string& target_apk_path,
+ const std::string& overlay_apk_path) {
// check that the idmap file looks reasonable (IdmapTests is responsible for
// more in-depth verification)
ASSERT_EQ(idmap.GetHeader()->GetMagic(), kIdmapMagic);
ASSERT_EQ(idmap.GetHeader()->GetVersion(), kIdmapCurrentVersion);
ASSERT_EQ(idmap.GetHeader()->GetTargetPath(), target_apk_path);
ASSERT_EQ(idmap.GetHeader()->GetOverlayPath(), overlay_apk_path);
- ASSERT_EQ(idmap.GetData().size(), 1u);
+ ASSERT_EQ(idmap.GetData().size(), 1U);
}
#define ASSERT_IDMAP(idmap_ref, target_apk_path, overlay_apk_path) \
@@ -67,6 +69,8 @@ static void AssertIdmap(const Idmap& idmap, const std::string& target_apk_path,
ASSERT_NO_FATAL_FAILURE(AssertIdmap(idmap_ref, target_apk_path, overlay_apk_path)); \
} while (0)
+} // namespace
+
TEST_F(Idmap2BinaryTests, Create) {
// clang-format off
auto result = ExecuteBinary({"idmap2",