1# Copyright (C) 2022-2023 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/test.gni") 15import("//foundation/barrierfree/accessibility/accessibility_aafwk.gni") 16 17module_output_path = "accessibility/framework_test" 18 19############################################################################### 20config("module_private_config") { 21 visibility = [ ":*" ] 22 cflags = [] 23 if (target_cpu == "arm") { 24 cflags += [ "-DBINDER_IPC_32BIT" ] 25 } 26 include_dirs = [ 27 "//foundation/barrierfree/accessibility/common/log/include", 28 "//foundation/barrierfree/accessibility/frameworks/aafwk/include", 29 "//foundation/barrierfree/accessibility/frameworks/acfwk/include", 30 "//foundation/barrierfree/accessibility/frameworks/asacfwk/include", 31 "//foundation/barrierfree/accessibility/frameworks/asacfwk/test/mock/include", 32 "//foundation/barrierfree/accessibility/interfaces/innerkits/acfwk/include", 33 "//foundation/barrierfree/accessibility/interfaces/innerkits/asacfwk/include", 34 "//foundation/barrierfree/accessibility/services/test/mock/common", 35 ] 36 defines = [ 37 "AAMS_LOG_DOMAIN = 0xD001D05", 38 "AAMS_LOG_TAG = \"accessibility_test\"", 39 ] 40} 41 42ohos_unittest("asac_unit_test") { 43 module_out_path = module_output_path 44 sources = [ 45 "../../../services/test/mock/mock_parameter.c", 46 "../src/accessibility_element_operator_impl.cpp", 47 "../src/accessibility_system_ability_client_impl.cpp", 48 "//foundation/barrierfree/accessibility/frameworks/aafwk/src/accessibility_element_operator_callback_impl.cpp", 49 "//foundation/barrierfree/accessibility/services/test/mock/mock_accessible_ability_manager_service_stub.cpp", 50 "//foundation/barrierfree/accessibility/services/test/mock/mock_bundle_manager.cpp", 51 "//foundation/barrierfree/accessibility/services/test/mock/mock_service_registry.cpp", 52 "unittest/accessibility_element_operator_impl_test.cpp", 53 "unittest/accessibility_system_ability_client_impl_test.cpp", 54 ] 55 56 configs = [ 57 ":module_private_config", 58 "//foundation/barrierfree/accessibility/resources/config/build:coverage_flags", 59 ] 60 61 deps = [ 62 "//foundation/barrierfree/accessibility/common/interface:accessibility_interface", 63 "//foundation/barrierfree/accessibility/interfaces/innerkits/common:accessibility_common", 64 "//third_party/googletest:gmock_main", 65 "//third_party/googletest:gtest_main", 66 ] 67 68 external_deps = [ 69 "ability_base:want", 70 "ability_runtime:ability_manager", 71 "c_utils:utils", 72 "eventhandler:libeventhandler", 73 "hiviewdfx_hilog_native:libhilog", 74 "ipc:ipc_core", 75 ] 76} 77 78############################################################################### 79group("unittest") { 80 testonly = true 81 deps = [] 82 83 deps += [ ":asac_unit_test" ] 84} 85############################################################################### 86