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  deps = [
34    "$ace_root/frameworks/base:ace_memory_monitor_ohos",
35    "$ace_root/interfaces/inner_api/ace:ace_forward_compatibility",
36    "$ace_root/test/unittest:ace_engine_unittest_flutter_deps",
37    "$ace_root/test/unittest:ace_unittest_log",
38    "$ace_root/test/unittest:ace_unittest_trace",
39    "//third_party/googletest:gmock_main",
40  ]
41
42  external_deps = [
43    "ability_runtime:abilitykit_native",
44    "cJSON:cjson",
45    "graphic_2d:librender_service_client",
46    "image_framework:image",
47    "input:libmmi-client",
48    "ipc:ipc_single",
49    "window_manager:libdm",
50    "window_manager:libwm",
51    "window_manager:scene_session",
52    "window_manager:scene_session_manager",
53  ]
54
55  configs = [ "$ace_root/test/unittest:ace_unittest_config" ]
56}
57
58ohos_unittest("form_render_test") {
59  module_out_path = interface_test_output_path
60  include_dirs = [ "$ace_root/interfaces/inner_api/form_render/include" ]
61  sources = [
62    "$ace_root/interfaces/inner_api/form_render/src/form_renderer.cpp",
63    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_delegate_impl.cpp",
64    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_delegate_proxy.cpp",
65    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_delegate_stub.cpp",
66    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_dispatcher_impl.cpp",
67    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_dispatcher_proxy.cpp",
68    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_dispatcher_stub.cpp",
69    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_group.cpp",
70    "$ace_root/test/mock/interfaces/mock_uicontent_creator.cpp",
71    "form_render_test.cpp",
72    "form_renderer_dispatcher_proxy_test.cpp",
73  ]
74
75  configs = [ "$ace_root/test/unittest:ace_unittest_config" ]
76
77  deps = [
78    "$ace_root/test/unittest:ace_base",
79    "$ace_root/test/unittest:ace_components_base",
80    "$ace_root/test/unittest:ace_components_event",
81    "$ace_root/test/unittest:ace_components_gestures",
82    "$ace_root/test/unittest:ace_components_layout",
83    "$ace_root/test/unittest:ace_components_manager",
84    "$ace_root/test/unittest:ace_components_mock",
85    "$ace_root/test/unittest:ace_components_pattern",
86    "$ace_root/test/unittest:ace_components_property",
87    "$ace_root/test/unittest:ace_components_render",
88    "$ace_root/test/unittest:ace_components_syntax",
89    "$ace_root/test/unittest:ace_core_animation",
90    "$ace_root/test/unittest:ace_core_extra",
91    "$ace_root/test/unittest:ace_engine_unittest_flutter_deps",
92    "$ace_root/test/unittest:ace_unittest_log",
93    "//third_party/googletest:gmock_main",
94  ]
95
96  external_deps = [
97    "ability_base:want",
98    "ability_runtime:ability_context_native",
99    "ability_runtime:ability_manager",
100    "ability_runtime:runtime",
101    "accessibility:accessibility_common",
102    "ace_engine:ace_uicontent",
103    "cJSON:cjson",
104    "c_utils:utils",
105    "eventhandler:libeventhandler",
106    "form_fwk:form_manager",
107    "graphic_2d:librender_service_client",
108    "graphic_surface:surface",
109    "hilog:libhilog",
110    "input:libmmi-client",
111    "ipc:ipc_core",
112    "napi:ace_napi",
113    "window_manager:libwm",
114  ]
115}
116
117ohos_unittest("form_render_group_test") {
118  module_out_path = interface_test_output_path
119  include_dirs = [ "$ace_root/interfaces/inner_api/form_render/include" ]
120  sources = [
121    "$ace_root/interfaces/inner_api/form_render/src/form_renderer.cpp",
122    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_delegate_impl.cpp",
123    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_delegate_proxy.cpp",
124    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_delegate_stub.cpp",
125    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_dispatcher_impl.cpp",
126    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_dispatcher_proxy.cpp",
127    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_dispatcher_stub.cpp",
128    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_group.cpp",
129    "$ace_root/test/mock/base/mock_ace_performance_check.cpp",
130    "$ace_root/test/mock/base/mock_ace_performance_monitor.cpp",
131    "$ace_root/test/mock/base/mock_engine_helper.cpp",
132    "$ace_root/test/mock/base/mock_frame_trace_adapter.cpp",
133    "$ace_root/test/mock/base/mock_ressched_report.cpp",
134    "$ace_root/test/mock/base/mock_system_properties.cpp",
135    "$ace_root/test/mock/core/common/mock_ace_application_info.cpp",
136    "$ace_root/test/mock/core/common/mock_container.cpp",
137    "$ace_root/test/mock/core/common/mock_frame_report.cpp",
138    "$ace_root/test/mock/core/common/mock_raw_recognizer.cpp",
139    "$ace_root/test/mock/core/image_provider/mock_image_source_info.cpp",
140    "$ace_root/test/mock/core/package/mock_package_event_proxy.cpp",
141    "$ace_root/test/mock/core/pipeline/mock_element_register.cpp",
142    "$ace_root/test/mock/core/pipeline/mock_pipeline_context.cpp",
143    "$ace_root/test/mock/core/render/mock_animation_utils.cpp",
144    "$ace_root/test/mock/core/render/mock_modifier_adapter.cpp",
145    "$ace_root/test/mock/core/render/mock_render_context_creator.cpp",
146    "$ace_root/test/mock/interfaces/mock_uicontent_creator.cpp",
147    "form_render_group_test.cpp",
148  ]
149
150  configs = [ "$ace_root/test/unittest:ace_unittest_config" ]
151
152  deps = [
153    "$ace_root/test/unittest:ace_base",
154    "$ace_root/test/unittest:ace_components_base",
155    "$ace_root/test/unittest:ace_components_event",
156    "$ace_root/test/unittest:ace_components_gestures",
157    "$ace_root/test/unittest:ace_components_layout",
158    "$ace_root/test/unittest:ace_components_manager",
159    "$ace_root/test/unittest:ace_components_pattern",
160    "$ace_root/test/unittest:ace_components_property",
161    "$ace_root/test/unittest:ace_components_render",
162    "$ace_root/test/unittest:ace_components_syntax",
163    "$ace_root/test/unittest:ace_core_animation",
164    "$ace_root/test/unittest:ace_core_extra",
165    "$ace_root/test/unittest:ace_engine_unittest_flutter_deps",
166    "$ace_root/test/unittest:ace_unittest_log",
167    "$ace_root/test/unittest:ace_unittest_trace",
168    "//third_party/googletest:gmock_main",
169  ]
170
171  external_deps = [
172    "ability_base:want",
173    "ability_runtime:ability_context_native",
174    "ability_runtime:ability_manager",
175    "ability_runtime:runtime",
176    "accessibility:accessibility_common",
177    "ace_engine:ace_uicontent",
178    "cJSON:cjson",
179    "c_utils:utils",
180    "eventhandler:libeventhandler",
181    "form_fwk:form_manager",
182    "graphic_2d:librender_service_client",
183    "graphic_surface:surface",
184    "hilog:libhilog",
185    "input:libmmi-client",
186    "ipc:ipc_core",
187    "napi:ace_napi",
188    "window_manager:libwm",
189  ]
190}
191
192ohos_unittest("form_render_delegate_proxy_test") {
193  module_out_path = interface_test_output_path
194  include_dirs = [ "$ace_root/interfaces/inner_api/form_render/include" ]
195  sources = [
196    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_delegate_impl.cpp",
197    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_delegate_proxy.cpp",
198    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_delegate_stub.cpp",
199    "$ace_root/test/mock/base/mock_ace_performance_monitor.cpp",
200    "$ace_root/test/mock/base/mock_system_properties.cpp",
201    "$ace_root/test/mock/core/common/mock_container.cpp",
202    "form_render_delegate_proxy_test.cpp",
203  ]
204
205  configs = [ "$ace_root/test/unittest:ace_unittest_config" ]
206
207  deps = [ "//third_party/googletest:gmock_main" ]
208
209  external_deps = [
210    "ability_base:want",
211    "ability_runtime:ability_context_native",
212    "ability_runtime:ability_manager",
213    "ability_runtime:runtime",
214    "accessibility:accessibility_common",
215    "ace_engine:ace_uicontent",
216    "cJSON:cjson",
217    "c_utils:utils",
218    "eventhandler:libeventhandler",
219    "form_fwk:form_manager",
220    "graphic_2d:librender_service_client",
221    "graphic_surface:surface",
222    "hilog:libhilog",
223    "input:libmmi-client",
224    "ipc:ipc_core",
225    "napi:ace_napi",
226  ]
227}
228
229ohos_unittest("form_render_delegate_stub_test") {
230  module_out_path = interface_test_output_path
231  include_dirs = [ "$ace_root/interfaces/inner_api/form_render/include" ]
232  sources = [
233    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_delegate_impl.cpp",
234    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_delegate_stub.cpp",
235    "$ace_root/test/mock/base/mock_ace_performance_monitor.cpp",
236    "$ace_root/test/mock/base/mock_system_properties.cpp",
237    "$ace_root/test/mock/core/common/mock_container.cpp",
238    "form_render_delegate_stub_test.cpp",
239  ]
240
241  configs = [ "$ace_root/test/unittest:ace_unittest_config" ]
242
243  deps = [ "//third_party/googletest:gmock_main" ]
244
245  external_deps = [
246    "ability_base:want",
247    "cJSON:cjson",
248    "c_utils:utils",
249    "eventhandler:libeventhandler",
250    "form_fwk:form_manager",
251    "graphic_2d:librender_service_client",
252    "graphic_surface:surface",
253    "hilog:libhilog",
254    "ipc:ipc_core",
255    "napi:ace_napi",
256  ]
257}
258
259ohos_unittest("form_render_dispatcher_stub_test") {
260  module_out_path = interface_test_output_path
261  include_dirs = [ "$ace_root/interfaces/inner_api/form_render/include" ]
262  sources = [
263    "$ace_root/interfaces/inner_api/form_render/src/form_renderer.cpp",
264    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_delegate_impl.cpp",
265    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_delegate_proxy.cpp",
266    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_delegate_stub.cpp",
267    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_dispatcher_impl.cpp",
268    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_dispatcher_proxy.cpp",
269    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_dispatcher_stub.cpp",
270    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_group.cpp",
271    "$ace_root/test/mock/base/mock_ace_performance_check.cpp",
272    "$ace_root/test/mock/base/mock_ace_performance_monitor.cpp",
273    "$ace_root/test/mock/base/mock_engine_helper.cpp",
274    "$ace_root/test/mock/base/mock_frame_trace_adapter.cpp",
275    "$ace_root/test/mock/base/mock_ressched_report.cpp",
276    "$ace_root/test/mock/base/mock_system_properties.cpp",
277    "$ace_root/test/mock/core/common/mock_ace_application_info.cpp",
278    "$ace_root/test/mock/core/common/mock_container.cpp",
279    "$ace_root/test/mock/core/common/mock_frame_report.cpp",
280    "$ace_root/test/mock/core/common/mock_raw_recognizer.cpp",
281    "$ace_root/test/mock/core/event/mock_touch_event.cpp",
282    "$ace_root/test/mock/core/image_provider/mock_image_source_info.cpp",
283    "$ace_root/test/mock/core/pipeline/mock_element_register.cpp",
284    "$ace_root/test/mock/core/pipeline/mock_pipeline_context.cpp",
285    "$ace_root/test/mock/core/render/mock_animation_utils.cpp",
286    "$ace_root/test/mock/core/render/mock_modifier_adapter.cpp",
287    "$ace_root/test/mock/core/render/mock_render_context_creator.cpp",
288    "$ace_root/test/mock/interfaces/mock_uicontent_creator.cpp",
289    "form_render_dispatcher_stub_test.cpp",
290  ]
291
292  configs = [ "$ace_root/test/unittest:ace_unittest_config" ]
293
294  deps = [ "//third_party/googletest:gmock_main" ]
295
296  external_deps = [
297    "ability_base:want",
298    "ability_runtime:ability_context_native",
299    "ability_runtime:ability_manager",
300    "ability_runtime:runtime",
301    "accessibility:accessibility_common",
302    "ace_engine:ace_uicontent",
303    "cJSON:cjson",
304    "c_utils:utils",
305    "eventhandler:libeventhandler",
306    "form_fwk:form_manager",
307    "graphic_2d:librender_service_client",
308    "graphic_surface:surface",
309    "hilog:libhilog",
310    "input:libmmi-client",
311    "ipc:ipc_core",
312    "napi:ace_napi",
313    "window_manager:libwm",
314  ]
315}
316
317ohos_unittest("form_render_delegate_impl_test") {
318  module_out_path = interface_test_output_path
319  include_dirs = [ "$ace_root/interfaces/inner_api/form_render/include" ]
320  sources = [
321    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_delegate_impl.cpp",
322    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_delegate_stub.cpp",
323    "$ace_root/test/mock/base/mock_ace_performance_monitor.cpp",
324    "$ace_root/test/mock/base/mock_system_properties.cpp",
325    "$ace_root/test/mock/core/common/mock_container.cpp",
326    "form_render_delegate_impl_test.cpp",
327  ]
328
329  configs = [ "$ace_root/test/unittest:ace_unittest_config" ]
330
331  deps = [ "//third_party/googletest:gmock_main" ]
332
333  external_deps = [
334    "ability_base:want",
335    "cJSON:cjson",
336    "c_utils:utils",
337    "eventhandler:libeventhandler",
338    "form_fwk:form_manager",
339    "graphic_2d:librender_service_client",
340    "graphic_surface:surface",
341    "hilog:libhilog",
342    "ipc:ipc_core",
343    "napi:ace_napi",
344  ]
345}
346
347ohos_unittest("form_render_dispatcher_impl_test") {
348  module_out_path = interface_test_output_path
349  include_dirs = [ "$ace_root/interfaces/inner_api/form_render/include" ]
350  sources = [
351    "$ace_root/interfaces/inner_api/form_render/src/form_renderer.cpp",
352    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_dispatcher_impl.cpp",
353    "$ace_root/interfaces/inner_api/form_render/src/form_renderer_dispatcher_stub.cpp",
354    "form_render_dispatcher_impl_test.cpp",
355  ]
356
357  configs = [ "$ace_root/test/unittest:ace_unittest_config" ]
358
359  deps = [ "//third_party/googletest:gmock_main" ]
360
361  external_deps = [
362    "ability_base:want",
363    "ability_runtime:ability_context_native",
364    "ability_runtime:ability_manager",
365    "ability_runtime:runtime",
366    "accessibility:accessibility_common",
367    "ace_engine:ace_uicontent",
368    "cJSON:cjson",
369    "c_utils:utils",
370    "eventhandler:libeventhandler",
371    "form_fwk:form_manager",
372    "graphic_2d:librender_service_client",
373    "graphic_surface:surface",
374    "hilog:libhilog",
375    "input:libmmi-client",
376    "ipc:ipc_core",
377    "napi:ace_napi",
378    "window_manager:libwm",
379  ]
380}
381
382ohos_unittest("drawable_descriptor_test") {
383  module_out_path = interface_test_output_path
384
385  sources = [
386    "$ace_root/interfaces/inner_api/drawable_descriptor/drawable_descriptor.cpp",
387    "$ace_root/interfaces/inner_api/drawable_descriptor/image_converter.cpp",
388    "$ace_root/interfaces/native/node/native_drawable_descriptor.cpp",
389    "drawable_descriptor_test.cpp",
390  ]
391
392  configs = [ "$ace_root/test/unittest:ace_unittest_config" ]
393
394  include_dirs = [
395    "$ace_root/interfaces/native/node",
396    "$ace_root/interfaces/native/",
397    "$ace_root/interfaces/inner_api/drawable_descriptor",
398  ]
399
400  deps = [ "//third_party/googletest:gmock_main" ]
401
402  external_deps = [
403    "cJSON:cjson",
404    "c_utils:utils",
405    "graphic_2d:2d_graphics",
406    "graphic_2d:librender_service_client",
407    "hilog:libhilog",
408    "image_framework:image",
409    "image_framework:image_native",
410    "napi:ace_napi",
411    "resource_management:global_resmgr",
412  ]
413}
414
415ohos_unittest("ui_event_test") {
416  module_out_path = interface_test_output_path
417
418  sources = [
419    "$ace_root/interfaces/inner_api/ace/ui_event.cpp",
420    "$ace_root/interfaces/inner_api/ace/ui_event_func.cpp",
421    "ui_event_test.cpp",
422  ]
423
424  configs = [ "$ace_root/test/unittest:ace_unittest_config" ]
425  include_dirs = [ "${ace_root}/interfaces/inner_api/ace" ]
426  deps = [
427    "$ace_root/frameworks/core/components/theme:build_theme_code",
428    "$ace_root/test/unittest:ace_base",
429    "$ace_root/test/unittest:ace_components_base",
430    "$ace_root/test/unittest:ace_components_event",
431    "$ace_root/test/unittest:ace_components_gestures",
432    "$ace_root/test/unittest:ace_components_layout",
433    "$ace_root/test/unittest:ace_components_manager",
434    "$ace_root/test/unittest:ace_components_mock",
435    "$ace_root/test/unittest:ace_components_pattern",
436    "$ace_root/test/unittest:ace_components_property",
437    "$ace_root/test/unittest:ace_components_render",
438    "$ace_root/test/unittest:ace_components_syntax",
439    "$ace_root/test/unittest:ace_core_animation",
440    "$ace_root/test/unittest:ace_core_extra",
441    "//third_party/googletest:gmock_main",
442  ]
443  external_deps = [
444    "hilog:libhilog",
445    "init:libbegetutil",
446  ]
447}
448
449ace_unittest("extension_custom_node_test_ng") {
450  type = "new"
451  module_output = "basic"
452  sources = [
453    "$ace_root/frameworks/core/interfaces/native/node/extension_custom_node.cpp",
454    "extension_custom_node_test_ng.cpp",
455  ]
456}
457
458ohos_unittest("ace_forward_compatibility_test") {
459  module_out_path = interface_test_output_path
460
461  sources = [
462    "$ace_root/interfaces/inner_api/ace/ace_forward_compatibility.cpp",
463    "ace_forward_compatibility_test.cpp",
464  ]
465
466  include_dirs = [ "${ace_root}/interfaces/inner_api/ace" ]
467
468  external_deps = [
469    "hilog:libhilog",
470    "init:libbegetutil",
471  ]
472}
473
474ohos_unittest("navigation_controller_test") {
475  module_out_path = interface_test_output_path
476
477  sources = [ "navigation_controller_test.cpp" ]
478
479  configs = [ "$ace_root/test/unittest:ace_unittest_config" ]
480  include_dirs = [ "${ace_root}/interfaces/inner_api/ace" ]
481
482  external_deps = [
483    "hilog:libhilog",
484    "init:libbegetutil",
485  ]
486}
487
488config("c_api_configs") {
489  cflags = [ "-Wno-missing-braces" ]
490}
491
492ohos_unittest("native_node_napi_test") {
493  module_out_path = interface_test_output_path
494
495  sources = [
496    "$ace_root/interfaces/native/node/animate_impl.cpp",
497    "$ace_root/interfaces/native/node/dialog_model.cpp",
498    "$ace_root/interfaces/native/node/event_converter.cpp",
499    "$ace_root/interfaces/native/node/gesture_impl.cpp",
500    "$ace_root/interfaces/native/node/native_impl.cpp",
501    "$ace_root/interfaces/native/node/native_node_napi.cpp",
502    "$ace_root/interfaces/native/node/node_extened.cpp",
503    "$ace_root/interfaces/native/node/node_model.cpp",
504    "$ace_root/interfaces/native/node/node_node_relative_container.cpp",
505    "$ace_root/interfaces/native/node/node_transition.cpp",
506    "$ace_root/interfaces/native/node/style_modifier.cpp",
507    "native_gesture_test.cpp",
508    "native_node_napi_test.cpp",
509    "native_node_test.cpp",
510  ]
511
512  configs = [
513    "$ace_root/test/unittest:ace_unittest_config",
514    ":c_api_configs",
515  ]
516
517  include_dirs = [
518    "$ace_root/frameworks/core/interfaces/arkoala",
519    "$ace_root/frameworks/",
520    "$ace_root/interfaces/native/",
521    "$ace_root/interfaces/native/node",
522    "$ace_root",
523    "$ace_root/interfaces/inner_api/drawable_descriptor",
524  ]
525
526  deps = [
527    "$ace_root/test/unittest:ace_base",
528    "$ace_root/test/unittest:ace_components_base",
529    "$ace_root/test/unittest:ace_components_event",
530    "$ace_root/test/unittest:ace_components_gestures",
531    "$ace_root/test/unittest:ace_components_layout",
532    "$ace_root/test/unittest:ace_components_manager",
533    "$ace_root/test/unittest:ace_components_mock",
534    "$ace_root/test/unittest:ace_components_pattern",
535    "$ace_root/test/unittest:ace_components_property",
536    "$ace_root/test/unittest:ace_components_render",
537    "$ace_root/test/unittest:ace_components_syntax",
538    "$ace_root/test/unittest:ace_core_animation",
539    "$ace_root/test/unittest:ace_core_extra",
540    "//third_party/googletest:gmock_main",
541  ]
542
543  public_deps = [
544    "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics:2d_graphics",
545    "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client",
546  ]
547
548  external_deps = [
549    "cJSON:cjson",
550    "c_utils:utils",
551    "googletest:gmock_main",
552    "hilog:libhilog",
553    "image_framework:image",
554    "image_framework:image_native",
555    "napi:ace_napi",
556    "resource_management:global_resmgr",
557  ]
558}
559
560ohos_unittest("native_key_event_test") {
561  module_out_path = interface_test_output_path
562
563  sources = [
564    "$ace_root/interfaces/native/event/key_event_impl.cpp",
565    "$ace_root/interfaces/native/event/ui_input_event.cpp",
566    "$ace_root/interfaces/native/node/animate_impl.cpp",
567    "$ace_root/interfaces/native/node/dialog_model.cpp",
568    "$ace_root/interfaces/native/node/event_converter.cpp",
569    "$ace_root/interfaces/native/node/gesture_impl.cpp",
570    "$ace_root/interfaces/native/node/native_impl.cpp",
571    "$ace_root/interfaces/native/node/native_node_napi.cpp",
572    "$ace_root/interfaces/native/node/node_extened.cpp",
573    "$ace_root/interfaces/native/node/node_model.cpp",
574    "$ace_root/interfaces/native/node/node_node_relative_container.cpp",
575    "$ace_root/interfaces/native/node/node_transition.cpp",
576    "$ace_root/interfaces/native/node/style_modifier.cpp",
577    "native_key_event_test.cpp",
578  ]
579
580  configs = [
581    "$ace_root/test/unittest:ace_unittest_config",
582    ":c_api_configs",
583  ]
584
585  include_dirs = [
586    "$ace_root/frameworks/core/interfaces/arkoala",
587    "$ace_root/frameworks/",
588    "$ace_root/interfaces/native/",
589    "$ace_root/interfaces/native/node",
590    "$ace_root",
591  ]
592
593  deps = [
594    "$ace_root/test/unittest:ace_base",
595    "$ace_root/test/unittest:ace_components_base",
596    "$ace_root/test/unittest:ace_components_event",
597    "$ace_root/test/unittest:ace_components_gestures",
598    "$ace_root/test/unittest:ace_components_layout",
599    "$ace_root/test/unittest:ace_components_manager",
600    "$ace_root/test/unittest:ace_components_mock",
601    "$ace_root/test/unittest:ace_components_pattern",
602    "$ace_root/test/unittest:ace_components_property",
603    "$ace_root/test/unittest:ace_components_render",
604    "$ace_root/test/unittest:ace_components_syntax",
605    "$ace_root/test/unittest:ace_core_animation",
606    "$ace_root/test/unittest:ace_core_extra",
607  ]
608
609  external_deps = [
610    "cJSON:cjson",
611    "c_utils:utils",
612    "googletest:gmock_main",
613    "graphic_2d:2d_graphics",
614    "graphic_2d:librender_service_client",
615    "hilog:libhilog",
616    "image_framework:image",
617    "image_framework:image_native",
618    "napi:ace_napi",
619    "resource_management:global_resmgr",
620  ]
621}
622
623ohos_unittest("drag_and_drop_test") {
624  module_out_path = interface_test_output_path
625
626  sources = [
627    "$ace_root/interfaces/native/event/drag_and_drop_impl.cpp",
628    "$ace_root/interfaces/native/node/animate_impl.cpp",
629    "$ace_root/interfaces/native/node/dialog_model.cpp",
630    "$ace_root/interfaces/native/node/event_converter.cpp",
631    "$ace_root/interfaces/native/node/gesture_impl.cpp",
632    "$ace_root/interfaces/native/node/native_impl.cpp",
633    "$ace_root/interfaces/native/node/native_node_napi.cpp",
634    "$ace_root/interfaces/native/node/node_extened.cpp",
635    "$ace_root/interfaces/native/node/node_model.cpp",
636    "$ace_root/interfaces/native/node/node_node_relative_container.cpp",
637    "$ace_root/interfaces/native/node/node_transition.cpp",
638    "$ace_root/interfaces/native/node/style_modifier.cpp",
639    "drag_and_drop_test.cpp",
640  ]
641
642  configs = [
643    "$ace_root/test/unittest:ace_unittest_config",
644    ":c_api_configs",
645  ]
646
647  include_dirs = [
648    "$ace_root/frameworks/core/interfaces/arkoala",
649    "$ace_root/frameworks/",
650    "$ace_root/interfaces/native/",
651    "$ace_root/interfaces/native/node",
652    "$ace_root",
653  ]
654
655  deps = [
656    "$ace_root/test/unittest:ace_base",
657    "$ace_root/test/unittest:ace_components_base",
658    "$ace_root/test/unittest:ace_components_event",
659    "$ace_root/test/unittest:ace_components_gestures",
660    "$ace_root/test/unittest:ace_components_layout",
661    "$ace_root/test/unittest:ace_components_manager",
662    "$ace_root/test/unittest:ace_components_mock",
663    "$ace_root/test/unittest:ace_components_pattern",
664    "$ace_root/test/unittest:ace_components_property",
665    "$ace_root/test/unittest:ace_components_render",
666    "$ace_root/test/unittest:ace_components_syntax",
667    "$ace_root/test/unittest:ace_core_animation",
668    "$ace_root/test/unittest:ace_core_extra",
669    "//third_party/googletest:gmock_main",
670  ]
671
672  public_deps = [
673    "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics:2d_graphics",
674    "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client",
675  ]
676
677  external_deps = [
678    "cJSON:cjson",
679    "c_utils:utils",
680    "hilog:libhilog",
681    "image_framework:image",
682    "image_framework:image_native",
683    "image_framework:pixelmap",
684    "napi:ace_napi",
685    "resource_management:global_resmgr",
686    "udmf:udmf_client",
687  ]
688}
689
690ohos_unittest("node_transition_test") {
691  module_out_path = interface_test_output_path
692
693  sources = [
694    "$ace_root/adapter/ohos/osal/log_wrapper.cpp",
695    "$ace_root/frameworks/core/components/common/properties/color.cpp",
696    "$ace_root/interfaces/native/node/animate_impl.cpp",
697    "$ace_root/interfaces/native/node/dialog_model.cpp",
698    "$ace_root/interfaces/native/node/event_converter.cpp",
699    "$ace_root/interfaces/native/node/gesture_impl.cpp",
700    "$ace_root/interfaces/native/node/native_impl.cpp",
701    "$ace_root/interfaces/native/node/native_node_napi.cpp",
702    "$ace_root/interfaces/native/node/node_animate.cpp",
703    "$ace_root/interfaces/native/node/node_extened.cpp",
704    "$ace_root/interfaces/native/node/node_model.cpp",
705    "$ace_root/interfaces/native/node/node_transition.cpp",
706    "$ace_root/interfaces/native/node/node_transition_imp.cpp",
707    "$ace_root/interfaces/native/node/style_modifier.cpp",
708    "$ace_root/test/mock/adapter/mock_log_wrapper.cpp",
709    "node_transition_test.cpp",
710  ]
711
712  configs = [
713    "$ace_root/test/unittest:ace_unittest_config",
714    ":c_api_configs",
715  ]
716
717  include_dirs = [
718    "$ace_root/frameworks/core/interfaces/arkoala",
719    "$ace_root/frameworks/",
720    "$ace_root/interfaces/native/",
721    "$ace_root/interfaces/native/node",
722    "$ace_root",
723    "$ace_root/interfaces/inner_api/drawable_descriptor",
724  ]
725
726  deps = [ "//third_party/googletest:gmock_main" ]
727
728  public_deps = [
729    "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics:2d_graphics",
730    "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client",
731  ]
732
733  external_deps = [
734    "cJSON:cjson",
735    "c_utils:utils",
736    "hilog:libhilog",
737    "image_framework:image",
738    "image_framework:image_native",
739    "napi:ace_napi",
740    "resource_management:global_resmgr",
741  ]
742}
743
744ohos_unittest("animate_impl_test") {
745  module_out_path = interface_test_output_path
746
747  sources = [
748    "$ace_root/adapter/ohos/osal/log_wrapper.cpp",
749    "$ace_root/frameworks/core/components/common/properties/color.cpp",
750    "$ace_root/interfaces/native/node/animate_impl.cpp",
751    "$ace_root/interfaces/native/node/dialog_model.cpp",
752    "$ace_root/interfaces/native/node/event_converter.cpp",
753    "$ace_root/interfaces/native/node/gesture_impl.cpp",
754    "$ace_root/interfaces/native/node/native_impl.cpp",
755    "$ace_root/interfaces/native/node/native_node_napi.cpp",
756    "$ace_root/interfaces/native/node/node_animate.cpp",
757    "$ace_root/interfaces/native/node/node_extened.cpp",
758    "$ace_root/interfaces/native/node/node_model.cpp",
759    "$ace_root/interfaces/native/node/node_transition.cpp",
760    "$ace_root/interfaces/native/node/node_transition_imp.cpp",
761    "$ace_root/interfaces/native/node/style_modifier.cpp",
762    "$ace_root/test/mock/adapter/mock_log_wrapper.cpp",
763    "animate_impl_test.cpp",
764  ]
765
766  configs = [
767    "$ace_root/test/unittest:ace_unittest_config",
768    ":c_api_configs",
769  ]
770
771  include_dirs = [
772    "$ace_root/frameworks/base/error",
773    "$ace_root/frameworks/core/interfaces/arkoala",
774    "$ace_root/frameworks/",
775    "$ace_root/interfaces/native/",
776    "$ace_root/interfaces/native/node",
777    "$ace_root",
778    "$ace_root/interfaces/inner_api/drawable_descriptor",
779  ]
780
781  deps = [ "//third_party/googletest:gmock_main" ]
782
783  public_deps = [
784    "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics:2d_graphics",
785    "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client",
786  ]
787
788  external_deps = [
789    "cJSON:cjson",
790    "c_utils:utils",
791    "hilog:libhilog",
792    "image_framework:image",
793    "image_framework:image_native",
794    "napi:ace_napi",
795    "resource_management:global_resmgr",
796  ]
797}
798
799ohos_unittest("dialog_model_test") {
800  module_out_path = interface_test_output_path
801
802  sources = [
803    "$ace_root/adapter/ohos/osal/log_wrapper.cpp",
804    "$ace_root/frameworks/core/components/common/properties/color.cpp",
805    "$ace_root/interfaces/native/node/animate_impl.cpp",
806    "$ace_root/interfaces/native/node/dialog_model.cpp",
807    "$ace_root/interfaces/native/node/event_converter.cpp",
808    "$ace_root/interfaces/native/node/gesture_impl.cpp",
809    "$ace_root/interfaces/native/node/native_impl.cpp",
810    "$ace_root/interfaces/native/node/native_node_napi.cpp",
811    "$ace_root/interfaces/native/node/node_animate.cpp",
812    "$ace_root/interfaces/native/node/node_extened.cpp",
813    "$ace_root/interfaces/native/node/node_model.cpp",
814    "$ace_root/interfaces/native/node/node_transition.cpp",
815    "$ace_root/interfaces/native/node/node_transition_imp.cpp",
816    "$ace_root/interfaces/native/node/style_modifier.cpp",
817    "$ace_root/test/mock/adapter/mock_log_wrapper.cpp",
818    "dialog_model_test.cpp",
819  ]
820
821  configs = [
822    "$ace_root/test/unittest:ace_unittest_config",
823    ":c_api_configs",
824  ]
825
826  include_dirs = [
827    "$ace_root/frameworks/base/error",
828    "$ace_root/frameworks/core/interfaces/arkoala",
829    "$ace_root/frameworks/",
830    "$ace_root/interfaces/native/",
831    "$ace_root/interfaces/native/node",
832    "$ace_root",
833    "$ace_root/interfaces/inner_api/drawable_descriptor",
834  ]
835
836  deps = [ "//third_party/googletest:gmock_main" ]
837
838  public_deps = [
839    "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics:2d_graphics",
840    "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client",
841  ]
842
843  external_deps = [
844    "cJSON:cjson",
845    "c_utils:utils",
846    "hilog:libhilog",
847    "image_framework:image",
848    "image_framework:image_native",
849    "napi:ace_napi",
850    "resource_management:global_resmgr",
851  ]
852}
853
854ohos_unittest("node_extened_test") {
855  module_out_path = interface_test_output_path
856
857  sources = [
858    "$ace_root/adapter/ohos/osal/log_wrapper.cpp",
859    "$ace_root/frameworks/core/components/common/properties/color.cpp",
860    "$ace_root/interfaces/native/node/animate_impl.cpp",
861    "$ace_root/interfaces/native/node/dialog_model.cpp",
862    "$ace_root/interfaces/native/node/event_converter.cpp",
863    "$ace_root/interfaces/native/node/gesture_impl.cpp",
864    "$ace_root/interfaces/native/node/native_impl.cpp",
865    "$ace_root/interfaces/native/node/native_node_napi.cpp",
866    "$ace_root/interfaces/native/node/node_animate.cpp",
867    "$ace_root/interfaces/native/node/node_extened.cpp",
868    "$ace_root/interfaces/native/node/node_model.cpp",
869    "$ace_root/interfaces/native/node/node_transition.cpp",
870    "$ace_root/interfaces/native/node/node_transition_imp.cpp",
871    "$ace_root/interfaces/native/node/style_modifier.cpp",
872    "$ace_root/test/mock/adapter/mock_log_wrapper.cpp",
873    "node_extened_test.cpp",
874  ]
875
876  configs = [
877    "$ace_root/test/unittest:ace_unittest_config",
878    ":c_api_configs",
879  ]
880
881  include_dirs = [
882    "$ace_root/frameworks/base/error",
883    "$ace_root/frameworks/core/interfaces/arkoala",
884    "$ace_root/frameworks/",
885    "$ace_root/interfaces/native/",
886    "$ace_root/interfaces/native/node",
887    "$ace_root",
888    "$ace_root/interfaces/inner_api/drawable_descriptor",
889  ]
890
891  deps = [ "//third_party/googletest:gmock_main" ]
892
893  public_deps = [
894    "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics:2d_graphics",
895    "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client",
896  ]
897
898  external_deps = [
899    "cJSON:cjson",
900    "c_utils:utils",
901    "hilog:libhilog",
902    "image_framework:image",
903    "image_framework:image_native",
904    "napi:ace_napi",
905    "resource_management:global_resmgr",
906  ]
907}
908
909ohos_unittest("js_drawable_descriptor_test") {
910  module_out_path = interface_test_output_path
911
912  sources = [
913    "$ace_root/interfaces/inner_api/drawable_descriptor/drawable_descriptor.cpp",
914    "$ace_root/interfaces/inner_api/drawable_descriptor/image_converter.cpp",
915    "$ace_root/interfaces/inner_api/drawable_descriptor/js_drawable_descriptor.cpp",
916    "$ace_root/interfaces/native/node/native_drawable_descriptor.cpp",
917    "js_drawable_descriptor_test.cpp",
918  ]
919
920  configs = [ "$ace_root/test/unittest:ace_unittest_config" ]
921
922  include_dirs = [
923    "$ace_root/interfaces/native/node",
924    "$ace_root/interfaces/native/",
925    "$ace_root/interfaces/inner_api/drawable_descriptor",
926  ]
927
928  deps = [ "//third_party/googletest:gmock_main" ]
929
930  cflags = [
931    "-Dprivate=public",
932    "-Dprotected=public",
933  ]
934
935  external_deps = [
936    "cJSON:cjson",
937    "c_utils:utils",
938    "graphic_2d:2d_graphics",
939    "graphic_2d:librender_service_client",
940    "hilog:libhilog",
941    "image_framework:image",
942    "image_framework:image_native",
943    "napi:ace_napi",
944    "resource_management:global_resmgr",
945  ]
946}
947
948group("interfaces_unittest") {
949  testonly = true
950  deps = [
951    ":ace_forward_compatibility_test",
952    ":animate_impl_test",
953    ":dialog_model_test",
954    ":drag_and_drop_test",
955    ":drawable_descriptor_test",
956    ":extension_custom_node_test_ng",
957    ":form_render_delegate_impl_test",
958    ":form_render_delegate_proxy_test",
959    ":form_render_delegate_stub_test",
960    ":form_render_dispatcher_impl_test",
961    ":form_render_dispatcher_stub_test",
962    ":form_render_group_test",
963    ":form_render_test",
964    ":js_drawable_descriptor_test",
965    ":native_node_napi_test",
966    ":navigation_controller_test",
967    ":node_extened_test",
968    ":node_transition_test",
969    ":ui_content_test",
970    ":ui_event_test",
971    ":viewport_config_test",
972  ]
973}
974