1885b47fbSopenharmony_ci# Copyright (C) 2022 Huawei Device Co., Ltd.
2885b47fbSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3885b47fbSopenharmony_ci# you may not use this file except in compliance with the License.
4885b47fbSopenharmony_ci# You may obtain a copy of the License at
5885b47fbSopenharmony_ci#
6885b47fbSopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7885b47fbSopenharmony_ci#
8885b47fbSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9885b47fbSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10885b47fbSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11885b47fbSopenharmony_ci# See the License for the specific language governing permissions and
12885b47fbSopenharmony_ci# limitations under the License.
13885b47fbSopenharmony_ci
14885b47fbSopenharmony_ciimport("//build/test.gni")
15885b47fbSopenharmony_ci
16885b47fbSopenharmony_cimodule_output_path = "accessibility/accessibility"
17885b47fbSopenharmony_ci
18885b47fbSopenharmony_ci###############################################################################
19885b47fbSopenharmony_ciconfig("module_private_config") {
20885b47fbSopenharmony_ci  visibility = [ ":*" ]
21885b47fbSopenharmony_ci  cflags = []
22885b47fbSopenharmony_ci  if (target_cpu == "arm") {
23885b47fbSopenharmony_ci    cflags += [ "-DBINDER_IPC_32BIT" ]
24885b47fbSopenharmony_ci  }
25885b47fbSopenharmony_ci  include_dirs = [
26885b47fbSopenharmony_ci    "../../../common/log/include",
27885b47fbSopenharmony_ci    "../../../interfaces/innerkits/common/include",
28885b47fbSopenharmony_ci  ]
29885b47fbSopenharmony_ci  defines = [
30885b47fbSopenharmony_ci    "AAMS_LOG_TAG = \"accessibility_test\"",
31885b47fbSopenharmony_ci    "AAMS_LOG_DOMAIN = 0xD001D05",
32885b47fbSopenharmony_ci  ]
33885b47fbSopenharmony_ci}
34885b47fbSopenharmony_ci
35885b47fbSopenharmony_ciohos_unittest("accessibility_common_test") {
36885b47fbSopenharmony_ci  module_out_path = module_output_path
37885b47fbSopenharmony_ci  sources = [
38885b47fbSopenharmony_ci    "../src/accessibility_element_info.cpp",
39885b47fbSopenharmony_ci    "../src/accessibility_event_info.cpp",
40885b47fbSopenharmony_ci    "unittest/accessibility_ability_info_test.cpp",
41885b47fbSopenharmony_ci    "unittest/accessibility_element_info_test.cpp",
42885b47fbSopenharmony_ci    "unittest/accessibility_event_info_test.cpp",
43885b47fbSopenharmony_ci    "unittest/accessibility_window_info_test.cpp",
44885b47fbSopenharmony_ci  ]
45885b47fbSopenharmony_ci
46885b47fbSopenharmony_ci  configs = [
47885b47fbSopenharmony_ci    ":module_private_config",
48885b47fbSopenharmony_ci    "../../../resources/config/build:coverage_flags",
49885b47fbSopenharmony_ci  ]
50885b47fbSopenharmony_ci
51885b47fbSopenharmony_ci  deps = [
52885b47fbSopenharmony_ci    "../../../../../../third_party/googletest:gmock_main",
53885b47fbSopenharmony_ci    "../../../../../../third_party/googletest:gtest_main",
54885b47fbSopenharmony_ci    "../../../interfaces/innerkits/common:accessibility_common",
55885b47fbSopenharmony_ci  ]
56885b47fbSopenharmony_ci
57885b47fbSopenharmony_ci  external_deps = [ "hilog:libhilog" ]
58885b47fbSopenharmony_ci}
59885b47fbSopenharmony_ci
60885b47fbSopenharmony_ci###############################################################################
61885b47fbSopenharmony_ci
62885b47fbSopenharmony_cigroup("unittest") {
63885b47fbSopenharmony_ci  testonly = true
64885b47fbSopenharmony_ci  deps = []
65885b47fbSopenharmony_ci
66885b47fbSopenharmony_ci  deps += [ ":accessibility_common_test" ]
67885b47fbSopenharmony_ci}
68885b47fbSopenharmony_ci###############################################################################
69