1 /* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef RESOURCE_MANAGER_TEST_COMMON_H 17 #define RESOURCE_MANAGER_TEST_COMMON_H 18 19 #include "hap_resource.h" 20 #include "hilog_wrapper.h" 21 22 #include <map> 23 #include <string> 24 #include <vector> 25 26 // this is relative path 27 static const char *g_resFilePath = "all/assets/entry/resources.index"; 28 29 namespace OHOS { 30 namespace Global { 31 namespace Resource { 32 std::string FormatFullPath(const char *fileRelativePath); 33 34 void PrintIdValues(const HapResource::IdValues *idValues); 35 36 void PrintMapString(const std::map<std::string, std::string> &value); 37 38 void PrintVectorString(const std::vector<std::string> &value); 39 40 ResConfig *CreateResConfig(const char *language, const char *script, const char *region); 41 } // namespace Resource 42 } // namespace Global 43 } // namespace OHOS 44 #endif 45