1# Copyright (c) 2024 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("//build/test.gni") 15import("//foundation/arkui/ui_appearance/ui_appearance.gni") 16 17module_output_path = "ui_appearance/ui_appearance_test" 18 19config("ui_appearance_service_exception_config") { 20 cflags_cc = [ "-fexceptions" ] 21} 22 23ohos_unittest("setting_data_manager_test") { 24 module_out_path = module_output_path 25 26 include_dirs = [ 27 "${ui_appearance_test_mock_path}/mock_dataobs_manager/", 28 "${ui_appearance_test_mock_path}/mock_datashare_consumer/", 29 "${ui_appearance_test_mock_path}/mock_ipc_single/", 30 "${ui_appearance_test_mock_path}/mock_samgr_proxy/", 31 "${ui_appearance_services_utils_path}/include/", 32 "${ui_appearance_services_path}/include/", 33 ] 34 35 sources = [ 36 "${ui_appearance_services_utils_path}/src/setting_data_manager.cpp", 37 "${ui_appearance_services_utils_path}/src/setting_data_observer.cpp", 38 "setting_data_manager_test.cpp", 39 ] 40 41 configs = [ ":ui_appearance_service_exception_config" ] 42 43 external_deps = [ 44 "ability_base:zuri", 45 "c_utils:utils", 46 "data_share:datashare_common", 47 "googletest:gmock_main", 48 "googletest:gtest_main", 49 "hilog:libhilog", 50 ] 51} 52 53group("unittest") { 54 testonly = true 55 deps = [ ":setting_data_manager_test" ] 56} 57