# Copyright (c) 2023-2024 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/ohos.gni") import("//build/test.gni") import("//foundation/resourceschedule/device_standby/standby_service.gni") module_output_path = "${standby_service_part_name}/unittest" ohos_unittest("standby_client_unit_test") { module_out_path = module_output_path cflags_cc = [ "-Dprivate=public", "-Dprotected=public", ] include_dirs = [ "${standby_innerkits_path}/include", "${standby_innerkits_path}/test/unittest/mock/include", ] sources = [ "${standby_innerkits_path}/test/unittest/standby_client_unit_test.cpp" ] deps = [ "${standby_innerkits_path}:standby_innerkits", "${standby_service_frameworks_path}:standby_fwk", ] external_deps = [ "ability_runtime:abilitykit_native", "ability_runtime:wantagent_innerkits", "c_utils:utils", "hilog:libhilog", "ipc:ipc_single", "samgr:samgr_proxy", ] subsystem_name = "resourceschedule" part_name = "${standby_service_part_name}" } ohos_unittest("mock_standby_client_unit_test") { module_out_path = module_output_path cflags_cc = [ "-Dprivate=public", "-Dprotected=public", ] include_dirs = [ "${standby_innerkits_path}/include", "${standby_innerkits_path}/test/unittest/mock/include", ] sources = [ "${standby_innerkits_path}/test/unittest/mock/mock_sa_service.cpp", "${standby_innerkits_path}/test/unittest/mock_standby_client_unit_test.cpp", ] deps = [ "${standby_innerkits_path}:standby_innerkits", "${standby_service_frameworks_path}:standby_fwk", ] external_deps = [ "ability_runtime:abilitykit_native", "ability_runtime:wantagent_innerkits", "c_utils:utils", "hilog:libhilog", "ipc:ipc_single", "samgr:samgr_proxy", ] subsystem_name = "resourceschedule" part_name = "${standby_service_part_name}" } group("unittest") { testonly = true deps = [ ":mock_standby_client_unit_test", ":standby_client_unit_test", ] }