# 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("//base/global/resource_management/resmgr.gni") import("//build/test.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/string_utils_test.cpp", "unittest/common/test_common.cpp", ] include_dirs = [ "unittest/common", "//base/global/resource_management/frameworks/resmgr/include", "//base/global/resource_management/interfaces/inner_api/include", ] if (resource_management_support_icu) { include_dirs += [ "//third_party/icu/icu4c/source", "//third_party/icu/icu4c/source/common", "//third_party/icu/icu4c/source/i18n", "//third_party/zlib/contrib/minizip", ] defines += [ "SUPPORT_GRAPHICS" ] } deps = [ "//base/global/resource_management/frameworks/resmgr:global_resmgr", "//third_party/googletest:gtest_main", "//third_party/zlib:libz", ] external_deps = [ "hiviewdfx_hilog_native:libhilog" ] resource_config_file = "//base/global/resource_management/test/resource/ohos_test.xml" } group("unittest") { testonly = true deps = [ ":resmgr_test" ] }