提交 6154d926 编写于 作者: L lanxueyuan

change param api

Change-Id: I9853929b0954f0a52dc13f292ed34e844c02ebf4
上级 cb3e98cc
...@@ -60,10 +60,9 @@ static BOOL ParameterFuncTestSuiteTearDown(void) ...@@ -60,10 +60,9 @@ static BOOL ParameterFuncTestSuiteTearDown(void)
*/ */
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara001, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara001, Function | MediumTest | Level1)
{ {
char* value = GetProductType(); const char* value = GetDeviceType();
printf("Product Type=%s\n", value); printf("Product Type=%s\n", value);
IsEmpty(value); IsEmpty(value);
free(value);
}; };
/** /**
...@@ -73,10 +72,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara001, Function | MediumTe ...@@ -73,10 +72,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara001, Function | MediumTe
*/ */
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara002, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara002, Function | MediumTest | Level1)
{ {
char* value = GetManufacture(); const char* value = GetManufacture();
printf("Manufacture=%s\n", value); printf("Manufacture=%s\n", value);
IsEmpty(value); IsEmpty(value);
free(value);
}; };
/** /**
...@@ -86,10 +84,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara002, Function | MediumTe ...@@ -86,10 +84,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara002, Function | MediumTe
*/ */
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara003, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara003, Function | MediumTest | Level1)
{ {
char* value = GetBrand(); const char* value = GetBrand();
printf("Brand=%s\n", value); printf("Brand=%s\n", value);
IsEmpty(value); IsEmpty(value);
free(value);
}; };
/** /**
...@@ -99,10 +96,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara003, Function | MediumTe ...@@ -99,10 +96,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara003, Function | MediumTe
*/ */
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara004, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara004, Function | MediumTest | Level1)
{ {
char* value = GetMarketName(); const char* value = GetMarketName();
printf("Market Name=%s\n", value); printf("Market Name=%s\n", value);
IsEmpty(value); IsEmpty(value);
free(value);
}; };
/** /**
...@@ -112,10 +108,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara004, Function | MediumTe ...@@ -112,10 +108,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara004, Function | MediumTe
*/ */
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara005, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara005, Function | MediumTest | Level1)
{ {
char* value = GetProductSeries(); const char* value = GetProductSeries();
printf("Product Series=%s\n", value); printf("Product Series=%s\n", value);
IsEmpty(value); IsEmpty(value);
free(value);
}; };
/** /**
...@@ -125,10 +120,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara005, Function | MediumTe ...@@ -125,10 +120,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara005, Function | MediumTe
*/ */
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara006, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara006, Function | MediumTest | Level1)
{ {
char* value = GetProductModel(); const char* value = GetProductModel();
printf("Product Model=%s\n", value); printf("Product Model=%s\n", value);
IsEmpty(value); IsEmpty(value);
free(value);
}; };
/** /**
...@@ -138,10 +132,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara006, Function | MediumTe ...@@ -138,10 +132,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara006, Function | MediumTe
*/ */
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara007, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara007, Function | MediumTest | Level1)
{ {
char* value = GetHardwareModel(); const char* value = GetHardwareModel();
printf("Hardware Model=%s\n", value); printf("Hardware Model=%s\n", value);
IsEmpty(value); IsEmpty(value);
free(value);
}; };
/** /**
...@@ -151,10 +144,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara007, Function | MediumTe ...@@ -151,10 +144,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara007, Function | MediumTe
*/ */
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara008, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara008, Function | MediumTest | Level1)
{ {
char* value = GetHardwareProfile(); const char* value = GetHardwareProfile();
printf("Hardware Profile=%s\n", value); printf("Hardware Profile=%s\n", value);
IsEmpty(value); IsEmpty(value);
free(value);
}; };
/** /**
...@@ -164,7 +156,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara008, Function | MediumTe ...@@ -164,7 +156,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara008, Function | MediumTe
*/ */
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara009, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara009, Function | MediumTest | Level1)
{ {
char* value = GetSerial(); const char* value = GetSerial();
printf("Serial=%s\n", value); printf("Serial=%s\n", value);
if (value == NULL) { if (value == NULL) {
printf("The serial number needs to be written\n"); printf("The serial number needs to be written\n");
...@@ -172,7 +164,6 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara009, Function | MediumTe ...@@ -172,7 +164,6 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara009, Function | MediumTe
} else { } else {
TEST_ASSERT_EQUAL_INT(1, 1); TEST_ASSERT_EQUAL_INT(1, 1);
} }
free(value);
}; };
/** /**
...@@ -182,10 +173,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara009, Function | MediumTe ...@@ -182,10 +173,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara009, Function | MediumTe
*/ */
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara010, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara010, Function | MediumTest | Level1)
{ {
char* value = GetOsName(); const char* value = GetOSFullName();
printf("Os Name=%s\n", value); printf("Os Name=%s\n", value);
IsEmpty(value); IsEmpty(value);
free(value);
}; };
/** /**
...@@ -195,10 +185,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara010, Function | MediumTe ...@@ -195,10 +185,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara010, Function | MediumTe
*/ */
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara011, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara011, Function | MediumTest | Level1)
{ {
char* value = GetDisplayVersion(); const char* value = GetDisplayVersion();
printf("Display Version=%s\n", value); printf("Display Version=%s\n", value);
IsEmpty(value); IsEmpty(value);
free(value);
}; };
/** /**
...@@ -208,10 +197,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara011, Function | MediumTe ...@@ -208,10 +197,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara011, Function | MediumTe
*/ */
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara012, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara012, Function | MediumTest | Level1)
{ {
char* value = GetBootloaderVersion(); const char* value = GetBootloaderVersion();
printf("Bootloader Version=%s\n", value); printf("Bootloader Version=%s\n", value);
IsEmpty(value); IsEmpty(value);
free(value);
}; };
/** /**
...@@ -221,10 +209,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara012, Function | MediumTe ...@@ -221,10 +209,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara012, Function | MediumTe
*/ */
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara013, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara013, Function | MediumTest | Level1)
{ {
char* value = GetSecurityPatchTag(); const char* value = GetSecurityPatchTag();
printf("Secure Patch Level=%s\n", value); printf("Secure Patch Level=%s\n", value);
IsEmpty(value); IsEmpty(value);
free(value);
}; };
/** /**
...@@ -234,10 +221,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara013, Function | MediumTe ...@@ -234,10 +221,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara013, Function | MediumTe
*/ */
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara014, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara014, Function | MediumTest | Level1)
{ {
char* value = GetAbiList(); const char* value = GetAbiList();
printf("Abi List=%s\n", value); printf("Abi List=%s\n", value);
IsEmpty(value); IsEmpty(value);
free(value);
}; };
/** /**
...@@ -247,10 +233,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara014, Function | MediumTe ...@@ -247,10 +233,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara014, Function | MediumTe
*/ */
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara015, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara015, Function | MediumTest | Level1)
{ {
char* value = GetFirstApiLevel(); int value = GetFirstApiVersion();
printf("First Api Level=%s\n", value); printf("First Api Level=%d\n", value);
IsEmpty(value); IsEmpty(value);
free(value);
}; };
/** /**
...@@ -260,10 +245,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara015, Function | MediumTe ...@@ -260,10 +245,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara015, Function | MediumTe
*/ */
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara016, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara016, Function | MediumTest | Level1)
{ {
char* value = GetIncrementalVersion(); const char* value = GetIncrementalVersion();
printf("Incremental Version=%s\n", value); printf("Incremental Version=%s\n", value);
IsEmpty(value); IsEmpty(value);
free(value);
}; };
/** /**
...@@ -273,10 +257,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara016, Function | MediumTe ...@@ -273,10 +257,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara016, Function | MediumTe
*/ */
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara017, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara017, Function | MediumTest | Level1)
{ {
char* value = GetVersionId(); const char* value = GetVersionId();
printf("Version Id=%s\n", value); printf("Version Id=%s\n", value);
IsEmpty(value); IsEmpty(value);
free(value);
}; };
/** /**
...@@ -286,10 +269,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara017, Function | MediumTe ...@@ -286,10 +269,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara017, Function | MediumTe
*/ */
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara018, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara018, Function | MediumTest | Level1)
{ {
char* value = GetBuildType(); const char* value = GetBuildType();
printf("Build Type=%s\n", value); printf("Build Type=%s\n", value);
IsEmpty(value); IsEmpty(value);
free(value);
}; };
/** /**
...@@ -299,10 +281,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara018, Function | MediumTe ...@@ -299,10 +281,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara018, Function | MediumTe
*/ */
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara019, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara019, Function | MediumTest | Level1)
{ {
char* value = GetBuildUser(); const char* value = GetBuildUser();
printf("Build User=%s\n", value); printf("Build User=%s\n", value);
IsEmpty(value); IsEmpty(value);
free(value);
}; };
/** /**
...@@ -312,10 +293,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara019, Function | MediumTe ...@@ -312,10 +293,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara019, Function | MediumTe
*/ */
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara020, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara020, Function | MediumTest | Level1)
{ {
char* value = GetBuildHost(); const char* value = GetBuildHost();
printf("Build Host=%s\n", value); printf("Build Host=%s\n", value);
IsEmpty(value); IsEmpty(value);
free(value);
}; };
/** /**
...@@ -325,10 +305,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara020, Function | MediumTe ...@@ -325,10 +305,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara020, Function | MediumTe
*/ */
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara021, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara021, Function | MediumTest | Level1)
{ {
char* value = GetBuildTime(); const char* value = GetBuildTime();
printf("Build Time=%s\n", value); printf("Build Time=%s\n", value);
IsEmpty(value); IsEmpty(value);
free(value);
}; };
/** /**
...@@ -338,10 +317,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara021, Function | MediumTe ...@@ -338,10 +317,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara021, Function | MediumTe
*/ */
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara022, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara022, Function | MediumTest | Level1)
{ {
char* value = GetBuildRootHash(); const char* value = GetBuildRootHash();
printf("Build Root Hash=%s\n", value); printf("Build Root Hash=%s\n", value);
IsEmpty(value); IsEmpty(value);
free(value);
}; };
/** /**
...@@ -351,10 +329,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara022, Function | MediumTe ...@@ -351,10 +329,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara022, Function | MediumTe
*/ */
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara023, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara023, Function | MediumTest | Level1)
{ {
char* value = GetSoftwareModel(); const char* value = GetSoftwareModel();
printf("Software Model=%s\n", value); printf("Software Model=%s\n", value);
IsEmpty(value); IsEmpty(value);
free(value);
}; };
/** /**
...@@ -364,10 +341,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara023, Function | MediumTe ...@@ -364,10 +341,9 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara023, Function | MediumTe
*/ */
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara024, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara024, Function | MediumTest | Level1)
{ {
char* value = GetSdkApiLevel(); int value = GetSdkApiVersion();
printf("Sdk Api Level=%s\n", value); printf("Sdk Api Level=%d\n", value);
IsEmpty(value); IsEmpty(value);
free(value);
}; };
/** /**
......
...@@ -55,17 +55,14 @@ static BOOL ParameterReliTestSuiteTearDown(void) ...@@ -55,17 +55,14 @@ static BOOL ParameterReliTestSuiteTearDown(void)
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli001, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli001, Function | MediumTest | Level1)
{ {
char* value1 = GetProductType(); const char* value1 = GetDeviceType();
IsEmpty(value1); IsEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++)
{ {
char* value = GetProductType(); const char* value = GetDeviceType();
free(value);
} }
char* value2 = GetProductType(); const char* value2 = GetDeviceType();
TEST_ASSERT_EQUAL_STRING(value1, value2); TEST_ASSERT_EQUAL_STRING(value1, value2);
free(value1);
free(value2);
}; };
/** /**
...@@ -75,17 +72,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli001, Function | Medi ...@@ -75,17 +72,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli001, Function | Medi
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli002, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli002, Function | MediumTest | Level1)
{ {
char* value1 = GetManufacture(); const char* value1 = GetManufacture();
IsEmpty(value1); IsEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++)
{ {
char* value = GetManufacture(); const char* value = GetManufacture();
free(value);
} }
char* value2 = GetManufacture(); const char* value2 = GetManufacture();
TEST_ASSERT_EQUAL_STRING(value1, value2); TEST_ASSERT_EQUAL_STRING(value1, value2);
free(value1);
free(value2);
}; };
/** /**
...@@ -95,17 +89,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli002, Function | Medi ...@@ -95,17 +89,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli002, Function | Medi
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli003, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli003, Function | MediumTest | Level1)
{ {
char* value1 = GetBrand(); const char* value1 = GetBrand();
IsEmpty(value1); IsEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++)
{ {
char* value = GetBrand(); const char* value = GetBrand();
free(value);
} }
char* value2 = GetBrand(); const char* value2 = GetBrand();
TEST_ASSERT_EQUAL_STRING(value1, value2); TEST_ASSERT_EQUAL_STRING(value1, value2);
free(value1);
free(value2);
}; };
/** /**
...@@ -115,17 +106,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli003, Function | Medi ...@@ -115,17 +106,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli003, Function | Medi
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli004, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli004, Function | MediumTest | Level1)
{ {
char* value1 = GetMarketName(); const char* value1 = GetMarketName();
IsEmpty(value1); IsEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++)
{ {
char* value = GetMarketName(); const char* value = GetMarketName();
free(value);
} }
char* value2 = GetMarketName(); const char* value2 = GetMarketName();
TEST_ASSERT_EQUAL_STRING(value1, value2); TEST_ASSERT_EQUAL_STRING(value1, value2);
free(value1);
free(value2);
}; };
/** /**
...@@ -135,17 +123,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli004, Function | Medi ...@@ -135,17 +123,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli004, Function | Medi
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli005, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli005, Function | MediumTest | Level1)
{ {
char* value1 = GetProductSeries(); const char* value1 = GetProductSeries();
IsEmpty(value1); IsEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++)
{ {
char* value = GetProductSeries(); const char* value = GetProductSeries();
free(value);
} }
char* value2 = GetProductSeries(); const char* value2 = GetProductSeries();
TEST_ASSERT_EQUAL_STRING(value1, value2); TEST_ASSERT_EQUAL_STRING(value1, value2);
free(value1);
free(value2);
}; };
/** /**
...@@ -155,17 +140,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli005, Function | Medi ...@@ -155,17 +140,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli005, Function | Medi
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli006, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli006, Function | MediumTest | Level1)
{ {
char* value1 = GetProductModel(); const char* value1 = GetProductModel();
IsEmpty(value1); IsEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++)
{ {
char* value = GetProductModel(); const char* value = GetProductModel();
free(value);
} }
char* value2 = GetProductModel(); const char* value2 = GetProductModel();
TEST_ASSERT_EQUAL_STRING(value1, value2); TEST_ASSERT_EQUAL_STRING(value1, value2);
free(value1);
free(value2);
}; };
/** /**
...@@ -175,17 +157,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli006, Function | Medi ...@@ -175,17 +157,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli006, Function | Medi
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli007, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli007, Function | MediumTest | Level1)
{ {
char* value1 = GetHardwareModel(); const char* value1 = GetHardwareModel();
IsEmpty(value1); IsEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++)
{ {
char* value = GetHardwareModel(); const char* value = GetHardwareModel();
free(value);
} }
char* value2 = GetHardwareModel(); const char* value2 = GetHardwareModel();
TEST_ASSERT_EQUAL_STRING(value1, value2); TEST_ASSERT_EQUAL_STRING(value1, value2);
free(value1);
free(value2);
}; };
/** /**
...@@ -195,17 +174,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli007, Function | Medi ...@@ -195,17 +174,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli007, Function | Medi
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli008, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli008, Function | MediumTest | Level1)
{ {
char* value1 = GetHardwareProfile(); const char* value1 = GetHardwareProfile();
IsEmpty(value1); IsEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++)
{ {
char* value = GetHardwareProfile(); const char* value = GetHardwareProfile();
free(value);
} }
char* value2 = GetHardwareProfile(); const char* value2 = GetHardwareProfile();
TEST_ASSERT_EQUAL_STRING(value1, value2); TEST_ASSERT_EQUAL_STRING(value1, value2);
free(value1);
free(value2);
}; };
/** /**
...@@ -215,20 +191,17 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli008, Function | Medi ...@@ -215,20 +191,17 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli008, Function | Medi
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli009, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli009, Function | MediumTest | Level1)
{ {
char* value1 = GetSerial(); const char* value1 = GetSerial();
if (value1 == NULL) { if (value1 == NULL) {
printf("The serial number needs to be written\n"); printf("The serial number needs to be written\n");
TEST_IGNORE(); TEST_IGNORE();
} }
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++)
{ {
char* value = GetSerial(); const char* value = GetSerial();
free(value);
} }
char* value2 = GetSerial(); const char* value2 = GetSerial();
TEST_ASSERT_EQUAL_STRING(value1, value2); TEST_ASSERT_EQUAL_STRING(value1, value2);
free(value1);
free(value2);
}; };
/** /**
...@@ -238,17 +211,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli009, Function | Medi ...@@ -238,17 +211,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli009, Function | Medi
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli010, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli010, Function | MediumTest | Level1)
{ {
char* value1 = GetOsName(); const char* value1 = GetOSFullName();
IsEmpty(value1); IsEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++)
{ {
char* value = GetOsName(); const char* value = GetOSFullName();
free(value);
} }
char* value2 = GetOsName(); const char* value2 = GetOSFullName();
TEST_ASSERT_EQUAL_STRING(value1, value2); TEST_ASSERT_EQUAL_STRING(value1, value2);
free(value1);
free(value2);
}; };
/** /**
...@@ -258,17 +228,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli010, Function | Medi ...@@ -258,17 +228,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli010, Function | Medi
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli011, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli011, Function | MediumTest | Level1)
{ {
char* value1 = GetDisplayVersion(); const char* value1 = GetDisplayVersion();
IsEmpty(value1); IsEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++)
{ {
char* value = GetDisplayVersion(); const char* value = GetDisplayVersion();
free(value);
} }
char* value2 = GetDisplayVersion(); const char* value2 = GetDisplayVersion();
TEST_ASSERT_EQUAL_STRING(value1, value2); TEST_ASSERT_EQUAL_STRING(value1, value2);
free(value1);
free(value2);
}; };
/** /**
...@@ -278,17 +245,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli011, Function | Medi ...@@ -278,17 +245,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli011, Function | Medi
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli012, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli012, Function | MediumTest | Level1)
{ {
char* value1 = GetBootloaderVersion(); const char* value1 = GetBootloaderVersion();
IsEmpty(value1); IsEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++)
{ {
char* value = GetBootloaderVersion(); const char* value = GetBootloaderVersion();
free(value);
} }
char* value2 = GetBootloaderVersion(); const char* value2 = GetBootloaderVersion();
TEST_ASSERT_EQUAL_STRING(value1, value2); TEST_ASSERT_EQUAL_STRING(value1, value2);
free(value1);
free(value2);
}; };
/** /**
...@@ -298,17 +262,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli012, Function | Medi ...@@ -298,17 +262,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli012, Function | Medi
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli013, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli013, Function | MediumTest | Level1)
{ {
char* value1 = GetSecurityPatchTag(); const char* value1 = GetSecurityPatchTag();
IsEmpty(value1); IsEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++)
{ {
char* value = GetSecurityPatchTag(); const char* value = GetSecurityPatchTag();
free(value);
} }
char* value2 = GetSecurityPatchTag(); const char* value2 = GetSecurityPatchTag();
TEST_ASSERT_EQUAL_STRING(value1, value2); TEST_ASSERT_EQUAL_STRING(value1, value2);
free(value1);
free(value2);
}; };
/** /**
...@@ -318,17 +279,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli013, Function | Medi ...@@ -318,17 +279,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli013, Function | Medi
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli014, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli014, Function | MediumTest | Level1)
{ {
char* value1 = GetAbiList(); const char* value1 = GetAbiList();
IsEmpty(value1); IsEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++)
{ {
char* value = GetAbiList(); const char* value = GetAbiList();
free(value);
} }
char* value2 = GetAbiList(); const char* value2 = GetAbiList();
TEST_ASSERT_EQUAL_STRING(value1, value2); TEST_ASSERT_EQUAL_STRING(value1, value2);
free(value1);
free(value2);
}; };
/** /**
...@@ -338,17 +296,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli014, Function | Medi ...@@ -338,17 +296,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli014, Function | Medi
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli015, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli015, Function | MediumTest | Level1)
{ {
char* value1 = GetFirstApiLevel(); int value1 = GetFirstApiVersion();
IsEmpty(value1); IsEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++)
{ {
char* value = GetFirstApiLevel(); int value = GetFirstApiVersion();
free(value);
} }
char* value2 = GetFirstApiLevel(); int value2 = GetFirstApiVersion();
TEST_ASSERT_EQUAL_STRING(value1, value2); TEST_ASSERT_EQUAL_INT(value1, value2);
free(value1);
free(value2);
}; };
/** /**
...@@ -358,17 +313,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli015, Function | Medi ...@@ -358,17 +313,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli015, Function | Medi
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli016, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli016, Function | MediumTest | Level1)
{ {
char* value1 = GetIncrementalVersion(); const char* value1 = GetIncrementalVersion();
IsEmpty(value1); IsEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++)
{ {
char* value = GetIncrementalVersion(); const char* value = GetIncrementalVersion();
free(value);
} }
char* value2 = GetIncrementalVersion(); const char* value2 = GetIncrementalVersion();
TEST_ASSERT_EQUAL_STRING(value1, value2); TEST_ASSERT_EQUAL_STRING(value1, value2);
free(value1);
free(value2);
}; };
/** /**
...@@ -378,17 +330,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli016, Function | Medi ...@@ -378,17 +330,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli016, Function | Medi
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli017, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli017, Function | MediumTest | Level1)
{ {
char* value1 = GetVersionId(); const char* value1 = GetVersionId();
IsEmpty(value1); IsEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++)
{ {
char* value = GetVersionId(); const char* value = GetVersionId();
free(value);
} }
char* value2 = GetVersionId(); const char* value2 = GetVersionId();
TEST_ASSERT_EQUAL_STRING(value1, value2); TEST_ASSERT_EQUAL_STRING(value1, value2);
free(value1);
free(value2);
}; };
/** /**
...@@ -398,17 +347,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli017, Function | Medi ...@@ -398,17 +347,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli017, Function | Medi
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli018, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli018, Function | MediumTest | Level1)
{ {
char* value1 = GetBuildType(); const char* value1 = GetBuildType();
IsEmpty(value1); IsEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++)
{ {
char* value = GetBuildType(); const char* value = GetBuildType();
free(value);
} }
char* value2 = GetBuildType(); const char* value2 = GetBuildType();
TEST_ASSERT_EQUAL_STRING(value1, value2); TEST_ASSERT_EQUAL_STRING(value1, value2);
free(value1);
free(value2);
}; };
/** /**
...@@ -418,17 +364,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli018, Function | Medi ...@@ -418,17 +364,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli018, Function | Medi
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli019, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli019, Function | MediumTest | Level1)
{ {
char* value1 = GetBuildUser(); const char* value1 = GetBuildUser();
IsEmpty(value1); IsEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++)
{ {
char* value = GetBuildUser(); const char* value = GetBuildUser();
free(value);
} }
char* value2 = GetBuildUser(); const char* value2 = GetBuildUser();
TEST_ASSERT_EQUAL_STRING(value1, value2); TEST_ASSERT_EQUAL_STRING(value1, value2);
free(value1);
free(value2);
}; };
/** /**
...@@ -438,17 +381,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli019, Function | Medi ...@@ -438,17 +381,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli019, Function | Medi
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli020, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli020, Function | MediumTest | Level1)
{ {
char* value1 = GetBuildHost(); const char* value1 = GetBuildHost();
IsEmpty(value1); IsEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++)
{ {
char* value = GetBuildHost(); const char* value = GetBuildHost();
free(value);
} }
char* value2 = GetBuildHost(); const char* value2 = GetBuildHost();
TEST_ASSERT_EQUAL_STRING(value1, value2); TEST_ASSERT_EQUAL_STRING(value1, value2);
free(value1);
free(value2);
}; };
/** /**
...@@ -458,17 +398,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli020, Function | Medi ...@@ -458,17 +398,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli020, Function | Medi
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli021, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli021, Function | MediumTest | Level1)
{ {
char* value1 = GetBuildTime(); const char* value1 = GetBuildTime();
IsEmpty(value1); IsEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++)
{ {
char* value = GetBuildTime(); const char* value = GetBuildTime();
free(value);
} }
char* value2 = GetBuildTime(); const char* value2 = GetBuildTime();
TEST_ASSERT_EQUAL_STRING(value1, value2); TEST_ASSERT_EQUAL_STRING(value1, value2);
free(value1);
free(value2);
}; };
/** /**
...@@ -478,17 +415,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli021, Function | Medi ...@@ -478,17 +415,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli021, Function | Medi
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli022, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli022, Function | MediumTest | Level1)
{ {
char* value1 = GetBuildRootHash(); const char* value1 = GetBuildRootHash();
IsEmpty(value1); IsEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++)
{ {
char* value = GetBuildRootHash(); const char* value = GetBuildRootHash();
free(value);
} }
char* value2 = GetBuildRootHash(); const char* value2 = GetBuildRootHash();
TEST_ASSERT_EQUAL_STRING(value1, value2); TEST_ASSERT_EQUAL_STRING(value1, value2);
free(value1);
free(value2);
}; };
/** /**
...@@ -498,17 +432,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli022, Function | Medi ...@@ -498,17 +432,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli022, Function | Medi
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli023, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli023, Function | MediumTest | Level1)
{ {
char* value1 = GetSoftwareModel(); const char* value1 = GetSoftwareModel();
IsEmpty(value1); IsEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++)
{ {
char* value = GetSoftwareModel(); const char* value = GetSoftwareModel();
free(value);
} }
char* value2 = GetSoftwareModel(); const char* value2 = GetSoftwareModel();
TEST_ASSERT_EQUAL_STRING(value1, value2); TEST_ASSERT_EQUAL_STRING(value1, value2);
free(value1);
free(value2);
}; };
/** /**
...@@ -518,17 +449,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli023, Function | Medi ...@@ -518,17 +449,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli023, Function | Medi
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli024, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli024, Function | MediumTest | Level1)
{ {
char* value1 = GetSdkApiLevel(); int value1 = GetSdkApiVersion();
IsEmpty(value1); IsEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++)
{ {
char* value = GetSdkApiLevel(); int value = GetSdkApiVersion();
free(value);
} }
char* value2 = GetSdkApiLevel(); int value2 = GetSdkApiVersion();
TEST_ASSERT_EQUAL_STRING(value1, value2); TEST_ASSERT_EQUAL_INT(value1, value2);
free(value1);
free(value2);
}; };
RUN_TEST_SUITE(ParameterReliTestSuite); RUN_TEST_SUITE(ParameterReliTestSuite);
...@@ -36,13 +36,13 @@ protected: ...@@ -36,13 +36,13 @@ protected:
virtual void SetUp() {} virtual void SetUp() {}
virtual void TearDown() {} virtual void TearDown() {}
string defSysParam = "data of sys param ***..."; string defSysParam = "data of sys param ***...";
using GetRdonlyPara = char* (*)(); using GetRdonlyPara = const char* (*)();
using GetDefParaNode = struct TagGetDefParaNode { using GetDefParaNode = struct TagGetDefParaNode {
char const *funName; char const *funName;
GetRdonlyPara fun; GetRdonlyPara fun;
}; };
GetDefParaNode getDefPara[StartUpLite::GET_DEF_PARA_FUN_MAX] = { GetDefParaNode getDefPara[StartUpLite::GET_DEF_PARA_FUN_MAX] = {
{"GetProductType", GetProductType}, {"GetDeviceType", GetDeviceType},
{"GetManufacture", GetManufacture}, {"GetManufacture", GetManufacture},
{"GetBrand", GetBrand}, {"GetBrand", GetBrand},
{"GetMarketName", GetMarketName}, {"GetMarketName", GetMarketName},
...@@ -51,13 +51,11 @@ protected: ...@@ -51,13 +51,11 @@ protected:
{"GetSoftwareModel", GetSoftwareModel}, {"GetSoftwareModel", GetSoftwareModel},
{"GetHardwareModel", GetHardwareModel}, {"GetHardwareModel", GetHardwareModel},
{"GetHardwareProfile", GetHardwareProfile}, {"GetHardwareProfile", GetHardwareProfile},
{"GetOsName", GetOsName}, {"GetOSFullName", GetOSFullName},
{"GetDisplayVersion", GetDisplayVersion}, {"GetDisplayVersion", GetDisplayVersion},
{"GetBootloaderVersion", GetBootloaderVersion}, {"GetBootloaderVersion", GetBootloaderVersion},
{"GetSecurityPatchTag", GetSecurityPatchTag}, {"GetSecurityPatchTag", GetSecurityPatchTag},
{"GetAbiList", GetAbiList}, {"GetAbiList", GetAbiList},
{"GetFirstApiLevel", GetFirstApiLevel},
{"GetSdkApiLevel", GetSdkApiLevel},
{"GetIncrementalVersion", GetIncrementalVersion}, {"GetIncrementalVersion", GetIncrementalVersion},
{"GetVersionId", GetVersionId}, {"GetVersionId", GetVersionId},
{"GetBuildType", GetBuildType}, {"GetBuildType", GetBuildType},
...@@ -355,14 +353,13 @@ HWTEST_F(ParameterTest, SUB_START_Para_Getting_ilLegal_0060, Function | MediumTe ...@@ -355,14 +353,13 @@ HWTEST_F(ParameterTest, SUB_START_Para_Getting_ilLegal_0060, Function | MediumTe
*/ */
HWTEST_F(ParameterTest, SUB_START_Para_Getting_ReadOnly_0010, Function | MediumTest | Level0) HWTEST_F(ParameterTest, SUB_START_Para_Getting_ReadOnly_0010, Function | MediumTest | Level0)
{ {
char *value = nullptr; const char *value = nullptr;
for (int loop = 0; loop < StartUpLite::GET_DEF_PARA_FUN_MAX; loop++) { for (int loop = 0; loop < StartUpLite::GET_DEF_PARA_FUN_MAX; loop++) {
value = getDefPara[loop].fun(); value = getDefPara[loop].fun();
EXPECT_STRNE(value, (char *)nullptr); EXPECT_STRNE(value, (char *)nullptr);
if (value != nullptr) {
free(value);
}
} }
EXPECT_GT(GetFirstApiVersion(), 0);
EXPECT_GT(GetSdkApiVersion(), 0);
} }
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册