修改文件名

Signed-off-by: onexiaomin <wangminmin4@huawei.com>
This commit is contained in:
onexiaomin 2022-09-14 10:31:50 +08:00
parent 7bc5e7aad3
commit 0aa58addfa
3 changed files with 10 additions and 7 deletions

View File

@ -14,10 +14,10 @@
import("//build/test.gni")
import("//foundation/filemanagement/user_file_service/filemanagement_aafwk.gni")
BASE_DIR = "//foundation/filemanagement/user_file_service"
ohos_unittest("file_access_helper_test") {
ohos_unittest("medialibrary_file_access_test") {
module_out_path = "filemanagement/user_file_service"
sources = [ "file_access_helper_test.cpp" ]
sources = [ "medialibrary_file_access_test.cpp" ]
include_dirs = [
"//foundation/ability/ability_runtime/frameworks/kits/appkit/native/ability_runtime/context",
@ -54,10 +54,10 @@ ohos_unittest("file_access_helper_test") {
]
}
ohos_unittest("file_extension_helper_test") {
ohos_unittest("external_file_access_test") {
module_out_path = "filemanagement/user_file_service"
sources = [ "file_extension_helper_test.cpp" ]
sources = [ "external_file_access_test.cpp" ]
include_dirs = [
"//third_party/googletest/googlemock/include/gmock",
@ -98,7 +98,7 @@ group("user_file_service_test") {
testonly = true
deps = [
":file_access_helper_test",
":file_extension_helper_test",
":medialibrary_file_access_test",
":external_file_access_test",
]
}

View File

@ -179,6 +179,7 @@ HWTEST_F(FileAccessHelperTest, file_access_helper_OpenFile_0000, testing::ext::T
GTEST_LOG_(INFO) << parentUri.ToString();
}
GTEST_LOG_(INFO) << "g_newDirUri=" << g_newDirUri.ToString();
bool isExist = false;
g_fah->Access(g_newDirUri, isExist);
if (!isExist) {
@ -201,7 +202,7 @@ HWTEST_F(FileAccessHelperTest, file_access_helper_OpenFile_0000, testing::ext::T
g_newDirUri = Uri(fileInfoVec[i].uri);
}
}
GTEST_LOG_(INFO) << "fileInfoVec.fileName=" << fileInfoVec[0].fileName;
result = g_fah->Mkdir(g_newDirUri, "test1", newDirUriTest);
EXPECT_EQ(result, OHOS::FileAccessFwk::ERR_OK);
@ -1448,8 +1449,10 @@ HWTEST_F(FileAccessHelperTest, file_access_helper_Move_0011, testing::ext::TestS
EXPECT_GE(g_num, 1);
result = g_fah->Delete(newDirUriTest1);
EXPECT_GE(result, OHOS::FileAccessFwk::ERR_OK);
GTEST_LOG_(INFO) << "Delete-result1=" << result;
result = g_fah->Delete(newDirUriTest2);
EXPECT_GE(result, OHOS::FileAccessFwk::ERR_OK);
GTEST_LOG_(INFO) << "Delete-result2=" << result;
} catch (...) {
GTEST_LOG_(INFO) << "FileAccessHelperTest-an exception occurred.";
}