• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
19ohos_unittest("dark_mode_manager_test") {
20  module_out_path = module_output_path
21
22  include_dirs = [
23    "${ui_appearance_test_mock_path}/mock_alarm_timer_manager/",
24    "${ui_appearance_test_mock_path}/mock_dataobs_manager/",
25    "${ui_appearance_test_mock_path}/mock_datashare_consumer/",
26    "${ui_appearance_test_mock_path}/mock_ipc_single/",
27    "${ui_appearance_test_mock_path}/mock_samgr_proxy/",
28    "${ui_appearance_test_mock_path}/mock_setting_data_manager/",
29    "${ui_appearance_services_path}/include/",
30    "${ui_appearance_services_path}/utils/include/",
31  ]
32
33  sources = [
34    "${ui_appearance_services_path}/src/dark_mode_manager.cpp",
35    "${ui_appearance_services_path}/src/dark_mode_temp_state_manager.cpp",
36    "${ui_appearance_services_path}/src/screen_switch_operator_manager.cpp",
37    "${ui_appearance_services_path}/utils/src/parameter_wrap.cpp",
38    "dark_mode_manager_test.cpp",
39  ]
40
41  external_deps = [
42    "ability_base:configuration",
43    "ability_runtime:wantagent_innerkits",
44    "c_utils:utils",
45    "common_event_service:cesfwk_core",
46    "common_event_service:cesfwk_innerkits",
47    "data_share:datashare_consumer",
48    "googletest:gmock_main",
49    "googletest:gtest_main",
50    "hilog:libhilog",
51    "init:libbegetutil",
52    "safwk:system_ability_fwk",
53  ]
54}
55
56group("unittest") {
57  testonly = true
58  deps = [ ":dark_mode_manager_test" ]
59}
60