diff options
Diffstat (limited to 'cmds/installd/tests/installd_utils_test.cpp')
-rw-r--r-- | cmds/installd/tests/installd_utils_test.cpp | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/cmds/installd/tests/installd_utils_test.cpp b/cmds/installd/tests/installd_utils_test.cpp index 4ce559d..5e397f9 100644 --- a/cmds/installd/tests/installd_utils_test.cpp +++ b/cmds/installd/tests/installd_utils_test.cpp @@ -455,6 +455,13 @@ TEST_F(UtilsTest, CreateDataPath) { create_data_path("57f8f4bc-abf4-655f-bf67-946fc0f9f25b")); } +TEST_F(UtilsTest, CreateDataAppPath) { + EXPECT_EQ("/data/app", create_data_app_path(nullptr)); + + EXPECT_EQ("/mnt/expand/57f8f4bc-abf4-655f-bf67-946fc0f9f25b/app", + create_data_app_path("57f8f4bc-abf4-655f-bf67-946fc0f9f25b")); +} + TEST_F(UtilsTest, CreateDataUserPath) { EXPECT_EQ("/data/data", create_data_user_path(nullptr, 0)); EXPECT_EQ("/data/user/10", create_data_user_path(nullptr, 10)); @@ -475,14 +482,21 @@ TEST_F(UtilsTest, CreateDataMediaPath) { create_data_media_path("57f8f4bc-abf4-655f-bf67-946fc0f9f25b", 10)); } -TEST_F(UtilsTest, CreatePackageDataPath) { - EXPECT_EQ("/data/data/com.example", create_package_data_path(nullptr, "com.example", 0)); - EXPECT_EQ("/data/user/10/com.example", create_package_data_path(nullptr, "com.example", 10)); +TEST_F(UtilsTest, CreateDataAppPackagePath) { + EXPECT_EQ("/data/app/com.example", create_data_app_package_path(nullptr, "com.example")); + + EXPECT_EQ("/mnt/expand/57f8f4bc-abf4-655f-bf67-946fc0f9f25b/app/com.example", + create_data_app_package_path("57f8f4bc-abf4-655f-bf67-946fc0f9f25b", "com.example")); +} + +TEST_F(UtilsTest, CreateDataUserPackagePath) { + EXPECT_EQ("/data/data/com.example", create_data_user_package_path(nullptr, 0, "com.example")); + EXPECT_EQ("/data/user/10/com.example", create_data_user_package_path(nullptr, 10, "com.example")); EXPECT_EQ("/mnt/expand/57f8f4bc-abf4-655f-bf67-946fc0f9f25b/user/0/com.example", - create_package_data_path("57f8f4bc-abf4-655f-bf67-946fc0f9f25b", "com.example", 0)); + create_data_user_package_path("57f8f4bc-abf4-655f-bf67-946fc0f9f25b", 0, "com.example")); EXPECT_EQ("/mnt/expand/57f8f4bc-abf4-655f-bf67-946fc0f9f25b/user/10/com.example", - create_package_data_path("57f8f4bc-abf4-655f-bf67-946fc0f9f25b", "com.example", 10)); + create_data_user_package_path("57f8f4bc-abf4-655f-bf67-946fc0f9f25b", 10, "com.example")); } } |