提交 887b35d6 编写于 作者: N nan-xiansen

【start_lite】【master】add SecurityPatchTag interface time format verification case

Signed-off-by: Nnan-xiansen <nanjinbin@huawei.com>
Change-Id: I38b6ebec44bf8a6f19ffedcd38596c0778db9bfa
上级 6391998b
......@@ -24,7 +24,7 @@
#define COMMON_ERROR (-1)
#define INVALID_PARAMETER (-9)
static const char* g_defSysParam = "data of sys param ***...";
static const char *g_defSysParam = "data of sys param ***...";
/**
* @tc.desc : register a test suite, this suite is used to test basic flow and interface dependency
......@@ -60,7 +60,7 @@ static BOOL ParameterFuncTestSuiteTearDown(void)
*/
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara001, Function | MediumTest | Level1)
{
const char* value = GetDeviceType();
const char *value = GetDeviceType();
printf("Device Type=%s\n", value);
AssertNotEmpty(value);
};
......@@ -72,7 +72,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara001, Function | MediumTe
*/
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara002, Function | MediumTest | Level1)
{
const char* value = GetManufacture();
const char *value = GetManufacture();
printf("Manufacture=%s\n", value);
AssertNotEmpty(value);
};
......@@ -84,7 +84,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara002, Function | MediumTe
*/
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara003, Function | MediumTest | Level1)
{
const char* value = GetBrand();
const char *value = GetBrand();
printf("Brand=%s\n", value);
AssertNotEmpty(value);
};
......@@ -96,7 +96,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara003, Function | MediumTe
*/
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara004, Function | MediumTest | Level1)
{
const char* value = GetMarketName();
const char *value = GetMarketName();
printf("Market Name=%s\n", value);
AssertNotEmpty(value);
};
......@@ -108,7 +108,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara004, Function | MediumTe
*/
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara005, Function | MediumTest | Level1)
{
const char* value = GetProductSeries();
const char *value = GetProductSeries();
printf("Product Series=%s\n", value);
AssertNotEmpty(value);
};
......@@ -120,7 +120,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara005, Function | MediumTe
*/
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara006, Function | MediumTest | Level1)
{
const char* value = GetProductModel();
const char *value = GetProductModel();
printf("Product Model=%s\n", value);
AssertNotEmpty(value);
};
......@@ -132,7 +132,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara006, Function | MediumTe
*/
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara007, Function | MediumTest | Level1)
{
const char* value = GetHardwareModel();
const char *value = GetHardwareModel();
printf("Hardware Model=%s\n", value);
AssertNotEmpty(value);
};
......@@ -144,7 +144,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara007, Function | MediumTe
*/
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara008, Function | MediumTest | Level1)
{
const char* value = GetHardwareProfile();
const char *value = GetHardwareProfile();
printf("Hardware Profile=%s\n", value);
AssertNotEmpty(value);
};
......@@ -156,7 +156,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara008, Function | MediumTe
*/
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara009, Function | MediumTest | Level1)
{
const char* value = GetSerial();
const char *value = GetSerial();
printf("Serial=%s\n", value);
AssertNotEmpty(value);
};
......@@ -168,7 +168,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara009, Function | MediumTe
*/
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara010, Function | MediumTest | Level1)
{
const char* value = GetOSFullName();
const char *value = GetOSFullName();
printf("Os Name=%s\n", value);
AssertNotEmpty(value);
};
......@@ -180,7 +180,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara010, Function | MediumTe
*/
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara011, Function | MediumTest | Level1)
{
const char* value = GetDisplayVersion();
const char *value = GetDisplayVersion();
printf("Display Version=%s\n", value);
AssertNotEmpty(value);
};
......@@ -192,7 +192,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara011, Function | MediumTe
*/
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara012, Function | MediumTest | Level1)
{
const char* value = GetBootloaderVersion();
const char *value = GetBootloaderVersion();
printf("Bootloader Version=%s\n", value);
AssertNotEmpty(value);
};
......@@ -204,11 +204,26 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara012, Function | MediumTe
*/
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara013, Function | MediumTest | Level1)
{
const char* value = GetSecurityPatchTag();
const char *value = GetSecurityPatchTag();
printf("Secure Patch Level=%s\n", value);
AssertNotEmpty(value);
};
/**
* @tc.number : SUB_UTILS_PARAMETER_8200
* @tc.name : Obtaining system parameter SecurityPatchTag which format is yy--mm--dd
* @tc.desc : [C- SOFTWARE -0200]
*/
LITE_TEST_CASE(ParameterFuncTestSuite, testGetSecurityPatchTag02, Function | MediumTest | Level1)
{
const char *value = GetSecurityPatchTag();
printf("Secure Patch Level=%s\n", value);
AssertNotEmpty(value);
char *str;
sscanf(*value, "/^[1-2]{1}([0-9]{3})-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/", *str);
TEST_ASSERT_TRUE(*str == *value)
};
/**
* @tc.number : SUB_UTILS_PARAMETER_1400
* @tc.name : Obtaining system parameter AbiList
......@@ -216,7 +231,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara013, Function | MediumTe
*/
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara014, Function | MediumTest | Level1)
{
const char* value = GetAbiList();
const char *value = GetAbiList();
printf("Abi List=%s\n", value);
AssertNotEmpty(value);
};
......@@ -240,7 +255,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara015, Function | MediumTe
*/
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara016, Function | MediumTest | Level1)
{
const char* value = GetIncrementalVersion();
const char *value = GetIncrementalVersion();
printf("Incremental Version=%s\n", value);
AssertNotEmpty(value);
};
......@@ -252,7 +267,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara016, Function | MediumTe
*/
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara017, Function | MediumTest | Level1)
{
const char* value = GetVersionId();
const char *value = GetVersionId();
printf("Version Id=%s\n", value);
AssertNotEmpty(value);
};
......@@ -264,7 +279,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara017, Function | MediumTe
*/
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara018, Function | MediumTest | Level1)
{
const char* value = GetBuildType();
const char *value = GetBuildType();
printf("Build Type=%s\n", value);
AssertNotEmpty(value);
};
......@@ -276,7 +291,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara018, Function | MediumTe
*/
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara019, Function | MediumTest | Level1)
{
const char* value = GetBuildUser();
const char *value = GetBuildUser();
printf("Build User=%s\n", value);
AssertNotEmpty(value);
};
......@@ -288,7 +303,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara019, Function | MediumTe
*/
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara020, Function | MediumTest | Level1)
{
const char* value = GetBuildHost();
const char *value = GetBuildHost();
printf("Build Host=%s\n", value);
AssertNotEmpty(value);
};
......@@ -300,7 +315,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara020, Function | MediumTe
*/
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara021, Function | MediumTest | Level1)
{
const char* value = GetBuildTime();
const char *value = GetBuildTime();
printf("Build Time=%s\n", value);
AssertNotEmpty(value);
};
......@@ -312,7 +327,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara021, Function | MediumTe
*/
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara022, Function | MediumTest | Level1)
{
const char* value = GetBuildRootHash();
const char *value = GetBuildRootHash();
printf("Build Root Hash=%s\n", value);
TEST_ASSERT_NOT_NULL(value);
};
......@@ -324,7 +339,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara022, Function | MediumTe
*/
LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara023, Function | MediumTest | Level1)
{
const char* value = GetSoftwareModel();
const char *value = GetSoftwareModel();
printf("Software Model=%s\n", value);
AssertNotEmpty(value);
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册