diff --git a/frameworks/resmgr_lite/include/global_utils.h b/frameworks/resmgr_lite/include/global_utils.h index 6bd8c486161f855f8bcd2bf1fea6724248ffb0e7..a2cedd46d7811f4125abd8da09e697add8ffa003 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 007b8990d5bbabf5ce1095dfd9ba21b30aa9fc48..0f5d6c9492929c173bae415c13f92439a98c9b09 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 18cdb6f3daf9505d4de915cd264589b1a09e6bc3..15ac4aa193164813e41ad091bfb9838c2798798a 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 560fc84bffaf7aa7202763b6c685d37eac2d9c29..940cd9d17a3c7253038f01788889cad5cafba253 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 6070a8871f2159a72e010afe3488df26cd71b282..f402e8cd874d77d5ea8458f62be9d0df4732c91d 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 88024ae7f36aed32731e03f25b98310624d8138a..555f50e9d3b1e2c0946e217f0430528ce7fb9c59 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 293db1275b38025b79e8e7570abf5b4527171d41..2a9d3055818ec8dbaf32789349e4249d25ef8226 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 00e964b1ee474d887f32ea6223bb8628ffb71647..c578f46d5fce4be700bde5fac1d9c80287e2c6ee 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 beccf53b0095855b9c1b83ad3c0d1f60d27c68aa..4bf724a272607661e5a3f04b89f3954cb4d6936c 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 67186bb20d1249fcbf8c2eb1d36e68489f99c75e..993bf0ee3010f1bedb5e591118651d4e4d7ffae0 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 93b053760fb97a05080967ad338f81f3c9e1dad9..c4082c2e68ed97d55fb123d021de06d81a4d0430 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 1742629fbb4569f753cfed8e312677849abf9278..ad3dbe8c1a15c8b6ab4fb007d67852d9bce50a4a 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 7c5ef8d407c0902def1871732eb6ee376548ac65..a86ab36ddca86faed7ee30022723f52cf1f074cb 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 872646f88c6e525baef00cec8bf2b5afee6f066b..2b6278d3a40fceeff5058b1541593ea8fec02ba3 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 7ea1b99256d8ee8a9bd6a00c5a13921e1cc73179..67a69226c273d07897f4d7eb5281fffd1d1dfd0a 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 eb0af69dd1fc56aed889b8a938c460d0bfefcd76..6216b04ff483158dd288362c9c6e50f85e49992a 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 6512ab3cb0f20178afe6aed75e4afa820c104cba..9b46153699f1f73891f3517818993709b9165c15 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 18c2be09f527ebb37c992b045956ee9a11f19005..5a6dc4f5f084a099be9dbeafb5ec7bd3b236c900 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 3a102ee5ea467446ee8a4a69f8aa857eed8f8379..2c406ef992b4b7baacaaabd83b25450a391960c2 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 2682b32ec6ef016bf557d0450102742f8b9e925c..97f21f8f41bbabedf37ae003049c9b54a1c93bc6 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 2b689eda164b35be5bfa6e7118fa939342980e22..d21ba147cf21e3063f96477f75a42225f87343eb 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 fb44ca71d1aa70de6d1e9261d1c603195719315d..6b58a446529d6468068403a645cba4b3a36e0195 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 416f3486ebafe64a9147e58fa5db62249525da51..6a3fee3cd1e440bd3312dd38376c12d0bac8f90a 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 4eaf7907bbf799133041485d8367655edd1b3ced..d56394ccaf33fe2ab37792331c1d9ba221fc3eb8 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 7269ed78ad136a794094e58cdfc7b3ab32e94d8e..dd33795bf308eedfc5a046ed7428a3fa94e87e00 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 c43bd22b3ce36f0311b127104abb544bab510077..e68f9fbaafc9ba93b21c614ed6463aca4cac771d 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 c637d048f6a07ae2b11bf5980c2e4aedbdec0c5c..531d7090780910b40ff8da43f6a3747a8e7b41e2 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 08cfbcaa4f30a176c4e449ff44234b913691e14c..bdd091413e36694a5ee60ace3b36f0f2824dba97 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 f2ee91958775912bbeb9df52432ff1b95c5f609b..c4fb50c5d2d0cbc63852bf96667c4054ed71bc90 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