1# Copyright (c) 2025 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 16config("c_api_configs") { 17 cflags = [ "-Wno-missing-braces" ] 18} 19 20ohos_unittest("key_event_test") { 21 module_out_path = interface_test_output_path 22 23 sources = [ 24 "$ace_root/interfaces/native/event/ui_input_event.cpp", 25 "$ace_root/interfaces/native/event/key_event_impl.cpp", 26 "$ace_root/interfaces/native/node/animate_impl.cpp", 27 "$ace_root/interfaces/native/node/dialog_model.cpp", 28 "$ace_root/interfaces/native/node/event_converter.cpp", 29 "$ace_root/interfaces/native/node/gesture_impl.cpp", 30 "$ace_root/interfaces/native/node/native_impl.cpp", 31 "$ace_root/interfaces/native/node/native_node_napi.cpp", 32 "$ace_root/interfaces/native/node/node_extened.cpp", 33 "$ace_root/interfaces/native/node/node_model.cpp", 34 "$ace_root/interfaces/native/node/node_model_safely.cpp", 35 "$ace_root/interfaces/native/node/node_node_relative_container.cpp", 36 "$ace_root/interfaces/native/node/node_transition.cpp", 37 "$ace_root/interfaces/native/node/style_modifier.cpp", 38 "oh_arkui_keyevent_getkeycode_test.cpp", 39 "oh_arkui_keyevent_getkeyintensioncode_test.cpp", 40 "oh_arkui_keyevent_getkeysource_test.cpp", 41 "oh_arkui_keyevent_getkeytext_test.cpp", 42 "oh_arkui_keyevent_gettype_test.cpp", 43 "oh_arkui_keyevent_getunicode_test.cpp", 44 "oh_arkui_keyevent_stoppropagation_test.cpp", 45 "oh_arkui_keyevent_setconsumed_test.cpp", 46 "oh_arkui_keyevent_dispatch_test.cpp", 47 "oh_arkui_keyevent_isnumlockon_test.cpp", 48 "oh_arkui_keyevent_iscapslockon_test.cpp", 49 "oh_arkui_keyevent_isscrolllockon_test.cpp", 50 ] 51 52 configs = [ 53 "$ace_root/test/unittest:ace_unittest_config", 54 ":c_api_configs", 55 ] 56 57 include_dirs = [ 58 "$ace_root/frameworks/core/interfaces/arkoala", 59 "$ace_root/frameworks/", 60 "$ace_root/interfaces/native/", 61 "$ace_root/interfaces/native/node", 62 "$ace_root", 63 ] 64 65 deps = [ 66 "$ace_root/test/unittest:ace_base", 67 "$ace_root/test/unittest:ace_components_base", 68 "$ace_root/test/unittest:ace_components_event", 69 "$ace_root/test/unittest:ace_components_gestures", 70 "$ace_root/test/unittest:ace_components_layout", 71 "$ace_root/test/unittest:ace_components_manager", 72 "$ace_root/test/unittest:ace_components_mock", 73 "$ace_root/test/unittest:ace_components_pattern", 74 "$ace_root/test/unittest:ace_components_property", 75 "$ace_root/test/unittest:ace_components_render", 76 "$ace_root/test/unittest:ace_components_syntax", 77 "$ace_root/test/unittest:ace_core_animation", 78 "$ace_root/test/unittest:ace_core_extra", 79 ] 80 81 external_deps = [ 82 "cJSON:cjson", 83 "c_utils:utils", 84 "googletest:gmock_main", 85 "graphic_2d:2d_graphics", 86 "graphic_2d:librender_service_base", 87 "graphic_2d:librender_service_client", 88 "hilog:libhilog", 89 "image_framework:image", 90 "image_framework:image_native", 91 "napi:ace_napi", 92 "resource_management:global_resmgr", 93 ] 94}