• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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")
15import("//foundation/arkui/ace_engine/ace_config.gni")
16import("//foundation/arkui/ace_engine/test/unittest/ace_unittest.gni")
17
18common_sources = [
19  # inner
20  "$ace_root/frameworks/base/geometry/dimension.cpp",
21  "$ace_root/frameworks/base/geometry/least_square_impl.cpp",
22  "$ace_root/frameworks/base/geometry/matrix3.cpp",
23  "$ace_root/frameworks/base/geometry/matrix4.cpp",
24  "$ace_root/frameworks/base/json/json_util.cpp",
25  "$ace_root/frameworks/base/log/dump_log.cpp",
26  "$ace_root/frameworks/base/memory/memory_monitor.cpp",
27  "$ace_root/frameworks/base/utils/base_id.cpp",
28  "$ace_root/frameworks/base/utils/string_expression.cpp",
29  "$ace_root/frameworks/base/utils/string_utils.cpp",
30  "$ace_root/frameworks/base/utils/time_util.cpp",
31  "$ace_root/frameworks/core/animation/anticipate_curve.cpp",
32  "$ace_root/frameworks/core/animation/chain_animation.cpp",
33  "$ace_root/frameworks/core/animation/cubic_curve.cpp",
34  "$ace_root/frameworks/core/animation/curves.cpp",
35  "$ace_root/frameworks/core/animation/spring_model.cpp",
36  "$ace_root/frameworks/core/animation/spring_motion.cpp",
37  "$ace_root/frameworks/core/components/common/layout/grid_column_info.cpp",
38  "$ace_root/frameworks/core/components/common/layout/grid_container_info.cpp",
39  "$ace_root/frameworks/core/components/common/layout/grid_system_manager.cpp",
40  "$ace_root/frameworks/core/components/common/layout/screen_system_manager.cpp",
41  "$ace_root/frameworks/core/components/common/properties/alignment.cpp",
42  "$ace_root/frameworks/core/components/common/properties/color.cpp",
43  "$ace_root/frameworks/core/components_v2/inspector/inspector_constants.cpp",
44  "$ace_root/frameworks/core/event/key_event.cpp",
45  "$ace_root/frameworks/core/gestures/velocity_tracker.cpp",
46  "$ace_root/frameworks/core/pipeline/base/constants.cpp",
47
48  # components_ng_base
49  "$ace_root/frameworks/core/components_ng/base/frame_node.cpp",
50  "$ace_root/frameworks/core/components_ng/base/geometry_node.cpp",
51  "$ace_root/frameworks/core/components_ng/base/modifier.cpp",
52  "$ace_root/frameworks/core/components_ng/base/view_stack_processor.cpp",
53
54  # components_ng_render
55  "$ace_root/frameworks/core/components_ng/render/divider_painter.cpp",
56  "$ace_root/frameworks/core/components_ng/render/paint_wrapper.cpp",
57
58  # components_ng_event
59  "$ace_root/frameworks/core/components_ng/event/event_hub.cpp",
60  "$ace_root/frameworks/core/components_ng/event/focus_hub.cpp",
61  "$ace_root/frameworks/core/components_ng/event/gesture_event_hub.cpp",
62  "$ace_root/frameworks/core/components_ng/event/input_event.cpp",
63  "$ace_root/frameworks/core/components_ng/event/input_event_hub.cpp",
64  "$ace_root/frameworks/core/components_ng/event/state_style_manager.cpp",
65
66  # mock
67  "$ace_root/frameworks/base/test/mock/mock_ressched_report.cpp",
68  "$ace_root/frameworks/base/test/mock/mock_socperf_client_impl.cpp",
69  "$ace_root/frameworks/base/test/mock/mock_system_properties.cpp",
70  "$ace_root/frameworks/core/common/test/mock/mock_ace_application_info.cpp",
71  "$ace_root/frameworks/core/components_ng/test/mock/render/mock_media_player_creator.cpp",
72  "$ace_root/frameworks/core/pipeline_ng/test/mock/mock_pipeline_base.cpp",
73  "$ace_root/test/mock/base/mock_frame_trace_adapter.cpp",
74  "$ace_root/test/unittest/core/pipeline/mock_event_manager.cpp",
75
76  # self
77  # gestures
78  "$ace_root/frameworks/core/components_ng/gestures/gesture_group.cpp",
79  "$ace_root/frameworks/core/components_ng/gestures/gesture_referee.cpp",
80  "$ace_root/frameworks/core/components_ng/gestures/long_press_gesture.cpp",
81  "$ace_root/frameworks/core/components_ng/gestures/pan_gesture.cpp",
82  "$ace_root/frameworks/core/components_ng/gestures/pinch_gesture.cpp",
83  "$ace_root/frameworks/core/components_ng/gestures/rotation_gesture.cpp",
84  "$ace_root/frameworks/core/components_ng/gestures/swipe_gesture.cpp",
85  "$ace_root/frameworks/core/components_ng/gestures/tap_gesture.cpp",
86
87  # recognizers
88  "$ace_root/frameworks/core/components_ng/gestures/recognizers/click_recognizer.cpp",
89  "$ace_root/frameworks/core/components_ng/gestures/recognizers/exclusive_recognizer.cpp",
90  "$ace_root/frameworks/core/components_ng/gestures/recognizers/gesture_recognizer.cpp",
91  "$ace_root/frameworks/core/components_ng/gestures/recognizers/long_press_recognizer.cpp",
92  "$ace_root/frameworks/core/components_ng/gestures/recognizers/multi_fingers_recognizer.cpp",
93  "$ace_root/frameworks/core/components_ng/gestures/recognizers/pan_recognizer.cpp",
94  "$ace_root/frameworks/core/components_ng/gestures/recognizers/parallel_recognizer.cpp",
95  "$ace_root/frameworks/core/components_ng/gestures/recognizers/pinch_recognizer.cpp",
96  "$ace_root/frameworks/core/components_ng/gestures/recognizers/recognizer_group.cpp",
97  "$ace_root/frameworks/core/components_ng/gestures/recognizers/rotation_recognizer.cpp",
98  "$ace_root/frameworks/core/components_ng/gestures/recognizers/sequenced_recognizer.cpp",
99  "$ace_root/frameworks/core/components_ng/gestures/recognizers/swipe_recognizer.cpp",
100
101  # NG
102  "$ace_root/frameworks/core/components_ng/pattern/gesture/gesture_model_ng.cpp",
103]
104
105ohos_unittest("gestures_test_ng") {
106  module_out_path = gestures_test_output_path
107
108  test_sources = [ "gestures_test_ng.cpp" ]
109
110  sources = common_sources + test_sources
111
112  deps = [
113    "$ace_root/test/unittest:ace_unittest_log",
114    "$ace_root/test/unittest:ace_unittest_trace",
115    "$cjson_root:cjson_static",
116    "//third_party/googletest:gmock_main",
117  ]
118
119  configs = [ "$ace_root/test/unittest:ace_unittest_config" ]
120}
121