diff options
author | 2023-03-30 12:35:16 +0000 | |
---|---|---|
committer | 2023-04-05 11:04:51 +0000 | |
commit | ba87ab5ca06eb85300b3b63f420914f76843a4a5 (patch) | |
tree | b86b5946911a42bc1bcc3cac6321e765219371c4 /runtime/hidden_api_test.cc | |
parent | 2bb753eabb80ad9ed90dfef3693c1e72d3d9f689 (diff) |
Fix "readability-redundant-string-cstr" clang-tidy issues
Bug: 264654008
Test: m tidy-art
Change-Id: Ic852d58f106187791fa3a0d31829654de41bcb2b
Diffstat (limited to 'runtime/hidden_api_test.cc')
-rw-r--r-- | runtime/hidden_api_test.cc | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/runtime/hidden_api_test.cc b/runtime/hidden_api_test.cc index c2c40c5af3..3fb447afc9 100644 --- a/runtime/hidden_api_test.cc +++ b/runtime/hidden_api_test.cc @@ -638,14 +638,14 @@ TEST_F(HiddenApiTest, CheckMemberSignatureForProxyClass) { TEST_F(HiddenApiTest, DexDomain_DataDir) { // Load file from a non-system directory and check that it is not flagged as framework. std::string data_location_path = android_data_ + "/foo.jar"; - ASSERT_FALSE(LocationIsOnSystemFramework(data_location_path.c_str())); + ASSERT_FALSE(LocationIsOnSystemFramework(data_location_path)); TestLocation(data_location_path, hiddenapi::Domain::kApplication); } TEST_F(HiddenApiTest, DexDomain_SystemDir) { // Load file from a system, non-framework directory and check that it is not flagged as framework. std::string system_location_path = GetAndroidRoot() + "/foo.jar"; - ASSERT_FALSE(LocationIsOnSystemFramework(system_location_path.c_str())); + ASSERT_FALSE(LocationIsOnSystemFramework(system_location_path)); TestLocation(system_location_path, hiddenapi::Domain::kApplication); } @@ -653,7 +653,7 @@ TEST_F(HiddenApiTest, DexDomain_SystemExtDir) { // Load file from a system_ext, non-framework directory and check that it is not flagged as // framework. std::string system_ext_location_path = android_system_ext_ + "/foo.jar"; - ASSERT_FALSE(LocationIsOnSystemExtFramework(system_ext_location_path.c_str())); + ASSERT_FALSE(LocationIsOnSystemExtFramework(system_ext_location_path)); TestLocation(system_ext_location_path, hiddenapi::Domain::kApplication); } @@ -662,7 +662,7 @@ TEST_F(HiddenApiTest, DexDomain_SystemSystemExtDir) { // framework. std::filesystem::create_directory(GetAndroidRoot() + "/system_ext"); std::string system_ext_location_path = GetAndroidRoot() + "/system_ext/foo.jar"; - ASSERT_FALSE(LocationIsOnSystemExtFramework(system_ext_location_path.c_str())); + ASSERT_FALSE(LocationIsOnSystemExtFramework(system_ext_location_path)); TestLocation(system_ext_location_path, hiddenapi::Domain::kApplication); } @@ -670,7 +670,7 @@ TEST_F(HiddenApiTest, DexDomain_SystemFrameworkDir) { // Load file from a system/framework directory and check that it is flagged as a framework dex. std::filesystem::create_directory(GetAndroidRoot() + "/framework"); std::string system_framework_location_path = GetAndroidRoot() + "/framework/foo.jar"; - ASSERT_TRUE(LocationIsOnSystemFramework(system_framework_location_path.c_str())); + ASSERT_TRUE(LocationIsOnSystemFramework(system_framework_location_path)); TestLocation(system_framework_location_path, hiddenapi::Domain::kPlatform); } @@ -678,7 +678,7 @@ TEST_F(HiddenApiTest, DexDomain_SystemExtFrameworkDir) { // Load file from a system_ext/framework directory and check that it is flagged as a framework dex. std::filesystem::create_directory(android_system_ext_ + "/framework"); std::string system_ext_framework_location_path = android_system_ext_ + "/framework/foo.jar"; - ASSERT_TRUE(LocationIsOnSystemExtFramework(system_ext_framework_location_path.c_str())); + ASSERT_TRUE(LocationIsOnSystemExtFramework(system_ext_framework_location_path)); TestLocation(system_ext_framework_location_path, hiddenapi::Domain::kPlatform); } @@ -689,14 +689,14 @@ TEST_F(HiddenApiTest, DexDomain_SystemSystemExtFrameworkDir) { std::filesystem::create_directory(GetAndroidRoot() + "/system_ext/framework"); std::string system_ext_framework_location_path = GetAndroidRoot() + "/system_ext/framework/foo.jar"; - ASSERT_TRUE(LocationIsOnSystemExtFramework(system_ext_framework_location_path.c_str())); + ASSERT_TRUE(LocationIsOnSystemExtFramework(system_ext_framework_location_path)); TestLocation(system_ext_framework_location_path, hiddenapi::Domain::kPlatform); } TEST_F(HiddenApiTest, DexDomain_DataDir_MultiDex) { // Load multidex file from a non-system directory and check that it is not flagged as framework. std::string data_multi_location_path = android_data_ + "/multifoo.jar"; - ASSERT_FALSE(LocationIsOnSystemFramework(data_multi_location_path.c_str())); + ASSERT_FALSE(LocationIsOnSystemFramework(data_multi_location_path)); TestLocation(data_multi_location_path, hiddenapi::Domain::kApplication); } @@ -704,7 +704,7 @@ TEST_F(HiddenApiTest, DexDomain_SystemDir_MultiDex) { // Load multidex file from a system, non-framework directory and check that it is not flagged // as framework. std::string system_multi_location_path = GetAndroidRoot() + "/multifoo.jar"; - ASSERT_FALSE(LocationIsOnSystemFramework(system_multi_location_path.c_str())); + ASSERT_FALSE(LocationIsOnSystemFramework(system_multi_location_path)); TestLocation(system_multi_location_path, hiddenapi::Domain::kApplication); } @@ -712,7 +712,7 @@ TEST_F(HiddenApiTest, DexDomain_SystemExtDir_MultiDex) { // Load multidex file from a system_ext, non-framework directory and check that it is not flagged // as framework. std::string system_ext_multi_location_path = android_system_ext_ + "/multifoo.jar"; - ASSERT_FALSE(LocationIsOnSystemExtFramework(system_ext_multi_location_path.c_str())); + ASSERT_FALSE(LocationIsOnSystemExtFramework(system_ext_multi_location_path)); TestLocation(system_ext_multi_location_path, hiddenapi::Domain::kApplication); } @@ -722,7 +722,7 @@ TEST_F(HiddenApiTest, DexDomain_SystemSystemExtDir_MultiDex) { std::filesystem::create_directory(GetAndroidRoot() + "/system_ext"); std::string system_ext_multi_location_path = GetAndroidRoot() + "/system_ext/multifoo.jar"; - ASSERT_FALSE(LocationIsOnSystemExtFramework(system_ext_multi_location_path.c_str())); + ASSERT_FALSE(LocationIsOnSystemExtFramework(system_ext_multi_location_path)); TestLocation(system_ext_multi_location_path, hiddenapi::Domain::kApplication); } @@ -731,7 +731,7 @@ TEST_F(HiddenApiTest, DexDomain_SystemFrameworkDir_MultiDex) { // framework dex. std::filesystem::create_directory(GetAndroidRoot() + "/framework"); std::string system_framework_multi_location_path = GetAndroidRoot() + "/framework/multifoo.jar"; - ASSERT_TRUE(LocationIsOnSystemFramework(system_framework_multi_location_path.c_str())); + ASSERT_TRUE(LocationIsOnSystemFramework(system_framework_multi_location_path)); TestLocation(system_framework_multi_location_path, hiddenapi::Domain::kPlatform); } @@ -741,7 +741,7 @@ TEST_F(HiddenApiTest, DexDomain_SystemExtFrameworkDir_MultiDex) { std::filesystem::create_directory(android_system_ext_ + "/framework"); std::string system_ext_framework_multi_location_path = android_system_ext_ + "/framework/multifoo.jar"; - ASSERT_TRUE(LocationIsOnSystemExtFramework(system_ext_framework_multi_location_path.c_str())); + ASSERT_TRUE(LocationIsOnSystemExtFramework(system_ext_framework_multi_location_path)); TestLocation(system_ext_framework_multi_location_path, hiddenapi::Domain::kPlatform); } @@ -752,7 +752,7 @@ TEST_F(HiddenApiTest, DexDomain_SystemSystemExtFrameworkDir_MultiDex) { std::filesystem::create_directory(GetAndroidRoot() + "/system_ext/framework"); std::string system_ext_framework_multi_location_path = GetAndroidRoot() + "/system_ext/framework/multifoo.jar"; - ASSERT_TRUE(LocationIsOnSystemExtFramework(system_ext_framework_multi_location_path.c_str())); + ASSERT_TRUE(LocationIsOnSystemExtFramework(system_ext_framework_multi_location_path)); TestLocation(system_ext_framework_multi_location_path, hiddenapi::Domain::kPlatform); } |