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. 13import("//build/test.gni") 14import("//foundation/ability/form_fwk/form_fwk.gni") 15 16config("form_mgr_test_config") { 17 include_dirs = [ 18 "${form_fwk_path}/interfaces/kits/native/include", 19 "${form_fwk_path}/test/mock/include", 20 ] 21} 22 23# ohos_unittest is a template that will add gtest as deps. 24ohos_unittest("FmsFormMgrTest") { 25 module_out_path = "form_fwk/form_mgr" 26 27 configs = [ ":form_mgr_test_config" ] 28 29 sources = [ 30 "${form_fwk_path}/test/mock/src/mock_form_provider_client.cpp", 31 "form_mgr_test.cpp", 32 ] 33 34 deps = [ 35 "${form_fwk_path}:fmskit_native", 36 "//third_party/googletest:gmock_main", 37 ] 38 39 external_deps = [ 40 "ability_base:want", 41 "ability_runtime:app_manager", 42 "bundle_framework:appexecfwk_base", 43 "bundle_framework:appexecfwk_core", 44 "c_utils:utils", 45 "eventhandler:libeventhandler", 46 "form_fwk:form_manager", 47 "hilog:libhilog", 48 "ipc:ipc_core", 49 "samgr:samgr_proxy", 50 ] 51} 52 53group("unittest") { 54 testonly = true 55 deps = [ ":FmsFormMgrTest" ] 56} 57