• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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("//foundation/arkui/ace_engine/test/unittest/ace_unittest.gni")
15
16ohos_unittest("viewport_config_test") {
17  module_out_path = interface_test_output_path
18
19  sources = [ "viewport_config_test.cpp" ]
20
21  configs = [ "$ace_root/test/unittest:ace_unittest_config" ]
22}
23
24ohos_unittest("ui_content_test") {
25  module_out_path = interface_test_output_path
26
27  sources = [
28    "$ace_root/frameworks/core/common/container_scope.cpp",
29    "$ace_root/interfaces/inner_api/ace/ui_content.cpp",
30    "ui_content_test.cpp",
31  ]
32
33  include_dirs = [
34    "$window_manager_path/interfaces/innerkits",
35    "$window_manager_path/interfaces/innerkits/wm",
36    "$window_manager_path/wm/include",
37  ]
38
39  deps = [
40    "$ace_root/frameworks/base:ace_memory_monitor_ohos",
41    "$ace_root/test/unittest:ace_engine_unittest_flutter_deps",
42    "$ace_root/test/unittest:ace_unittest_log",
43    "$ace_root/test/unittest:ace_unittest_trace",
44    "$cjson_root:cjson",
45    "$graphic_2d_path/rosen/modules/render_service_client:librender_service_client",
46    "${ace_root}/interfaces/inner_api/ace:ace_forward_compatibility",
47    "//third_party/googletest:gmock_main",
48  ]
49
50  external_deps = [
51    "ability_runtime:abilitykit_native",
52    "image_framework:image",
53    "input:libmmi-client",
54    "ipc:ipc_single",
55    "window_manager:libdm",
56    "window_manager:libwm",
57    "window_manager:scene_session",
58    "window_manager:scene_session_manager",
59  ]
60
61  configs = [ "$ace_root/test/unittest:ace_unittest_config" ]
62}
63
64ohos_unittest("form_render_test") {
65  module_out_path = interface_test_output_path
66  include_dirs = [
67    "$ace_root/interfaces/inner_api/form_render/include",
68    "${accessibility_path}/interfaces/innerkits/common/include/",
69  ]
70  sources = [
71    "$ace_root/interfaces/inner_api/form_render/src/form_renderer.cpp",
72    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_delegate_impl.cpp",
73    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_delegate_proxy.cpp",
74    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_delegate_stub.cpp",
75    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_dispatcher_impl.cpp",
76    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_dispatcher_proxy.cpp",
77    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_dispatcher_stub.cpp",
78    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_group.cpp",
79    "$ace_root/test/mock/base/mock_ace_performance_check.cpp",
80    "$ace_root/test/mock/base/mock_engine_helper.cpp",
81    "$ace_root/test/mock/base/mock_frame_trace_adapter.cpp",
82    "$ace_root/test/mock/base/mock_ressched_report.cpp",
83    "$ace_root/test/mock/base/mock_system_properties.cpp",
84    "$ace_root/test/mock/core/common/mock_ace_application_info.cpp",
85    "$ace_root/test/mock/core/common/mock_container.cpp",
86    "$ace_root/test/mock/core/common/mock_frame_report.cpp",
87    "$ace_root/test/mock/core/common/mock_raw_recognizer.cpp",
88    "$ace_root/test/mock/core/event/mock_touch_event.cpp",
89    "$ace_root/test/mock/core/image_provider/mock_image_source_info.cpp",
90    "$ace_root/test/mock/core/pipeline/mock_element_register.cpp",
91    "$ace_root/test/mock/core/pipeline/mock_pipeline_context.cpp",
92    "$ace_root/test/mock/core/render/mock_animation_utils.cpp",
93    "$ace_root/test/mock/core/render/mock_modifier_adapter.cpp",
94    "$ace_root/test/mock/core/render/mock_render_context_creator.cpp",
95    "$ace_root/test/mock/interfaces/mock_uicontent_creator.cpp",
96    "form_render_test.cpp",
97  ]
98
99  configs = [ "$ace_root/test/unittest:ace_unittest_config" ]
100
101  deps = [
102    "$ace_root/test/unittest:ace_base",
103    "$ace_root/test/unittest:ace_components_base",
104    "$ace_root/test/unittest:ace_components_event",
105    "$ace_root/test/unittest:ace_components_gestures",
106    "$ace_root/test/unittest:ace_components_layout",
107    "$ace_root/test/unittest:ace_components_manager",
108    "$ace_root/test/unittest:ace_components_pattern",
109    "$ace_root/test/unittest:ace_components_property",
110    "$ace_root/test/unittest:ace_components_render",
111    "$ace_root/test/unittest:ace_components_syntax",
112    "$ace_root/test/unittest:ace_core_animation",
113    "$ace_root/test/unittest:ace_core_extra",
114    "$ace_root/test/unittest:ace_engine_unittest_flutter_deps",
115    "$ace_root/test/unittest:ace_unittest_log",
116    "$ace_root/test/unittest:ace_unittest_trace",
117    "$cjson_root:cjson",
118    "$graphic_2d_path/rosen/modules/render_service_client:librender_service_client",
119    "//third_party/googletest:gmock_main",
120  ]
121
122  external_deps = [
123    "ability_base:want",
124    "ability_runtime:ability_context_native",
125    "ability_runtime:ability_manager",
126    "ability_runtime:runtime",
127    "accessibility:accessibility_common",
128    "ace_engine:ace_uicontent",
129    "c_utils:utils",
130    "eventhandler:libeventhandler",
131    "form_fwk:form_manager",
132    "graphic_surface:surface",
133    "hilog:libhilog",
134    "input:libmmi-client",
135    "ipc:ipc_core",
136    "napi:ace_napi",
137  ]
138}
139
140ohos_unittest("form_render_group_test") {
141  module_out_path = interface_test_output_path
142  include_dirs = [
143    "$ace_root/interfaces/inner_api/form_render/include",
144    "${accessibility_path}/interfaces/innerkits/common/include/",
145  ]
146  sources = [
147    "$ace_root/interfaces/inner_api/form_render/src/form_renderer.cpp",
148    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_delegate_impl.cpp",
149    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_delegate_proxy.cpp",
150    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_delegate_stub.cpp",
151    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_dispatcher_impl.cpp",
152    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_dispatcher_proxy.cpp",
153    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_dispatcher_stub.cpp",
154    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_group.cpp",
155    "$ace_root/test/mock/base/mock_ace_performance_check.cpp",
156    "$ace_root/test/mock/base/mock_engine_helper.cpp",
157    "$ace_root/test/mock/base/mock_frame_trace_adapter.cpp",
158    "$ace_root/test/mock/base/mock_ressched_report.cpp",
159    "$ace_root/test/mock/base/mock_system_properties.cpp",
160    "$ace_root/test/mock/core/common/mock_ace_application_info.cpp",
161    "$ace_root/test/mock/core/common/mock_container.cpp",
162    "$ace_root/test/mock/core/common/mock_frame_report.cpp",
163    "$ace_root/test/mock/core/common/mock_raw_recognizer.cpp",
164    "$ace_root/test/mock/core/image_provider/mock_image_source_info.cpp",
165    "$ace_root/test/mock/core/pipeline/mock_element_register.cpp",
166    "$ace_root/test/mock/core/pipeline/mock_pipeline_context.cpp",
167    "$ace_root/test/mock/core/render/mock_animation_utils.cpp",
168    "$ace_root/test/mock/core/render/mock_modifier_adapter.cpp",
169    "$ace_root/test/mock/core/render/mock_render_context_creator.cpp",
170    "$ace_root/test/mock/interfaces/mock_uicontent_creator.cpp",
171    "form_render_group_test.cpp",
172  ]
173
174  configs = [ "$ace_root/test/unittest:ace_unittest_config" ]
175
176  deps = [
177    "$ace_root/test/unittest:ace_base",
178    "$ace_root/test/unittest:ace_components_base",
179    "$ace_root/test/unittest:ace_components_event",
180    "$ace_root/test/unittest:ace_components_gestures",
181    "$ace_root/test/unittest:ace_components_layout",
182    "$ace_root/test/unittest:ace_components_manager",
183    "$ace_root/test/unittest:ace_components_pattern",
184    "$ace_root/test/unittest:ace_components_property",
185    "$ace_root/test/unittest:ace_components_render",
186    "$ace_root/test/unittest:ace_components_syntax",
187    "$ace_root/test/unittest:ace_core_animation",
188    "$ace_root/test/unittest:ace_core_extra",
189    "$ace_root/test/unittest:ace_engine_unittest_flutter_deps",
190    "$ace_root/test/unittest:ace_unittest_log",
191    "$ace_root/test/unittest:ace_unittest_trace",
192    "$cjson_root:cjson",
193    "$graphic_2d_path/rosen/modules/render_service_client:librender_service_client",
194    "//third_party/googletest:gmock_main",
195  ]
196
197  external_deps = [
198    "ability_base:want",
199    "ability_runtime:ability_context_native",
200    "ability_runtime:ability_manager",
201    "ability_runtime:runtime",
202    "accessibility:accessibility_common",
203    "ace_engine:ace_uicontent",
204    "c_utils:utils",
205    "eventhandler:libeventhandler",
206    "form_fwk:form_manager",
207    "graphic_2d:surface",
208    "hilog:libhilog",
209    "input:libmmi-client",
210    "ipc:ipc_core",
211    "napi:ace_napi",
212  ]
213}
214
215ohos_unittest("drawable_descriptor_test") {
216  module_out_path = interface_test_output_path
217
218  sources = [
219    "$ace_root/interfaces/inner_api/drawable_descriptor/drawable_descriptor.cpp",
220    "$ace_root/interfaces/inner_api/drawable_descriptor/drawable_descriptor.h",
221    "$ace_root/interfaces/inner_api/drawable_descriptor/image_converter.cpp",
222    "drawable_descriptor_test.cpp",
223  ]
224
225  configs = [ "$ace_root/test/unittest:ace_unittest_config" ]
226
227  deps = [
228    "$cjson_root:cjson",
229    "$skia_root_new:skia_ohos",
230    "//third_party/googletest:gmock_main",
231  ]
232
233  public_deps = [
234    "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics:2d_graphics",
235    "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client",
236  ]
237
238  external_deps = [
239    "c_utils:utils",
240    "hilog:libhilog",
241    "image_framework:image",
242    "image_framework:image_native",
243    "napi:ace_napi",
244    "resource_management:global_resmgr",
245  ]
246}
247
248ohos_unittest("ui_event_test") {
249  module_out_path = interface_test_output_path
250
251  sources = [
252    "$ace_root/interfaces/inner_api/ace/ace_forward_compatibility.cpp",
253    "$ace_root/interfaces/inner_api/ace/ui_event.cpp",
254    "$ace_root/interfaces/inner_api/ace/ui_event_func.cpp",
255    "ace_forward_compatibility_test.cpp",
256    "ui_event_test.cpp",
257  ]
258
259  configs = [ "$ace_root/test/unittest:ace_unittest_config" ]
260  include_dirs = [ "${ace_root}/interfaces/inner_api/ace" ]
261
262  external_deps = [
263    "hilog:libhilog",
264    "init:libbegetutil",
265  ]
266}
267
268ohos_unittest("ace_forward_compatibility_test") {
269  module_out_path = interface_test_output_path
270
271  sources = [
272    "$ace_root/interfaces/inner_api/ace/ace_forward_compatibility.cpp",
273    "ace_forward_compatibility_test.cpp",
274  ]
275
276  include_dirs = [ "${ace_root}/interfaces/inner_api/ace" ]
277
278  external_deps = [
279    "hilog:libhilog",
280    "init:libbegetutil",
281  ]
282}
283
284group("interfaces_unittest") {
285  testonly = true
286  deps = [
287    ":ace_forward_compatibility_test",
288    ":drawable_descriptor_test",
289    ":form_render_group_test",
290    ":form_render_test",
291    ":ui_content_test",
292    ":ui_event_test",
293    ":viewport_config_test",
294  ]
295}
296