1# Copyright (c) 2021-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("//base/notification/common_event_service/event.gni") 15import("//build/test.gni") 16 17module_output_path = 18 "common_event_service/common_event_service/frameworks/native" 19 20ohos_unittest("matching_skills_test") { 21 module_out_path = module_output_path 22 23 sources = [ "matching_skills_test.cpp" ] 24 25 configs = [] 26 27 deps = [ "${ces_native_path}:cesfwk_innerkits" ] 28 29 external_deps = [ 30 "ability_base:want", 31 "c_utils:utils", 32 "eventhandler:libeventhandler", 33 "hilog:libhilog", 34 "ipc:ipc_core", 35 ] 36} 37 38ohos_unittest("common_event_subscribe_test") { 39 module_out_path = module_output_path 40 41 sources = [ "common_event_subscribe_test.cpp" ] 42 43 configs = [] 44 45 deps = [ 46 "${ces_core_path}:cesfwk_core", 47 "${ces_native_path}:cesfwk_innerkits", 48 "${services_path}:cesfwk_services_static", 49 ] 50 51 external_deps = [ 52 "ability_base:want", 53 "access_token:libaccesstoken_sdk", 54 "bundle_framework:appexecfwk_base", 55 "bundle_framework:appexecfwk_core", 56 "c_utils:utils", 57 "eventhandler:libeventhandler", 58 "ffrt:libffrt", 59 "hilog:libhilog", 60 "init:libbegetutil", 61 "ipc:ipc_core", 62 ] 63} 64 65ohos_unittest("common_event_unsubscribe_test") { 66 module_out_path = module_output_path 67 68 sources = [ "common_event_unsubscribe_test.cpp" ] 69 70 configs = [] 71 72 deps = [ 73 "${ces_core_path}:cesfwk_core", 74 "${ces_native_path}:cesfwk_innerkits", 75 "${services_path}:cesfwk_services_static", 76 ] 77 78 external_deps = [ 79 "ability_base:want", 80 "access_token:libaccesstoken_sdk", 81 "bundle_framework:appexecfwk_base", 82 "bundle_framework:appexecfwk_core", 83 "c_utils:utils", 84 "eventhandler:libeventhandler", 85 "ffrt:libffrt", 86 "hilog:libhilog", 87 "init:libbegetutil", 88 "ipc:ipc_core", 89 ] 90} 91 92ohos_unittest("common_event_subscribe_info_test") { 93 module_out_path = module_output_path 94 95 sources = [ "common_event_subscribe_info_test.cpp" ] 96 97 configs = [] 98 99 deps = [ 100 "${ces_core_path}:cesfwk_core", 101 "${ces_native_path}:cesfwk_innerkits", 102 "${services_path}:cesfwk_services_static", 103 ] 104 105 external_deps = [ 106 "ability_base:want", 107 "access_token:libaccesstoken_sdk", 108 "bundle_framework:appexecfwk_base", 109 "bundle_framework:appexecfwk_core", 110 "c_utils:utils", 111 "eventhandler:libeventhandler", 112 "ffrt:libffrt", 113 "hilog:libhilog", 114 "init:libbegetutil", 115 "ipc:ipc_core", 116 ] 117} 118ohos_unittest("common_event_publish_info_test") { 119 module_out_path = module_output_path 120 121 sources = [ "common_event_publish_info_test.cpp" ] 122 123 configs = [] 124 125 deps = [ 126 "${ces_core_path}:cesfwk_core", 127 "${ces_native_path}:cesfwk_innerkits", 128 ] 129 130 external_deps = [ 131 "c_utils:utils", 132 "hilog:libhilog", 133 ] 134} 135 136group("unittest") { 137 testonly = true 138 deps = [] 139 140 deps += [ 141 ":common_event_publish_info_test", 142 ":common_event_subscribe_info_test", 143 ":common_event_subscribe_test", 144 ":common_event_unsubscribe_test", 145 ":matching_skills_test", 146 ] 147} 148