# 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/distributeddatamgr/pasteboard/pasteboard.gni") config("module_private_config") { visibility = [ ":*" ] include_dirs = [ "${pasteboard_innerkits_path}/include", "${pasteboard_service_path}/dfx/src", "${pasteboard_service_path}/dfx/src/behaviour", "${pasteboard_service_path}/dfx/src/fault", "${pasteboard_service_path}/dfx/src/statistic", "include", "unittest/include", "//base/security/access_token/interfaces/innerkits/accesstoken/include", "//foundation/distributeddatamgr/pasteboard/framework/tlv", "//foundation/distributeddatamgr/pasteboard/framework/uri", ] } module_output_path = "pasteboard/pasteboard_service" ohos_unittest("PasteboardServiceTest") { module_out_path = module_output_path sources = [ "${pasteboard_service_path}/dfx/src/behaviour/pasteboard_behaviour_reporter_impl.cpp", "${pasteboard_service_path}/dfx/src/fault/pasteboard_fault_impl.cpp", "${pasteboard_service_path}/dfx/src/reporter.cpp", "${pasteboard_service_path}/dfx/src/statistic/time_consuming_statistic_impl.cpp", "unittest/src/dfx_test.cpp", "unittest/src/paste_service_test.cpp", ] configs = [ "//commonlibrary/c_utils/base:utils_config", ":module_private_config", ] external_deps = [ "ability_base:want", "ability_base:zuri", "access_token:libaccesstoken_sdk", "c_utils:utils", "hilog:libhilog", "image_framework:image_native", "ipc:ipc_core", "os_account:os_account_innerkits", ] deps = [ "${pasteboard_innerkits_path}:pasteboard_client", "//base/security/access_token/interfaces/innerkits/token_setproc:libtoken_setproc", "//third_party/googletest:gtest_main", ] } group("unittest") { testonly = true deps = [] deps += [ ":PasteboardServiceTest" ] }