1# Copyright (C) 2022 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") 15 16module_output_path = "accessibility/accessibility" 17 18############################################################################### 19config("module_private_config") { 20 visibility = [ ":*" ] 21 cflags = [] 22 if (target_cpu == "arm") { 23 cflags += [ "-DBINDER_IPC_32BIT" ] 24 } 25 include_dirs = [ 26 "../../../common/log/include", 27 "../../../interfaces/innerkits/common/include", 28 ] 29 defines = [ 30 "AAMS_LOG_TAG = \"accessibility_test\"", 31 "AAMS_LOG_DOMAIN = 0xD001D05", 32 ] 33} 34 35ohos_unittest("accessibility_common_test") { 36 module_out_path = module_output_path 37 sources = [ 38 "../src/accessibility_element_info.cpp", 39 "../src/accessibility_event_info.cpp", 40 "unittest/accessibility_ability_info_test.cpp", 41 "unittest/accessibility_element_info_test.cpp", 42 "unittest/accessibility_event_info_test.cpp", 43 "unittest/accessibility_window_info_test.cpp", 44 ] 45 46 configs = [ 47 ":module_private_config", 48 "../../../resources/config/build:coverage_flags", 49 ] 50 51 deps = [ 52 "../../../../../../third_party/googletest:gmock_main", 53 "../../../../../../third_party/googletest:gtest_main", 54 "../../../interfaces/innerkits/common:accessibility_common", 55 ] 56 57 external_deps = [ "hilog:libhilog" ] 58} 59 60############################################################################### 61 62group("unittest") { 63 testonly = true 64 deps = [] 65 66 deps += [ ":accessibility_common_test" ] 67} 68############################################################################### 69