# Copyright (C) 2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/test.gni") import("//foundation/filemanagement/dfs_service/distributedfile.gni") ohos_unittest("dk_asset_read_session_test") { module_out_path = "filemanagement/dfs_service" sources = [ "${distributedfile_path}/adapter/cloud_adapter_example/src/dk_asset_read_session.cpp", "${distributedfile_path}/adapter/cloud_adapter_example/src/dk_error.cpp", "dk_asset_read_session_test.cpp", ] include_dirs = [ "${distributedfile_path}/adapter/cloud_adapter_example/include" ] deps = [ "${utils_path}:libdistributedfiledentry", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] external_deps = [ "c_utils:utils" ] defines = [ "private=public" ] } ohos_unittest("dk_assets_downloader_test") { module_out_path = "filemanagement/dfs_service" sources = [ "${distributedfile_path}/adapter/cloud_adapter_example/src/dk_assets_downloader.cpp", "${distributedfile_path}/adapter/cloud_adapter_example/src/dk_database.cpp", "${distributedfile_path}/adapter/cloud_adapter_example/src/dk_error.cpp", "dk_assets_downloader_test.cpp", ] include_dirs = [ "${distributedfile_path}/adapter/cloud_adapter_example/include" ] deps = [ "${utils_path}:libdistributedfiledentry", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] external_deps = [ "c_utils:utils" ] defines = [ "private=public" ] } ohos_unittest("dk_container_test") { module_out_path = "filemanagement/dfs_service" sources = [ "${distributedfile_path}/adapter/cloud_adapter_example/src/dk_container.cpp", "${distributedfile_path}/adapter/cloud_adapter_example/src/dk_database.cpp", "${distributedfile_path}/adapter/cloud_adapter_example/src/dk_error.cpp", "dk_container_test.cpp", ] include_dirs = [ "${distributedfile_path}/adapter/cloud_adapter_example/include" ] deps = [ "${utils_path}:libdistributedfiledentry", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] external_deps = [ "c_utils:utils" ] defines = [ "private=public" ] } ohos_unittest("dk_error_test") { module_out_path = "filemanagement/dfs_service" sources = [ "${distributedfile_path}/adapter/cloud_adapter_example/src/dk_error.cpp", "dk_error_test.cpp", ] include_dirs = [ "${distributedfile_path}/adapter/cloud_adapter_example/include" ] deps = [ "${utils_path}:libdistributedfiledentry", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] external_deps = [ "c_utils:utils" ] defines = [ "private=public" ] } ohos_unittest("dk_database_test") { module_out_path = "filemanagement/dfs_service" sources = [ "${distributedfile_path}/adapter/cloud_adapter_example/src/dk_asset_read_session.cpp", "${distributedfile_path}/adapter/cloud_adapter_example/src/dk_assets_downloader.cpp", "${distributedfile_path}/adapter/cloud_adapter_example/src/dk_database.cpp", "${distributedfile_path}/adapter/cloud_adapter_example/src/dk_error.cpp", "${distributedfile_path}/adapter/cloud_adapter_example/src/dk_record_field.cpp", "dk_database_test.cpp", ] include_dirs = [ "${distributedfile_path}/adapter/cloud_adapter_example/include" ] deps = [ "${utils_path}:libdistributedfiledentry", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] external_deps = [ "c_utils:utils" ] defines = [ "private=public" ] } ohos_unittest("dk_record_field_test") { module_out_path = "filemanagement/dfs_service" sources = [ "${distributedfile_path}/adapter/cloud_adapter_example/src/dk_error.cpp", "${distributedfile_path}/adapter/cloud_adapter_example/src/dk_record_field.cpp", "dk_record_field_test.cpp", ] include_dirs = [ "${distributedfile_path}/adapter/cloud_adapter_example/include" ] deps = [ "${utils_path}:libdistributedfiledentry", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] external_deps = [ "c_utils:utils" ] defines = [ "private=public" ] } group("cloud_adapter_test") { testonly = true deps = [ ":dk_asset_read_session_test", ":dk_assets_downloader_test", ":dk_container_test", ":dk_database_test", ":dk_error_test", ":dk_record_field_test", ] }