# Copyright (C) 2022 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/barrierfree/accessibility/accessibility_aafwk.gni") module_output_path = "accessibility/framework_test" ############################################################################### config("module_private_config") { visibility = [ ":*" ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } include_dirs = [ "${ability_base_path}/interfaces/inner_api/base/include", "${ability_base_path}/interfaces/kits/native/uri/include", "${ability_base_path}/interfaces/kits/native/want/include", "//base/notification/common_event_service/interfaces/inner_api", "//base/startup/syspara_lite/interfaces/innerkits/native/syspara/include", "//base/powermgr/power_manager/interfaces/innerkits/native/include", "//foundation/barrierfree/accessibility/services/interface/include", "//foundation/barrierfree/accessibility/frameworks/acfwk/include", "//foundation/barrierfree/accessibility/interfaces/innerkits/acfwk/include", "//foundation/barrierfree/accessibility/services/aams/test/mock/include", "//foundation/barrierfree/accessibility/services/test/mock", "//foundation/barrierfree/accessibility/common/log/include", "//foundation/bundlemanager/bundle_framework/interfaces/inner_api/appexecfwk_base/include", "//foundation/bundlemanager/bundle_framework/interfaces/inner_api/appexecfwk_core/include", "//foundation/bundlemanager/bundle_framework/interfaces/inner_api/appexecfwk_core/include/bundlemgr", "//third_party/json/include", ] defines = [ "AAMS_LOG_TAG = \"accessibility_test\"", "AAMS_LOG_DOMAIN = 0xD001D05", ] } ohos_unittest("ac_unit_test") { module_out_path = module_output_path sources = [ "../src/accessibility_config.cpp", "../src/accessibility_config_impl.cpp", "//foundation/barrierfree/accessibility/services/test/mock/mock_accessible_ability_manager_service_stub.cpp", "//foundation/barrierfree/accessibility/services/test/mock/mock_parameter.c", "mock/src/mock_service_registry.cpp", "unittest/accessibility_config_impl_test.cpp", ] configs = [ ":module_private_config", "//foundation/barrierfree/accessibility/resources/config/build:coverage_flags", ] deps = [ "//foundation/barrierfree/accessibility/common/interface:accessibility_interface", "//foundation/barrierfree/accessibility/interfaces/innerkits/common:accessibility_common", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] external_deps = [ "c_utils:utils", "display_manager:displaymgr", "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "samgr:samgr_proxy", ] } ############################################################################### group("unittest") { testonly = true deps = [] deps += [ ":ac_unit_test" ] } ###############################################################################