From d7a37d19dfb512689c607797fb8c1a43099aec06 Mon Sep 17 00:00:00 2001 From: w00617344 <1323883142@qq.com> Date: Thu, 17 Feb 2022 11:29:37 +0800 Subject: [PATCH] 1323883142@qq.com Signed-off-by: w00617344 <1323883142@qq.com> --- frameworks/resmgr_lite/include/global_utils.h | 2 +- frameworks/resmgr_lite/include/hap_resource.h | 4 +- frameworks/resmgr_lite/include/res_desc.h | 2 +- .../resmgr_lite/include/resource_manager.h | 2 +- .../include/resource_manager_impl.h | 4 +- .../resmgr_lite/include/utils/date_utils.h | 1 - frameworks/resmgr_lite/src/lock.cpp | 1 - .../test/unittest/lite/common/global_test.cpp | 3 +- .../test/unittest/lite/common/global_test.h | 8 +- .../unittest/lite/common/hap_manager_test.cpp | 3 +- .../unittest/lite/common/hap_manager_test.h | 4 +- .../unittest/lite/common/hap_parser_test.cpp | 3 +- .../unittest/lite/common/hap_parser_test.h | 8 +- .../lite/common/hap_resource_test.cpp | 3 +- .../unittest/lite/common/hap_resource_test.h | 8 +- .../unittest/lite/common/locale_info_test.cpp | 5 +- .../unittest/lite/common/locale_info_test.h | 54 +++--- .../lite/common/res_config_impl_test.cpp | 3 +- .../lite/common/res_config_impl_test.h | 158 +++++++++--------- .../unittest/lite/common/res_config_test.cpp | 5 +- .../unittest/lite/common/res_config_test.h | 2 +- .../unittest/lite/common/res_desc_test.cpp | 3 +- .../test/unittest/lite/common/res_desc_test.h | 4 +- .../resource_manager_performance_test.cpp | 3 +- .../resource_manager_performance_test.h | 64 +++---- .../lite/common/resource_manager_test.cpp | 3 +- .../lite/common/resource_manager_test.h | 156 ++++++++--------- .../lite/common/string_utils_test.cpp | 3 +- .../unittest/lite/common/string_utils_test.h | 4 +- 29 files changed, 266 insertions(+), 257 deletions(-) diff --git a/frameworks/resmgr_lite/include/global_utils.h b/frameworks/resmgr_lite/include/global_utils.h index 6bd8c48..a2cedd4 100644 --- a/frameworks/resmgr_lite/include/global_utils.h +++ b/frameworks/resmgr_lite/include/global_utils.h @@ -114,7 +114,7 @@ typedef struct LocaleItem { GlobalUtilsImpl *GetGlobalUtilsImpl(void); -#define MC_FAILURE -1 +#define MC_FAILURE (-1) #define MC_SUCCESS 0 #ifdef __cplusplus diff --git a/frameworks/resmgr_lite/include/hap_resource.h b/frameworks/resmgr_lite/include/hap_resource.h index 007b899..0f5d6c9 100644 --- a/frameworks/resmgr_lite/include/hap_resource.h +++ b/frameworks/resmgr_lite/include/hap_resource.h @@ -15,12 +15,12 @@ #ifndef RESOURCE_MANAGER_HAPRESOURCE_H #define RESOURCE_MANAGER_HAPRESOURCE_H -#include "res_desc.h" -#include "res_config_impl.h" #include #include #include #include +#include "res_desc.h" +#include "res_config_impl.h" namespace OHOS { namespace Global { diff --git a/frameworks/resmgr_lite/include/res_desc.h b/frameworks/resmgr_lite/include/res_desc.h index 18cdb6f..15ac4aa 100644 --- a/frameworks/resmgr_lite/include/res_desc.h +++ b/frameworks/resmgr_lite/include/res_desc.h @@ -16,11 +16,11 @@ #ifndef OHOS_RESOURCE_MANAGER_RES_DESC_H #define OHOS_RESOURCE_MANAGER_RES_DESC_H -#include "res_common.h" #include #include #include #include +#include "res_common.h" namespace OHOS { namespace Global { diff --git a/frameworks/resmgr_lite/include/resource_manager.h b/frameworks/resmgr_lite/include/resource_manager.h index 560fc84..940cd9d 100644 --- a/frameworks/resmgr_lite/include/resource_manager.h +++ b/frameworks/resmgr_lite/include/resource_manager.h @@ -15,10 +15,10 @@ #ifndef OHOS_RESOURCE_MANAGER_RESOURCEMANAGER_H #define OHOS_RESOURCE_MANAGER_RESOURCEMANAGER_H -#include "res_config.h" #include #include #include +#include "res_config.h" namespace OHOS { namespace Global { diff --git a/frameworks/resmgr_lite/include/resource_manager_impl.h b/frameworks/resmgr_lite/include/resource_manager_impl.h index 6070a88..f402e8c 100644 --- a/frameworks/resmgr_lite/include/resource_manager_impl.h +++ b/frameworks/resmgr_lite/include/resource_manager_impl.h @@ -15,11 +15,11 @@ #ifndef OHOS_RESOURCE_MANAGER_RESOURCEMANAGERIMPL_H #define OHOS_RESOURCE_MANAGER_RESOURCEMANAGERIMPL_H -#include "hap_manager.h" -#include "resource_manager.h" #include #include #include +#include "hap_manager.h" +#include "resource_manager.h" namespace OHOS { namespace Global { diff --git a/frameworks/resmgr_lite/include/utils/date_utils.h b/frameworks/resmgr_lite/include/utils/date_utils.h index 88024ae..555f50e 100644 --- a/frameworks/resmgr_lite/include/utils/date_utils.h +++ b/frameworks/resmgr_lite/include/utils/date_utils.h @@ -18,7 +18,6 @@ #include #include - #include "common.h" namespace OHOS { diff --git a/frameworks/resmgr_lite/src/lock.cpp b/frameworks/resmgr_lite/src/lock.cpp index 293db12..2a9d305 100644 --- a/frameworks/resmgr_lite/src/lock.cpp +++ b/frameworks/resmgr_lite/src/lock.cpp @@ -13,7 +13,6 @@ * limitations under the License. */ #include "lock.h" -#include namespace OHOS { namespace Global { diff --git a/frameworks/resmgr_lite/test/unittest/lite/common/global_test.cpp b/frameworks/resmgr_lite/test/unittest/lite/common/global_test.cpp index 00e964b..c578f46 100644 --- a/frameworks/resmgr_lite/test/unittest/lite/common/global_test.cpp +++ b/frameworks/resmgr_lite/test/unittest/lite/common/global_test.cpp @@ -27,7 +27,7 @@ using namespace OHOS::Global::Resource; using namespace testing::ext; - +namespace { class GlobalTest : public testing::Test { public: static void SetUpTestCase(void); @@ -174,3 +174,4 @@ HWTEST_F(GlobalTest, GlobalFuncTest004, TestSize.Level1) EXPECT_EQ(std::string("App Name"), values); free(values); } +} diff --git a/frameworks/resmgr_lite/test/unittest/lite/common/global_test.h b/frameworks/resmgr_lite/test/unittest/lite/common/global_test.h index beccf53..4bf724a 100644 --- a/frameworks/resmgr_lite/test/unittest/lite/common/global_test.h +++ b/frameworks/resmgr_lite/test/unittest/lite/common/global_test.h @@ -16,9 +16,9 @@ #ifndef RESOURCE_MANAGER_GLOBAL_TEST_H #define RESOURCE_MANAGER_GLOBAL_TEST_H -int GlobalFuncTest001(); -int GlobalFuncTest002(); -int GlobalFuncTest003(); -int GlobalFuncTest004(); +int GlobalFuncTest001(void); +int GlobalFuncTest002(void); +int GlobalFuncTest003(void); +int GlobalFuncTest004(void); #endif diff --git a/frameworks/resmgr_lite/test/unittest/lite/common/hap_manager_test.cpp b/frameworks/resmgr_lite/test/unittest/lite/common/hap_manager_test.cpp index 67186bb..993bf0e 100644 --- a/frameworks/resmgr_lite/test/unittest/lite/common/hap_manager_test.cpp +++ b/frameworks/resmgr_lite/test/unittest/lite/common/hap_manager_test.cpp @@ -26,7 +26,7 @@ using namespace OHOS::Global::Resource; using namespace testing::ext; - +namespace { class HapManagerTest : public testing::Test { public: static void SetUpTestCase(void); @@ -151,4 +151,5 @@ HWTEST_F(HapManagerTest, HapManagerFuncTest002, TestSize.Level1) delete (hapManager); delete (rc2); delete (rc); +} } \ No newline at end of file diff --git a/frameworks/resmgr_lite/test/unittest/lite/common/hap_manager_test.h b/frameworks/resmgr_lite/test/unittest/lite/common/hap_manager_test.h index 93b0537..c4082c2 100644 --- a/frameworks/resmgr_lite/test/unittest/lite/common/hap_manager_test.h +++ b/frameworks/resmgr_lite/test/unittest/lite/common/hap_manager_test.h @@ -16,7 +16,7 @@ #ifndef RESOURCE_MANAGER_HAP_MANAGER_TEST_H #define RESOURCE_MANAGER_HAP_MANAGER_TEST_H -int HapManagerFuncTest001(); -int HapManagerFuncTest002(); +int HapManagerFuncTest001(void); +int HapManagerFuncTest002(void); #endif diff --git a/frameworks/resmgr_lite/test/unittest/lite/common/hap_parser_test.cpp b/frameworks/resmgr_lite/test/unittest/lite/common/hap_parser_test.cpp index 1742629..ad3dbe8 100644 --- a/frameworks/resmgr_lite/test/unittest/lite/common/hap_parser_test.cpp +++ b/frameworks/resmgr_lite/test/unittest/lite/common/hap_parser_test.cpp @@ -26,7 +26,7 @@ using namespace OHOS::Global::Resource; using namespace testing::ext; - +namespace { class HapParserTest : public testing::Test { public: static void SetUpTestCase(void); @@ -180,4 +180,5 @@ HWTEST_F(HapParserTest, HapParserFuncTest004, TestSize.Level1) for (auto kp = keyParams.begin(); kp != keyParams.end(); kp++) { delete *kp; } +} } \ No newline at end of file diff --git a/frameworks/resmgr_lite/test/unittest/lite/common/hap_parser_test.h b/frameworks/resmgr_lite/test/unittest/lite/common/hap_parser_test.h index 7c5ef8d..a86ab36 100644 --- a/frameworks/resmgr_lite/test/unittest/lite/common/hap_parser_test.h +++ b/frameworks/resmgr_lite/test/unittest/lite/common/hap_parser_test.h @@ -16,9 +16,9 @@ #ifndef RESOURCE_MANAGER_HAP_RESOURCE_TEST_H #define RESOURCE_MANAGER_HAP_RESOURCE_TEST_H -int HapParserFuncTest001(); -int HapParserFuncTest002(); -int HapParserFuncTest003(); -int HapParserFuncTest004(); +int HapParserFuncTest001(void); +int HapParserFuncTest002(void); +int HapParserFuncTest003(void); +int HapParserFuncTest004(void); #endif diff --git a/frameworks/resmgr_lite/test/unittest/lite/common/hap_resource_test.cpp b/frameworks/resmgr_lite/test/unittest/lite/common/hap_resource_test.cpp index 872646f..2b6278d 100644 --- a/frameworks/resmgr_lite/test/unittest/lite/common/hap_resource_test.cpp +++ b/frameworks/resmgr_lite/test/unittest/lite/common/hap_resource_test.cpp @@ -29,7 +29,7 @@ using namespace OHOS::Global::Resource; using namespace testing::ext; - +namespace { class HapResourceTest : public testing::Test { public: static void SetUpTestCase(void); @@ -301,4 +301,5 @@ HWTEST_F(HapResourceTest, HapResourceFuncTest004, TestSize.Level1) // 3. hap file exists, config.json error: missing "moduleName" resDesc = LoadFromHap(FormatFullPath("err-config.json-2.hap").c_str(), nullptr); ASSERT_TRUE(resDesc == nullptr); +} } \ No newline at end of file diff --git a/frameworks/resmgr_lite/test/unittest/lite/common/hap_resource_test.h b/frameworks/resmgr_lite/test/unittest/lite/common/hap_resource_test.h index 7ea1b99..67a6922 100644 --- a/frameworks/resmgr_lite/test/unittest/lite/common/hap_resource_test.h +++ b/frameworks/resmgr_lite/test/unittest/lite/common/hap_resource_test.h @@ -16,9 +16,9 @@ #ifndef RESOURCE_MANAGER_HAP_RESOURCE_TEST_H #define RESOURCE_MANAGER_HAP_RESOURCE_TEST_H -int HapResourceFuncTest001(); -int HapResourceFuncTest002(); -int HapResourceFuncTest003(); -int HapResourceFuncTest004(); +int HapResourceFuncTest001(void); +int HapResourceFuncTest002(void); +int HapResourceFuncTest003(void); +int HapResourceFuncTest004(void); #endif diff --git a/frameworks/resmgr_lite/test/unittest/lite/common/locale_info_test.cpp b/frameworks/resmgr_lite/test/unittest/lite/common/locale_info_test.cpp index eb0af69..6216b04 100755 --- a/frameworks/resmgr_lite/test/unittest/lite/common/locale_info_test.cpp +++ b/frameworks/resmgr_lite/test/unittest/lite/common/locale_info_test.cpp @@ -25,7 +25,7 @@ using namespace OHOS::Global::Resource; using namespace testing::ext; - +namespace { class LocaleInfoTest : public testing::Test { public: static void SetUpTestCase(void); @@ -606,4 +606,5 @@ HWTEST_F(LocaleInfoTest, LocaleInfoPerformanceFuncTest001, TestSize.Level1) average = total / 1000.0; HILOG_DEBUG("avg cost FindAndSort: %f us", average); EXPECT_LT(average, 500); -}; \ No newline at end of file +}; +} \ No newline at end of file diff --git a/frameworks/resmgr_lite/test/unittest/lite/common/locale_info_test.h b/frameworks/resmgr_lite/test/unittest/lite/common/locale_info_test.h index 6512ab3..9b46153 100755 --- a/frameworks/resmgr_lite/test/unittest/lite/common/locale_info_test.h +++ b/frameworks/resmgr_lite/test/unittest/lite/common/locale_info_test.h @@ -16,32 +16,32 @@ #ifndef RESOURCE_MANAGER_LOCALE_INFO_TEST_H #define RESOURCE_MANAGER_LOCALE_INFO_TEST_H -int LocaleInfoFindAndSortTest001(); -int LocaleInfoFindAndSortTest002(); -int LocaleInfoFindAndSortTest003(); -int LocaleInfoFindAndSortTest004(); -int LocaleInfoFindAndSortTest005(); -int LocaleInfoUpdateSysDefaultTest001(); -int LocaleInfoGetSysDefaultTest001(); -int LocaleInfoGetLanguageTest001(); -int LocaleInfoGetRegionTest001(); -int LocaleInfoGetScriptTest001(); -int LocaleInfoBuildFromPartsTest001(); -int LocaleInfoBuildFromPartsTest002(); -int LocaleInfoBuildFromPartsTest003(); -int LocaleInfoBuildFromPartsTest004(); -int LocaleInfoBuildFromPartsTest005(); -int LocaleInfoBuildFromPartsTest006(); -int LocaleInfoBuildFromStringTest001(); -int LocaleInfoBuildFromStringTest002(); -int LocaleInfoBuildFromStringTest003(); -int LocaleInfoBuildFromStringTest004(); -int LocaleInfoBuildFromStringTest005(); -int LocaleInfoBuildFromStringTest006(); -int LocaleInfoBuildFromStringTest007(); -int LocaleInfoBuildFromStringTest008(); -int LocaleInfoBuildFromStringTest009(); -int LocaleInfoBuildFromStringTest0010(); -int LocaleInfoPerformanceFuncTest001(); +int LocaleInfoFindAndSortTest001(void); +int LocaleInfoFindAndSortTest002(void); +int LocaleInfoFindAndSortTest003(void); +int LocaleInfoFindAndSortTest004(void); +int LocaleInfoFindAndSortTest005(void); +int LocaleInfoUpdateSysDefaultTest001(void); +int LocaleInfoGetSysDefaultTest001(void); +int LocaleInfoGetLanguageTest001(void); +int LocaleInfoGetRegionTest001(void); +int LocaleInfoGetScriptTest001(void); +int LocaleInfoBuildFromPartsTest001(void); +int LocaleInfoBuildFromPartsTest002(void); +int LocaleInfoBuildFromPartsTest003(void); +int LocaleInfoBuildFromPartsTest004(void); +int LocaleInfoBuildFromPartsTest005(void); +int LocaleInfoBuildFromPartsTest006(void); +int LocaleInfoBuildFromStringTest001(void); +int LocaleInfoBuildFromStringTest002(void); +int LocaleInfoBuildFromStringTest003(void); +int LocaleInfoBuildFromStringTest004(void); +int LocaleInfoBuildFromStringTest005(void); +int LocaleInfoBuildFromStringTest006(void); +int LocaleInfoBuildFromStringTest007(void); +int LocaleInfoBuildFromStringTest008(void); +int LocaleInfoBuildFromStringTest009(void); +int LocaleInfoBuildFromStringTest0010(void); +int LocaleInfoPerformanceFuncTest001(void); #endif // RESOURCE_MANAGER_LOCALE_INFO_TEST_H diff --git a/frameworks/resmgr_lite/test/unittest/lite/common/res_config_impl_test.cpp b/frameworks/resmgr_lite/test/unittest/lite/common/res_config_impl_test.cpp index 18c2be0..5a6dc4f 100644 --- a/frameworks/resmgr_lite/test/unittest/lite/common/res_config_impl_test.cpp +++ b/frameworks/resmgr_lite/test/unittest/lite/common/res_config_impl_test.cpp @@ -23,7 +23,7 @@ using namespace OHOS::Global::Resource; using namespace testing::ext; - +namespace { class ResConfigImplTest : public testing::Test { public: static void SetUpTestCase(void); @@ -1392,4 +1392,5 @@ HWTEST_F(ResConfigImplTest, ResConfigImplIsMoreSuitableTest050, TestSize.Level1) delete request; delete current; delete other; +} } \ No newline at end of file diff --git a/frameworks/resmgr_lite/test/unittest/lite/common/res_config_impl_test.h b/frameworks/resmgr_lite/test/unittest/lite/common/res_config_impl_test.h index 3a102ee..2c406ef 100644 --- a/frameworks/resmgr_lite/test/unittest/lite/common/res_config_impl_test.h +++ b/frameworks/resmgr_lite/test/unittest/lite/common/res_config_impl_test.h @@ -16,84 +16,84 @@ #ifndef RESOURCE_MANAGER_RES_CONFIG_IMPL_TEST_H #define RESOURCE_MANAGER_RES_CONFIG_IMPL_TEST_H -int ResConfigImplMatchTest001(); -int ResConfigImplMatchTest002(); -int ResConfigImplMatchTest003(); -int ResConfigImplMatchTest004(); -int ResConfigImplMatchTest005(); -int ResConfigImplMatchTest006(); -int ResConfigImplMatchTest007(); -int ResConfigImplMatchTest008(); -int ResConfigImplMatchTest009(); -int ResConfigImplMatchTest010(); -int ResConfigImplMatchTest011(); -int ResConfigImplMatchTest012(); -int ResConfigImplMatchTest013(); -int ResConfigImplMatchTest014(); -int ResConfigImplMatchTest015(); -int ResConfigImplMatchTest016(); -int ResConfigImplMatchTest017(); -int ResConfigImplMatchTest018(); -int ResConfigImplMatchTest019(); -int ResConfigImplMatchTest020(); -int ResConfigImplMatchTest021(); -int ResConfigImplMatchTest022(); -int ResConfigImplMatchTest023(); -int ResConfigImplMatchTest024(); -int ResConfigImplMatchTest025(); -int ResConfigImplMatchTest026(); -int ResConfigImplMatchTest027(); -int ResConfigImplMatchTest028(); -int ResConfigImplMatchTest029(); -int ResConfigImplIsMoreSuitableTest001(); -int ResConfigImplIsMoreSuitableTest002(); -int ResConfigImplIsMoreSuitableTest003(); -int ResConfigImplIsMoreSuitableTest004(); -int ResConfigImplIsMoreSuitableTest005(); -int ResConfigImplIsMoreSuitableTest006(); -int ResConfigImplIsMoreSuitableTest007(); -int ResConfigImplIsMoreSuitableTest008(); -int ResConfigImplIsMoreSuitableTest009(); -int ResConfigImplIsMoreSuitableTest010(); -int ResConfigImplIsMoreSuitableTest011(); -int ResConfigImplIsMoreSuitableTest012(); -int ResConfigImplIsMoreSuitableTest013(); -int ResConfigImplIsMoreSuitableTest014(); -int ResConfigImplIsMoreSuitableTest015(); -int ResConfigImplIsMoreSuitableTest016(); -int ResConfigImplIsMoreSuitableTest017(); -int ResConfigImplIsMoreSuitableTest018(); -int ResConfigImplIsMoreSuitableTest019(); -int ResConfigImplIsMoreSuitableTest020(); -int ResConfigImplIsMoreSuitableTest021(); -int ResConfigImplIsMoreSuitableTest022(); -int ResConfigImplIsMoreSuitableTest023(); -int ResConfigImplIsMoreSuitableTest024(); -int ResConfigImplIsMoreSuitableTest025(); -int ResConfigImplIsMoreSuitableTest026(); -int ResConfigImplIsMoreSuitableTest027(); -int ResConfigImplIsMoreSuitableTest028(); -int ResConfigImplIsMoreSuitableTest029(); -int ResConfigImplIsMoreSuitableTest030(); -int ResConfigImplIsMoreSuitableTest031(); -int ResConfigImplIsMoreSuitableTest032(); -int ResConfigImplIsMoreSuitableTest033(); -int ResConfigImplIsMoreSuitableTest034(); -int ResConfigImplIsMoreSuitableTest035(); -int ResConfigImplIsMoreSuitableTest036(); -int ResConfigImplIsMoreSuitableTest037(); -int ResConfigImplIsMoreSuitableTest038(); -int ResConfigImplIsMoreSuitableTest039(); -int ResConfigImplIsMoreSuitableTest040(); -int ResConfigImplIsMoreSuitableTest041(); -int ResConfigImplIsMoreSuitableTest042(); -int ResConfigImplIsMoreSuitableTest043(); -int ResConfigImplIsMoreSuitableTest044(); -int ResConfigImplIsMoreSuitableTest045(); -int ResConfigImplIsMoreSuitableTest046(); -int ResConfigImplIsMoreSuitableTest047(); -int ResConfigImplIsMoreSuitableTest048(); -int ResConfigImplIsMoreSuitableTest049(); -int ResConfigImplIsMoreSuitableTest050(); +int ResConfigImplMatchTest001(void); +int ResConfigImplMatchTest002(void); +int ResConfigImplMatchTest003(void); +int ResConfigImplMatchTest004(void); +int ResConfigImplMatchTest005(void); +int ResConfigImplMatchTest006(void); +int ResConfigImplMatchTest007(void); +int ResConfigImplMatchTest008(void); +int ResConfigImplMatchTest009(void); +int ResConfigImplMatchTest010(void); +int ResConfigImplMatchTest011(void); +int ResConfigImplMatchTest012(void); +int ResConfigImplMatchTest013(void); +int ResConfigImplMatchTest014(void); +int ResConfigImplMatchTest015(void); +int ResConfigImplMatchTest016(void); +int ResConfigImplMatchTest017(void); +int ResConfigImplMatchTest018(void); +int ResConfigImplMatchTest019(void); +int ResConfigImplMatchTest020(void); +int ResConfigImplMatchTest021(void); +int ResConfigImplMatchTest022(void); +int ResConfigImplMatchTest023(void); +int ResConfigImplMatchTest024(void); +int ResConfigImplMatchTest025(void); +int ResConfigImplMatchTest026(void); +int ResConfigImplMatchTest027(void); +int ResConfigImplMatchTest028(void); +int ResConfigImplMatchTest029(void); +int ResConfigImplIsMoreSuitableTest001(void); +int ResConfigImplIsMoreSuitableTest002(void); +int ResConfigImplIsMoreSuitableTest003(void); +int ResConfigImplIsMoreSuitableTest004(void); +int ResConfigImplIsMoreSuitableTest005(void); +int ResConfigImplIsMoreSuitableTest006(void); +int ResConfigImplIsMoreSuitableTest007(void); +int ResConfigImplIsMoreSuitableTest008(void); +int ResConfigImplIsMoreSuitableTest009(void); +int ResConfigImplIsMoreSuitableTest010(void); +int ResConfigImplIsMoreSuitableTest011(void); +int ResConfigImplIsMoreSuitableTest012(void); +int ResConfigImplIsMoreSuitableTest013(void); +int ResConfigImplIsMoreSuitableTest014(void); +int ResConfigImplIsMoreSuitableTest015(void); +int ResConfigImplIsMoreSuitableTest016(void); +int ResConfigImplIsMoreSuitableTest017(void); +int ResConfigImplIsMoreSuitableTest018(void); +int ResConfigImplIsMoreSuitableTest019(void); +int ResConfigImplIsMoreSuitableTest020(void); +int ResConfigImplIsMoreSuitableTest021(void); +int ResConfigImplIsMoreSuitableTest022(void); +int ResConfigImplIsMoreSuitableTest023(void); +int ResConfigImplIsMoreSuitableTest024(void); +int ResConfigImplIsMoreSuitableTest025(void); +int ResConfigImplIsMoreSuitableTest026(void); +int ResConfigImplIsMoreSuitableTest027(void); +int ResConfigImplIsMoreSuitableTest028(void); +int ResConfigImplIsMoreSuitableTest029(void); +int ResConfigImplIsMoreSuitableTest030(void); +int ResConfigImplIsMoreSuitableTest031(void); +int ResConfigImplIsMoreSuitableTest032(void); +int ResConfigImplIsMoreSuitableTest033(void); +int ResConfigImplIsMoreSuitableTest034(void); +int ResConfigImplIsMoreSuitableTest035(void); +int ResConfigImplIsMoreSuitableTest036(void); +int ResConfigImplIsMoreSuitableTest037(void); +int ResConfigImplIsMoreSuitableTest038(void); +int ResConfigImplIsMoreSuitableTest039(void); +int ResConfigImplIsMoreSuitableTest040(void); +int ResConfigImplIsMoreSuitableTest041(void); +int ResConfigImplIsMoreSuitableTest042(void); +int ResConfigImplIsMoreSuitableTest043(void); +int ResConfigImplIsMoreSuitableTest044(void); +int ResConfigImplIsMoreSuitableTest045(void); +int ResConfigImplIsMoreSuitableTest046(void); +int ResConfigImplIsMoreSuitableTest047(void); +int ResConfigImplIsMoreSuitableTest048(void); +int ResConfigImplIsMoreSuitableTest049(void); +int ResConfigImplIsMoreSuitableTest050(void); #endif diff --git a/frameworks/resmgr_lite/test/unittest/lite/common/res_config_test.cpp b/frameworks/resmgr_lite/test/unittest/lite/common/res_config_test.cpp index 2682b32..97f21f8 100644 --- a/frameworks/resmgr_lite/test/unittest/lite/common/res_config_test.cpp +++ b/frameworks/resmgr_lite/test/unittest/lite/common/res_config_test.cpp @@ -25,7 +25,7 @@ using namespace OHOS::Global::Resource; using namespace testing::ext; - +namespace { class ResConfigTest : public testing::Test { public: static void SetUpTestCase(void); @@ -74,4 +74,5 @@ HWTEST_F(ResConfigTest, ResConfigFuncTest001, TestSize.Level1) delete target; delete current; delete rc; -}; \ No newline at end of file +}; +} \ No newline at end of file diff --git a/frameworks/resmgr_lite/test/unittest/lite/common/res_config_test.h b/frameworks/resmgr_lite/test/unittest/lite/common/res_config_test.h index 2b689ed..d21ba14 100644 --- a/frameworks/resmgr_lite/test/unittest/lite/common/res_config_test.h +++ b/frameworks/resmgr_lite/test/unittest/lite/common/res_config_test.h @@ -16,6 +16,6 @@ #ifndef RESOURCE_MANAGER_RES_CONFIG_TEST_H #define RESOURCE_MANAGER_RES_CONFIG_TEST_H -int ResConfigFuncTest001(); +int ResConfigFuncTest001(void); #endif diff --git a/frameworks/resmgr_lite/test/unittest/lite/common/res_desc_test.cpp b/frameworks/resmgr_lite/test/unittest/lite/common/res_desc_test.cpp index fb44ca7..6b58a44 100644 --- a/frameworks/resmgr_lite/test/unittest/lite/common/res_desc_test.cpp +++ b/frameworks/resmgr_lite/test/unittest/lite/common/res_desc_test.cpp @@ -23,7 +23,7 @@ using namespace OHOS::Global::Resource; using namespace testing::ext; - +namespace { class ResDescTest : public testing::Test { public: static void SetUpTestCase(void); @@ -153,4 +153,5 @@ HWTEST_F(ResDescTest, ResDescFuncTest002, TestSize.Level1) TestKeyParam(KeyType::SCREEN_DENSITY, ScreenDensity::SCREEN_DENSITY_XXLDPI, RE_480_STR); TestKeyParam(KeyType::SCREEN_DENSITY, ScreenDensity::SCREEN_DENSITY_XXXLDPI, RE_640_STR); TestKeyParam(KeyType::SCREEN_DENSITY, ScreenDensity::SCREEN_DENSITY_NOT_SET, "not_screen_density"); +} } \ No newline at end of file diff --git a/frameworks/resmgr_lite/test/unittest/lite/common/res_desc_test.h b/frameworks/resmgr_lite/test/unittest/lite/common/res_desc_test.h index 416f348..6a3fee3 100644 --- a/frameworks/resmgr_lite/test/unittest/lite/common/res_desc_test.h +++ b/frameworks/resmgr_lite/test/unittest/lite/common/res_desc_test.h @@ -16,7 +16,7 @@ #ifndef RESOURCE_MANAGER_RES_DESC_TEST_H #define RESOURCE_MANAGER_RES_DESC_TEST_H -int ResDescFuncTest001(); -int ResDescFuncTest002(); +int ResDescFuncTest001(void); +int ResDescFuncTest002(void); #endif diff --git a/frameworks/resmgr_lite/test/unittest/lite/common/resource_manager_performance_test.cpp b/frameworks/resmgr_lite/test/unittest/lite/common/resource_manager_performance_test.cpp index 4eaf790..d56394c 100644 --- a/frameworks/resmgr_lite/test/unittest/lite/common/resource_manager_performance_test.cpp +++ b/frameworks/resmgr_lite/test/unittest/lite/common/resource_manager_performance_test.cpp @@ -35,7 +35,7 @@ using namespace OHOS::Global::Resource; using namespace testing::ext; using namespace std; - +namespace { class ResourceManagerPerformanceTest : public testing::Test { public: static void SetUpTestCase(void); @@ -1119,3 +1119,4 @@ HWTEST_F(ResourceManagerPerformanceTest, ResourceManagerPerformanceFuncTest032, HILOG_DEBUG("avg cost 032: %f us", average); EXPECT_LT(average, 100); }; +} diff --git a/frameworks/resmgr_lite/test/unittest/lite/common/resource_manager_performance_test.h b/frameworks/resmgr_lite/test/unittest/lite/common/resource_manager_performance_test.h index 7269ed7..dd33795 100644 --- a/frameworks/resmgr_lite/test/unittest/lite/common/resource_manager_performance_test.h +++ b/frameworks/resmgr_lite/test/unittest/lite/common/resource_manager_performance_test.h @@ -16,37 +16,37 @@ #ifndef RESOURCE_MANAGER_RESOURCE_MANANGER_PERF_TEST_H #define RESOURCE_MANAGER_RESOURCE_MANANGER_PERF_TEST_H -int ResourceManagerPerformanceFuncTest001(); -int ResourceManagerPerformanceFuncTest002(); -int ResourceManagerPerformanceFuncTest003(); -int ResourceManagerPerformanceFuncTest004(); -int ResourceManagerPerformanceFuncTest005(); -int ResourceManagerPerformanceFuncTest006(); -int ResourceManagerPerformanceFuncTest007(); -int ResourceManagerPerformanceFuncTest008(); -int ResourceManagerPerformanceFuncTest009(); -int ResourceManagerPerformanceFuncTest010(); -int ResourceManagerPerformanceFuncTest011(); -int ResourceManagerPerformanceFuncTest012(); -int ResourceManagerPerformanceFuncTest013(); -int ResourceManagerPerformanceFuncTest014(); -int ResourceManagerPerformanceFuncTest015(); -int ResourceManagerPerformanceFuncTest016(); -int ResourceManagerPerformanceFuncTest017(); -int ResourceManagerPerformanceFuncTest018(); -int ResourceManagerPerformanceFuncTest019(); -int ResourceManagerPerformanceFuncTest020(); -int ResourceManagerPerformanceFuncTest021(); -int ResourceManagerPerformanceFuncTest022(); -int ResourceManagerPerformanceFuncTest023(); -int ResourceManagerPerformanceFuncTest024(); -int ResourceManagerPerformanceFuncTest025(); -int ResourceManagerPerformanceFuncTest026(); -int ResourceManagerPerformanceFuncTest027(); -int ResourceManagerPerformanceFuncTest028(); -int ResourceManagerPerformanceFuncTest029(); -int ResourceManagerPerformanceFuncTest030(); -int ResourceManagerPerformanceFuncTest031(); -int ResourceManagerPerformanceFuncTest032(); +int ResourceManagerPerformanceFuncTest001(void); +int ResourceManagerPerformanceFuncTest002(void); +int ResourceManagerPerformanceFuncTest003(void); +int ResourceManagerPerformanceFuncTest004(void); +int ResourceManagerPerformanceFuncTest005(void); +int ResourceManagerPerformanceFuncTest006(void); +int ResourceManagerPerformanceFuncTest007(void); +int ResourceManagerPerformanceFuncTest008(void); +int ResourceManagerPerformanceFuncTest009(void); +int ResourceManagerPerformanceFuncTest010(void); +int ResourceManagerPerformanceFuncTest011(void); +int ResourceManagerPerformanceFuncTest012(void); +int ResourceManagerPerformanceFuncTest013(void); +int ResourceManagerPerformanceFuncTest014(void); +int ResourceManagerPerformanceFuncTest015(void); +int ResourceManagerPerformanceFuncTest016(void); +int ResourceManagerPerformanceFuncTest017(void); +int ResourceManagerPerformanceFuncTest018(void); +int ResourceManagerPerformanceFuncTest019(void); +int ResourceManagerPerformanceFuncTest020(void); +int ResourceManagerPerformanceFuncTest021(void); +int ResourceManagerPerformanceFuncTest022(void); +int ResourceManagerPerformanceFuncTest023(void); +int ResourceManagerPerformanceFuncTest024(void); +int ResourceManagerPerformanceFuncTest025(void); +int ResourceManagerPerformanceFuncTest026(void); +int ResourceManagerPerformanceFuncTest027(void); +int ResourceManagerPerformanceFuncTest028(void); +int ResourceManagerPerformanceFuncTest029(void); +int ResourceManagerPerformanceFuncTest030(void); +int ResourceManagerPerformanceFuncTest031(void); +int ResourceManagerPerformanceFuncTest032(void); #endif diff --git a/frameworks/resmgr_lite/test/unittest/lite/common/resource_manager_test.cpp b/frameworks/resmgr_lite/test/unittest/lite/common/resource_manager_test.cpp index c43bd22..e68f9fb 100644 --- a/frameworks/resmgr_lite/test/unittest/lite/common/resource_manager_test.cpp +++ b/frameworks/resmgr_lite/test/unittest/lite/common/resource_manager_test.cpp @@ -29,7 +29,7 @@ using namespace OHOS::Global::Resource; using namespace testing::ext; - +namespace { static const int NON_EXIST_ID = 1111; static const char *g_nonExistName = "non_existent_name"; @@ -1701,3 +1701,4 @@ HWTEST_F(ResourceManagerTest, ResourceManagerSameNameTest001, TestSize.Level1) EXPECT_TRUE(state == SUCCESS); EXPECT_EQ(999, outValueI); } +} diff --git a/frameworks/resmgr_lite/test/unittest/lite/common/resource_manager_test.h b/frameworks/resmgr_lite/test/unittest/lite/common/resource_manager_test.h index c637d04..531d709 100644 --- a/frameworks/resmgr_lite/test/unittest/lite/common/resource_manager_test.h +++ b/frameworks/resmgr_lite/test/unittest/lite/common/resource_manager_test.h @@ -16,83 +16,83 @@ #ifndef RESOURCE_MANAGER_RESOURCE_MANANGER_TEST_H #define RESOURCE_MANAGER_RESOURCE_MANANGER_TEST_H -int ResourceManagerAddResourceTest001(); -int ResourceManagerAddResourceTest002(); -int ResourceManagerAddResourceTest003(); -int ResourceManagerUpdateResConfigTest001(); -int ResourceManagerUpdateResConfigTest002(); -int ResourceManagerUpdateResConfigTest003(); -int ResourceManagerUpdateResConfigTest004(); -int ResourceManagerUpdateResConfigTest005(); -int ResourceManagerGetResConfigTest001(); -int ResourceManagerGetResConfigTest002(); -int ResourceManagerGetStringByIdTest001(); -int ResourceManagerGetStringByIdTest002(); -int ResourceManagerGetStringByIdTest003(); -int ResourceManagerGetStringByNameTest001(); -int ResourceManagerGetStringByNameTest002(); -int ResourceManagerGetStringByNameTest003(); -int ResourceManagerGetStringFormatByIdTest001(); -int ResourceManagerGetStringFormatByIdTest002(); -int ResourceManagerGetStringFormatByNameTest001(); -int ResourceManagerGetStringFormatByNameTest002(); -int ResourceManagerGetStringArrayByIdTest001(); -int ResourceManagerGetStringArrayByIdTest002(); -int ResourceManagerGetStringArrayByNameTest001(); -int ResourceManagerGetStringArrayByNameTest002(); -int ResourceManagerGetPatternByIdTest001(); -int ResourceManagerGetPatternByIdTest002(); -int ResourceManagerGetPatternByIdTest003(); -int ResourceManagerGetPatternByIdTest004(); -int ResourceManagerGetPatternByNameTest001(); -int ResourceManagerGetPatternByNameTest002(); -int ResourceManagerGetPatternByNameTest003(); -int ResourceManagerGetPatternByNameTest004(); -int ResourceManagerGetPluralStringByIdTest001(); -int ResourceManagerGetPluralStringByIdTest002(); -int ResourceManagerGetPluralStringByIdTest003(); -int ResourceManagerGetPluralStringByIdTest004(); -int ResourceManagerGetPluralStringByIdTest005(); -int ResourceManagerGetPluralStringByNameTest001(); -int ResourceManagerGetPluralStringByNameTest002(); -int ResourceManagerGetPluralStringByIdFormatTest001(); -int ResourceManagerGetPluralStringByIdFormatTest002(); -int ResourceManagerGetPluralStringByNameFormatTest001(); -int ResourceManagerGetPluralStringByNameFormatTest002(); -int ResourceManagerGetThemeByIdTest001(); -int ResourceManagerGetThemeByIdTest002(); -int ResourceManagerGetThemeByNameTest001(); -int ResourceManagerGetThemeByNameTest002(); -int ResourceManagerGetBooleanByIdTest001(); -int ResourceManagerGetBooleanByIdTest002(); -int ResourceManagerGetBooleanByNameTest001(); -int ResourceManagerGetBooleanByNameTest002(); -int ResourceManagerGetIntegerByIdTest001(); -int ResourceManagerGetIntegerByIdTest002(); -int ResourceManagerGetIntegerByNameTest001(); -int ResourceManagerGetIntegerByNameTest002(); -int ResourceManagerGetFloatByIdTest001(); -int ResourceManagerGetFloatByIdTest002(); -int ResourceManagerGetFloatByNameTest001(); -int ResourceManagerGetFloatByNameTest002(); -int ResourceManagerGetIntArrayByIdTest001(); -int ResourceManagerGetIntArrayByIdTest002(); -int ResourceManagerGetIntArrayByNameTest001(); -int ResourceManagerGetIntArrayByNameTest002(); -int ResourceManagerGetColorByIdTest001(); -int ResourceManagerGetColorByIdTest002(); -int ResourceManagerGetColorByNameTest001(); -int ResourceManagerGetColorByNameTest002(); -int ResourceManagerGetProfileByIdTest001(); -int ResourceManagerGetProfileByIdTest002(); -int ResourceManagerGetProfileByNameTest001(); -int ResourceManagerGetProfileByNameTest002(); -int ResourceManagerGetMediaByIdTest001(); -int ResourceManagerGetMediaByIdTest002(); -int ResourceManagerGetMediaByNameTest001(); -int ResourceManagerGetMediaByNameTest002(); -int ResourceManagerResolveReferenceTest001(); -int ResourceManagerResolveParentReferenceTest001(); -int ResourceManagerSameNameTest001(); +int ResourceManagerAddResourceTest001(void); +int ResourceManagerAddResourceTest002(void); +int ResourceManagerAddResourceTest003(void); +int ResourceManagerUpdateResConfigTest001(void); +int ResourceManagerUpdateResConfigTest002(void); +int ResourceManagerUpdateResConfigTest003(void); +int ResourceManagerUpdateResConfigTest004(void); +int ResourceManagerUpdateResConfigTest005(void); +int ResourceManagerGetResConfigTest001(void); +int ResourceManagerGetResConfigTest002(void); +int ResourceManagerGetStringByIdTest001(void); +int ResourceManagerGetStringByIdTest002(void); +int ResourceManagerGetStringByIdTest003(void); +int ResourceManagerGetStringByNameTest001(void); +int ResourceManagerGetStringByNameTest002(void); +int ResourceManagerGetStringByNameTest003(void); +int ResourceManagerGetStringFormatByIdTest001(void); +int ResourceManagerGetStringFormatByIdTest002(void); +int ResourceManagerGetStringFormatByNameTest001(void); +int ResourceManagerGetStringFormatByNameTest002(void); +int ResourceManagerGetStringArrayByIdTest001(void); +int ResourceManagerGetStringArrayByIdTest002(void); +int ResourceManagerGetStringArrayByNameTest001(void); +int ResourceManagerGetStringArrayByNameTest002(void); +int ResourceManagerGetPatternByIdTest001(void); +int ResourceManagerGetPatternByIdTest002(void); +int ResourceManagerGetPatternByIdTest003(void); +int ResourceManagerGetPatternByIdTest004(void); +int ResourceManagerGetPatternByNameTest001(void); +int ResourceManagerGetPatternByNameTest002(void); +int ResourceManagerGetPatternByNameTest003(void); +int ResourceManagerGetPatternByNameTest004(void); +int ResourceManagerGetPluralStringByIdTest001(void); +int ResourceManagerGetPluralStringByIdTest002(void); +int ResourceManagerGetPluralStringByIdTest003(void); +int ResourceManagerGetPluralStringByIdTest004(void); +int ResourceManagerGetPluralStringByIdTest005(void); +int ResourceManagerGetPluralStringByNameTest001(void); +int ResourceManagerGetPluralStringByNameTest002(void); +int ResourceManagerGetPluralStringByIdFormatTest001(void); +int ResourceManagerGetPluralStringByIdFormatTest002(void); +int ResourceManagerGetPluralStringByNameFormatTest001(void); +int ResourceManagerGetPluralStringByNameFormatTest002(void); +int ResourceManagerGetThemeByIdTest001(void); +int ResourceManagerGetThemeByIdTest002(void); +int ResourceManagerGetThemeByNameTest001(void); +int ResourceManagerGetThemeByNameTest002(void); +int ResourceManagerGetBooleanByIdTest001(void); +int ResourceManagerGetBooleanByIdTest002(void); +int ResourceManagerGetBooleanByNameTest001(void); +int ResourceManagerGetBooleanByNameTest002(void); +int ResourceManagerGetIntegerByIdTest001(void); +int ResourceManagerGetIntegerByIdTest002(void); +int ResourceManagerGetIntegerByNameTest001(void); +int ResourceManagerGetIntegerByNameTest002(void); +int ResourceManagerGetFloatByIdTest001(void); +int ResourceManagerGetFloatByIdTest002(void); +int ResourceManagerGetFloatByNameTest001(void); +int ResourceManagerGetFloatByNameTest002(void); +int ResourceManagerGetIntArrayByIdTest001(void); +int ResourceManagerGetIntArrayByIdTest002(void); +int ResourceManagerGetIntArrayByNameTest001(void); +int ResourceManagerGetIntArrayByNameTest002(void); +int ResourceManagerGetColorByIdTest001(void); +int ResourceManagerGetColorByIdTest002(void); +int ResourceManagerGetColorByNameTest001(void); +int ResourceManagerGetColorByNameTest002(void); +int ResourceManagerGetProfileByIdTest001(void); +int ResourceManagerGetProfileByIdTest002(void); +int ResourceManagerGetProfileByNameTest001(void); +int ResourceManagerGetProfileByNameTest002(void); +int ResourceManagerGetMediaByIdTest001(void); +int ResourceManagerGetMediaByIdTest002(void); +int ResourceManagerGetMediaByNameTest001(void); +int ResourceManagerGetMediaByNameTest002(void); +int ResourceManagerResolveReferenceTest001(void); +int ResourceManagerResolveParentReferenceTest001(void); +int ResourceManagerSameNameTest001(void); #endif diff --git a/frameworks/resmgr_lite/test/unittest/lite/common/string_utils_test.cpp b/frameworks/resmgr_lite/test/unittest/lite/common/string_utils_test.cpp index 08cfbca..bdd0914 100644 --- a/frameworks/resmgr_lite/test/unittest/lite/common/string_utils_test.cpp +++ b/frameworks/resmgr_lite/test/unittest/lite/common/string_utils_test.cpp @@ -24,7 +24,7 @@ using namespace OHOS::Global::Resource; using namespace testing::ext; using namespace OHOS::I18N; - +namespace { class StringUtilsTest : public testing::Test { public: static void SetUpTestCase(void); @@ -103,4 +103,5 @@ HWTEST_F(StringUtilsTest, LockFuncTest001, TestSize.Level1) Lock lock = Lock(); TestThread(&num, threadNum, &lock); EXPECT_EQ(result, num); +} } \ No newline at end of file diff --git a/frameworks/resmgr_lite/test/unittest/lite/common/string_utils_test.h b/frameworks/resmgr_lite/test/unittest/lite/common/string_utils_test.h index f2ee919..c4fb50c 100644 --- a/frameworks/resmgr_lite/test/unittest/lite/common/string_utils_test.h +++ b/frameworks/resmgr_lite/test/unittest/lite/common/string_utils_test.h @@ -16,7 +16,7 @@ #ifndef RESOURCE_MANAGER_STRING_UTILS_TEST_H #define RESOURCE_MANAGER_STRING_UTILS_TEST_H -int StringUtilsFuncTest001(); -int LockFuncTest001(); +int StringUtilsFuncTest001(void); +int LockFuncTest001(void); #endif -- Gitee