# Copyright (c) 2021 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/test.gni") import("//foundation/arkui/ace_engine/ace_config.gni") module_output_path = "ace_engine_full/jscard/card" ohos_unittest("CardFrontendTest") { module_out_path = module_output_path sources = [ "$ace_root/frameworks/core/components/test/json/json_frontend.cpp", "$ace_root/frameworks/core/components/test/unittest/mock/mock_render_common.cpp", "$ace_root/frameworks/core/components/test/unittest/mock/mock_view_stack_model.cpp", "../card_test_factory.cpp", "card_frontend_declarative_test.cpp", "card_frontend_delegate_test.cpp", "card_frontend_test.cpp", ] configs = [ ":config_domnode_test", "$ace_root:ace_test_config", ] deps = [ "$ace_root/build:ace_ohos_unittest_base", "$ace_root/frameworks/bridge/js_frontend/engine:js_engine_ark_ohos", "$ace_root/frameworks/bridge/js_frontend/engine/jsi:js_engine_bridge_ark_ohos", "//third_party/googletest:gmock_main", ] external_deps = [ "ability_base:configuration", "ability_runtime:abilitykit_native", "c_utils:utils", "input:libmmi-client", "ipc:ipc_single", "napi:ace_napi", "window_manager:libdm", "window_manager:libwm", "window_manager:scene_session", "window_manager:scene_session_manager", ] sources += [ "$ace_root/test/mock/adapter/mock_mmi_event_convertor.cpp", "$ace_root/test/mock/core/common/mock_udmf.cpp", ] part_name = ace_engine_part } config("config_domnode_test") { visibility = [ ":*" ] include_dirs = [ "$ace_root" ] } group("unittest") { testonly = true deps = [] deps += [ ":CardFrontendTest" ] }