# Copyright (c) 2021-2022 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/test.gni") import("../../../resmgr.gni") ohos_unittest("resmgr_test") { module_out_path = "resource_management/test" defines = [ "CONFIG_HILOG" ] sources = [ "unittest/common/hap_manager_test.cpp", "unittest/common/hap_parser_test.cpp", "unittest/common/hap_resource_test.cpp", "unittest/common/locale_info_test.cpp", "unittest/common/res_config_impl_test.cpp", "unittest/common/res_config_test.cpp", "unittest/common/res_desc_test.cpp", "unittest/common/resource_manager_performance_test.cpp", "unittest/common/resource_manager_test.cpp", "unittest/common/resource_manager_test_common.cpp", "unittest/common/resource_manager_test_hap.cpp", "unittest/common/resource_manager_test_media.cpp", "unittest/common/resource_manager_test_string.cpp", "unittest/common/string_utils_test.cpp", "unittest/common/test_common.cpp", "unittest/common/theme_config_test.cpp", "unittest/common/theme_manager_test.cpp", ] cflags = [ "-Dprivate=public", "-Dprotected=public", ] include_dirs = [ "unittest/common", "../include", "../../../interfaces/inner_api/include", ] deps = [ "../:global_resmgr", "//third_party/cJSON:cjson", "//third_party/googletest:gtest_main", "//third_party/zlib:libz", ] if (resource_management_support_icu) { include_dirs += [ "//third_party/icu/icu4c/source", "//third_party/icu/icu4c/source/i18n", ] defines += [ "SUPPORT_GRAPHICS" ] deps += [ "//third_party/icu/icu4c:shared_icuuc" ] } external_deps = [ "ability_base:extractortool", "hilog:libhilog", ] resource_config_file = "../../../test/resource/ohos_test.xml" } group("unittest") { testonly = true deps = [ ":resmgr_test" ] }