Run idmap2 static-checks and fix formatting issues
Bug: 130324774
Test: builds
Change-Id: I2cf9d3aa268ffe38e525fadee9d81fc6aefe19b1
diff --git a/cmds/idmap2/tests/BinaryStreamVisitorTests.cpp b/cmds/idmap2/tests/BinaryStreamVisitorTests.cpp
index 9a5b633..9cdc86c 100644
--- a/cmds/idmap2/tests/BinaryStreamVisitorTests.cpp
+++ b/cmds/idmap2/tests/BinaryStreamVisitorTests.cpp
@@ -19,17 +19,14 @@
#include <string>
#include <utility>
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
-
+#include "TestHelpers.h"
#include "androidfw/ApkAssets.h"
#include "androidfw/Idmap.h"
-
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
#include "idmap2/BinaryStreamVisitor.h"
#include "idmap2/Idmap.h"
-#include "TestHelpers.h"
-
using ::testing::NotNull;
namespace android::idmap2 {
diff --git a/cmds/idmap2/tests/CommandLineOptionsTests.cpp b/cmds/idmap2/tests/CommandLineOptionsTests.cpp
index d567af6..6e83fc9 100644
--- a/cmds/idmap2/tests/CommandLineOptionsTests.cpp
+++ b/cmds/idmap2/tests/CommandLineOptionsTests.cpp
@@ -25,19 +25,16 @@
#include <string>
#include <vector>
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
-
+#include "TestHelpers.h"
#include "android-base/file.h"
#include "androidfw/ApkAssets.h"
#include "androidfw/Idmap.h"
#include "androidfw/LoadedArsc.h"
-
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
#include "idmap2/CommandLineOptions.h"
#include "idmap2/Idmap.h"
-#include "TestHelpers.h"
-
namespace android::idmap2 {
TEST(CommandLineOptionsTests, Flag) {
diff --git a/cmds/idmap2/tests/FileUtilsTests.cpp b/cmds/idmap2/tests/FileUtilsTests.cpp
index 34a0097..f4a306e 100644
--- a/cmds/idmap2/tests/FileUtilsTests.cpp
+++ b/cmds/idmap2/tests/FileUtilsTests.cpp
@@ -15,19 +15,17 @@
*/
#include <dirent.h>
+
#include <set>
#include <string>
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
-
+#include "TestHelpers.h"
#include "android-base/macros.h"
#include "android-base/stringprintf.h"
-#include "private/android_filesystem_config.h"
-
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
#include "idmap2/FileUtils.h"
-
-#include "TestHelpers.h"
+#include "private/android_filesystem_config.h"
using ::testing::NotNull;
diff --git a/cmds/idmap2/tests/Idmap2BinaryTests.cpp b/cmds/idmap2/tests/Idmap2BinaryTests.cpp
index 91bc4dd..47af9b5 100644
--- a/cmds/idmap2/tests/Idmap2BinaryTests.cpp
+++ b/cmds/idmap2/tests/Idmap2BinaryTests.cpp
@@ -34,16 +34,13 @@
#include <string>
#include <vector>
+#include "TestHelpers.h"
+#include "androidfw/PosixUtils.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
-
-#include "androidfw/PosixUtils.h"
-#include "private/android_filesystem_config.h"
-
#include "idmap2/FileUtils.h"
#include "idmap2/Idmap.h"
-
-#include "TestHelpers.h"
+#include "private/android_filesystem_config.h"
using ::android::util::ExecuteBinary;
using ::testing::NotNull;
diff --git a/cmds/idmap2/tests/IdmapTests.cpp b/cmds/idmap2/tests/IdmapTests.cpp
index 621f503..90fe9a7 100644
--- a/cmds/idmap2/tests/IdmapTests.cpp
+++ b/cmds/idmap2/tests/IdmapTests.cpp
@@ -15,7 +15,6 @@
*/
#include <cstdio> // fclose
-
#include <fstream>
#include <memory>
#include <sstream>
@@ -23,18 +22,15 @@
#include <utility>
#include <vector>
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
-
+#include "TestHelpers.h"
#include "android-base/macros.h"
#include "androidfw/ApkAssets.h"
-
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
#include "idmap2/BinaryStreamVisitor.h"
#include "idmap2/CommandLineOptions.h"
#include "idmap2/Idmap.h"
-#include "TestHelpers.h"
-
using ::testing::IsNull;
using ::testing::NotNull;
diff --git a/cmds/idmap2/tests/Main.cpp b/cmds/idmap2/tests/Main.cpp
index 2b13fed..3e753e9 100644
--- a/cmds/idmap2/tests/Main.cpp
+++ b/cmds/idmap2/tests/Main.cpp
@@ -16,11 +16,9 @@
#include <string>
-#include "android-base/file.h"
-
-#include "gtest/gtest.h"
-
#include "TestHelpers.h"
+#include "android-base/file.h"
+#include "gtest/gtest.h"
namespace android::idmap2 {
diff --git a/cmds/idmap2/tests/PoliciesTests.cpp b/cmds/idmap2/tests/PoliciesTests.cpp
index a76da53..e30da76 100644
--- a/cmds/idmap2/tests/PoliciesTests.cpp
+++ b/cmds/idmap2/tests/PoliciesTests.cpp
@@ -16,9 +16,8 @@
#include <string>
-#include "gtest/gtest.h"
-
#include "TestHelpers.h"
+#include "gtest/gtest.h"
#include "idmap2/Policies.h"
using android::idmap2::PolicyBitmask;
diff --git a/cmds/idmap2/tests/PrettyPrintVisitorTests.cpp b/cmds/idmap2/tests/PrettyPrintVisitorTests.cpp
index 27a3880..c412504 100644
--- a/cmds/idmap2/tests/PrettyPrintVisitorTests.cpp
+++ b/cmds/idmap2/tests/PrettyPrintVisitorTests.cpp
@@ -18,18 +18,15 @@
#include <sstream>
#include <string>
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
-
+#include "TestHelpers.h"
#include "androidfw/ApkAssets.h"
#include "androidfw/Idmap.h"
-
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
#include "idmap2/Idmap.h"
#include "idmap2/Policies.h"
#include "idmap2/PrettyPrintVisitor.h"
-#include "TestHelpers.h"
-
using ::testing::NotNull;
using android::ApkAssets;
diff --git a/cmds/idmap2/tests/RawPrintVisitorTests.cpp b/cmds/idmap2/tests/RawPrintVisitorTests.cpp
index 7372148..64518fd 100644
--- a/cmds/idmap2/tests/RawPrintVisitorTests.cpp
+++ b/cmds/idmap2/tests/RawPrintVisitorTests.cpp
@@ -19,14 +19,12 @@
#include <sstream>
#include <string>
+#include "TestHelpers.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
-
#include "idmap2/Idmap.h"
#include "idmap2/RawPrintVisitor.h"
-#include "TestHelpers.h"
-
using ::testing::NotNull;
namespace android::idmap2 {
diff --git a/cmds/idmap2/tests/ResourceUtilsTests.cpp b/cmds/idmap2/tests/ResourceUtilsTests.cpp
index ad78685..9ed807c 100644
--- a/cmds/idmap2/tests/ResourceUtilsTests.cpp
+++ b/cmds/idmap2/tests/ResourceUtilsTests.cpp
@@ -17,15 +17,13 @@
#include <memory>
#include <string>
+#include "TestHelpers.h"
+#include "androidfw/ApkAssets.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
-
-#include "androidfw/ApkAssets.h"
#include "idmap2/ResourceUtils.h"
#include "idmap2/Result.h"
-#include "TestHelpers.h"
-
using ::testing::NotNull;
namespace android::idmap2 {
diff --git a/cmds/idmap2/tests/ResultTests.cpp b/cmds/idmap2/tests/ResultTests.cpp
index 5f4daed..cbced0a 100644
--- a/cmds/idmap2/tests/ResultTests.cpp
+++ b/cmds/idmap2/tests/ResultTests.cpp
@@ -20,7 +20,6 @@
#include "gmock/gmock.h"
#include "gtest/gtest.h"
-
#include "idmap2/Result.h"
namespace android::idmap2 {
diff --git a/cmds/idmap2/tests/TestHelpers.h b/cmds/idmap2/tests/TestHelpers.h
index 45525a5..adea329 100644
--- a/cmds/idmap2/tests/TestHelpers.h
+++ b/cmds/idmap2/tests/TestHelpers.h
@@ -19,6 +19,9 @@
#include <string>
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
+
namespace android::idmap2 {
const unsigned char idmap_raw_data[] = {
diff --git a/cmds/idmap2/tests/XmlTests.cpp b/cmds/idmap2/tests/XmlTests.cpp
index fe79d8f..df63211 100644
--- a/cmds/idmap2/tests/XmlTests.cpp
+++ b/cmds/idmap2/tests/XmlTests.cpp
@@ -16,13 +16,11 @@
#include <cstdio> // fclose
-#include "idmap2/Xml.h"
-#include "idmap2/ZipFile.h"
-
+#include "TestHelpers.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
-
-#include "TestHelpers.h"
+#include "idmap2/Xml.h"
+#include "idmap2/ZipFile.h"
using ::testing::IsNull;
using ::testing::NotNull;
diff --git a/cmds/idmap2/tests/ZipFileTests.cpp b/cmds/idmap2/tests/ZipFileTests.cpp
index 79be43c..3fca436 100644
--- a/cmds/idmap2/tests/ZipFileTests.cpp
+++ b/cmds/idmap2/tests/ZipFileTests.cpp
@@ -17,13 +17,11 @@
#include <cstdio> // fclose
#include <string>
-#include "idmap2/Result.h"
-#include "idmap2/ZipFile.h"
-
+#include "TestHelpers.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
-
-#include "TestHelpers.h"
+#include "idmap2/Result.h"
+#include "idmap2/ZipFile.h"
using ::testing::IsNull;
using ::testing::NotNull;