Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
6a3afa70
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
6a3afa70
编写于
11月 29, 2022
作者:
O
openharmony_ci
提交者:
Gitee
11月 29, 2022
浏览文件
操作
浏览文件
下载
差异文件
!6740 【startup_lite】【openharmony:monthly_20221018】L0用例优化,修改不安全函数使用.
Merge pull request !6740 from 南先森/cherry-pick-1669711648
上级
01876538
231192b2
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
318 addition
and
246 deletion
+318
-246
startup_lite/syspara_hal/src/deviceinfo_func_test.c
startup_lite/syspara_hal/src/deviceinfo_func_test.c
+318
-246
未找到文件。
startup_lite/syspara_hal/src/deviceinfo_func_test.c
浏览文件 @
6a3afa70
...
...
@@ -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
...
...
@@ -61,8 +61,9 @@ static BOOL DeviceInfoFuncTestSuiteTearDown(void)
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetDeviceTypeFun001
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetDeviceType
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetDeviceType
();
printf
(
"Device Type=%s
\n
"
,
value
);
AssertNotEmpty
(
value
);
};
...
...
@@ -75,11 +76,13 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetDeviceTypeFun002
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetDeviceType
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetDeviceType
();
printf
(
"Device Type=%s
\n
"
,
value
);
TEST_ASSERT_NOT_NULL
(
value
);
if
(
value
!=
NULL
)
{
if
(
value
!=
NULL
)
{
TEST_ASSERT_TRUE
(
strlen
(
value
)
<=
32
);
}
};
...
...
@@ -91,8 +94,9 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetManufactureFun001
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetManufacture
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetManufacture
();
printf
(
"Manufacture=%s
\n
"
,
value
);
AssertNotEmpty
(
value
);
};
...
...
@@ -105,11 +109,13 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetManufactureFun002
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetManufacture
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetManufacture
();
printf
(
"Manufacture=%s
\n
"
,
value
);
TEST_ASSERT_NOT_NULL
(
value
);
if
(
value
!=
NULL
)
{
if
(
value
!=
NULL
)
{
TEST_ASSERT_TRUE
(
strlen
(
value
)
<=
32
);
}
};
...
...
@@ -121,8 +127,9 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetBrandFun001
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetBrand
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetBrand
();
printf
(
"Brand=%s
\n
"
,
value
);
AssertNotEmpty
(
value
);
};
...
...
@@ -135,11 +142,13 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetBrandFun002
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetBrand
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetBrand
();
printf
(
"Brand=%s
\n
"
,
value
);
TEST_ASSERT_NOT_NULL
(
value
);
if
(
value
!=
NULL
)
{
if
(
value
!=
NULL
)
{
TEST_ASSERT_TRUE
(
strlen
(
value
)
<=
32
);
}
};
...
...
@@ -151,8 +160,9 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetMarketNameFun001
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetMarketName
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetMarketName
();
printf
(
"Market Name=%s
\n
"
,
value
);
AssertNotEmpty
(
value
);
};
...
...
@@ -165,11 +175,13 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetMarketNameFun002
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetMarketName
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetMarketName
();
printf
(
"Market Name=%s
\n
"
,
value
);
TEST_ASSERT_NOT_NULL
(
value
);
if
(
value
!=
NULL
)
{
if
(
value
!=
NULL
)
{
TEST_ASSERT_TRUE
(
strlen
(
value
)
<=
32
);
}
};
...
...
@@ -181,8 +193,9 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetProductSeriesFun001
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetProductSeries
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetProductSeries
();
printf
(
"Product Series=%s
\n
"
,
value
);
AssertNotEmpty
(
value
);
};
...
...
@@ -195,11 +208,13 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetProductSeriesFun002
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetProductSeries
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetProductSeries
();
printf
(
"Product Series=%s
\n
"
,
value
);
TEST_ASSERT_NOT_NULL
(
value
);
if
(
value
!=
NULL
)
{
if
(
value
!=
NULL
)
{
TEST_ASSERT_TRUE
(
strlen
(
value
)
<=
32
);
}
};
...
...
@@ -211,8 +226,9 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetProductModelFun001
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetProductModel
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetProductModel
();
printf
(
"Product Model=%s
\n
"
,
value
);
AssertNotEmpty
(
value
);
};
...
...
@@ -225,11 +241,13 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetProductModelFun002
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetProductModel
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetProductModel
();
printf
(
"Product Model=%s
\n
"
,
value
);
TEST_ASSERT_NOT_NULL
(
value
);
if
(
value
!=
NULL
)
{
if
(
value
!=
NULL
)
{
TEST_ASSERT_TRUE
(
strlen
(
value
)
<=
32
);
}
};
...
...
@@ -241,8 +259,9 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetHardwareModel001
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetHardwareModel
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetHardwareModel
();
printf
(
"Hardware Model=%s
\n
"
,
value
);
AssertNotEmpty
(
value
);
};
...
...
@@ -255,11 +274,13 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetHardwareModel002
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetHardwareModel
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetHardwareModel
();
printf
(
"Hardware Model=%s
\n
"
,
value
);
TEST_ASSERT_NOT_NULL
(
value
);
if
(
value
!=
NULL
)
{
if
(
value
!=
NULL
)
{
TEST_ASSERT_TRUE
(
strlen
(
value
)
<=
32
);
}
};
...
...
@@ -271,8 +292,9 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetSerialFun001
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetSerial
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetSerial
();
printf
(
"Serial=%s
\n
"
,
value
);
AssertNotEmpty
(
value
);
};
...
...
@@ -285,11 +307,13 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetSerialFun002
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetSerial
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetSerial
();
printf
(
"Serial=%s
\n
"
,
value
);
TEST_ASSERT_NOT_NULL
(
value
);
if
(
value
!=
NULL
)
{
if
(
value
!=
NULL
)
{
TEST_ASSERT_TRUE
(
strlen
(
value
)
<=
64
);
}
};
...
...
@@ -301,8 +325,9 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetOSFullNameFun001
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetOSFullName
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetOSFullName
();
printf
(
"Os Name=%s
\n
"
,
value
);
AssertNotEmpty
(
value
);
};
...
...
@@ -315,11 +340,13 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetOSFullNameFun002
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetOSFullName
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetOSFullName
();
printf
(
"Os Name=%s
\n
"
,
value
);
TEST_ASSERT_NOT_NULL
(
value
);
if
(
value
!=
NULL
)
{
if
(
value
!=
NULL
)
{
TEST_ASSERT_TRUE
(
strlen
(
value
)
<=
64
);
}
};
...
...
@@ -331,8 +358,9 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetDisplayVersionFun001
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetDisplayVersion
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetDisplayVersion
();
printf
(
"Display Version=%s
\n
"
,
value
);
AssertNotEmpty
(
value
);
};
...
...
@@ -345,11 +373,13 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetDisplayVersionFun002
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetDisplayVersion
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetDisplayVersion
();
printf
(
"Display Version=%s
\n
"
,
value
);
TEST_ASSERT_NOT_NULL
(
value
);
if
(
value
!=
NULL
)
{
if
(
value
!=
NULL
)
{
TEST_ASSERT_TRUE
(
strlen
(
value
)
<=
64
);
}
};
...
...
@@ -361,8 +391,9 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetBootloaderVersionFun001
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetBootloaderVersion
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetBootloaderVersion
();
printf
(
"Bootloader Version=%s
\n
"
,
value
);
AssertNotEmpty
(
value
);
};
...
...
@@ -375,11 +406,13 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetBootloaderVersionFun002
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetBootloaderVersion
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetBootloaderVersion
();
printf
(
"Bootloader Version=%s
\n
"
,
value
);
TEST_ASSERT_NOT_NULL
(
value
);
if
(
value
!=
NULL
)
{
if
(
value
!=
NULL
)
{
TEST_ASSERT_TRUE
(
strlen
(
value
)
<=
64
);
}
};
...
...
@@ -391,8 +424,9 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetSecurityPatchTagFun001
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetSecurityPatchTag
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetSecurityPatchTag
();
printf
(
"Secure Patch Level=%s
\n
"
,
value
);
AssertNotEmpty
(
value
);
};
...
...
@@ -405,11 +439,13 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetSecurityPatchTagFun002
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetSecurityPatchTag
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetSecurityPatchTag
();
printf
(
"Secure Patch Level=%s
\n
"
,
value
);
TEST_ASSERT_NOT_NULL
(
value
);
if
(
value
!=
NULL
)
{
if
(
value
!=
NULL
)
{
TEST_ASSERT_TRUE
(
strlen
(
value
)
<=
64
);
}
};
...
...
@@ -422,12 +458,18 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetSecurityPatchTagFun003
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetSecurityPatchTag
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetSecurityPatchTag
();
printf
(
"Secure Patch Level=%s
\n
"
,
value
);
int
year
,
month
,
day
;
sscanf
(
value
,
"%04d-%02d-%02d"
,
&
year
,
&
month
,
&
day
);
const
int
RET_SUCCESS
=
0
;
int
ret
=
sscanf_s
(
value
,
"%04d-%02d-%02d"
,
&
year
,
&
month
,
&
day
);
if
(
ret
<
RET_SUCCESS
)
{
TEST_ASSERT_TRUE
(
ret
>=
0
);
}
printf
(
"%04d-%02d-%02d
\n
"
,
year
,
month
,
day
);
TEST_ASSERT_TRUE
(
year
>
1900
&&
year
<
2056
);
...
...
@@ -435,7 +477,11 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
TEST_ASSERT_TRUE
(
day
<=
31
&&
day
>
0
);
char
str
[
10
]
=
{
0
};
sprintf
(
str
,
"%d-%02d-%02d"
,
year
,
month
,
day
);
ret
=
sprintf_s
(
str
,
strlen
(
str
),
"%d-%02d-%02d"
,
year
,
month
,
day
);
if
(
ret
<
RET_SUCCESS
)
{
TEST_ASSERT_TRUE
(
ret
>=
0
);
}
printf
(
"str=%s
\n
"
,
str
);
TEST_ASSERT_EQUAL_STRING
(
str
,
value
);
};
...
...
@@ -447,8 +493,9 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetAbiListFun001
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetAbiList
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetAbiList
();
printf
(
"Abi List=%s
\n
"
,
value
);
AssertNotEmpty
(
value
);
};
...
...
@@ -461,11 +508,13 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetAbiListFun002
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetAbiList
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetAbiList
();
printf
(
"Abi List=%s
\n
"
,
value
);
TEST_ASSERT_NOT_NULL
(
value
);
if
(
value
!=
NULL
)
{
if
(
value
!=
NULL
)
{
TEST_ASSERT_TRUE
(
strlen
(
value
)
<=
64
);
}
};
...
...
@@ -477,7 +526,8 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetSdkApiVersionFun001
,
Function
|
MediumTest
|
Level1
)
{
Function
|
MediumTest
|
Level1
)
{
int
value
=
GetSdkApiVersion
();
printf
(
"Sdk Api Level=%d
\n
"
,
value
);
TEST_ASSERT_TRUE
(
value
>
0
);
...
...
@@ -490,7 +540,8 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetFirstApiVersionFun001
,
Function
|
MediumTest
|
Level1
)
{
Function
|
MediumTest
|
Level1
)
{
int
value
=
GetFirstApiVersion
();
printf
(
"First Api Level=%d
\n
"
,
value
);
TEST_ASSERT_TRUE
(
value
>
0
);
...
...
@@ -503,8 +554,9 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetIncrementalVersionFun001
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetIncrementalVersion
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetIncrementalVersion
();
printf
(
"Incremental Version=%s
\n
"
,
value
);
AssertNotEmpty
(
value
);
};
...
...
@@ -516,8 +568,9 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetVersionIdFun001
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetVersionId
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetVersionId
();
printf
(
"Version Id=%s
\n
"
,
value
);
AssertNotEmpty
(
value
);
};
...
...
@@ -530,11 +583,13 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetVersionIdFun002
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetVersionId
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetVersionId
();
printf
(
"Version Id=%s
\n
"
,
value
);
TEST_ASSERT_NOT_NULL
(
value
);
if
(
value
!=
NULL
)
{
if
(
value
!=
NULL
)
{
TEST_ASSERT_TRUE
(
strlen
(
value
)
<=
127
);
}
};
...
...
@@ -546,8 +601,9 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetBuildTypeFun001
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetBuildType
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetBuildType
();
printf
(
"Build Type=%s
\n
"
,
value
);
AssertNotEmpty
(
value
);
};
...
...
@@ -560,11 +616,13 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetBuildTypeFun002
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetBuildType
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetBuildType
();
printf
(
"Build Type=%s
\n
"
,
value
);
TEST_ASSERT_NOT_NULL
(
value
);
if
(
value
!=
NULL
)
{
if
(
value
!=
NULL
)
{
TEST_ASSERT_TRUE
(
strlen
(
value
)
<=
32
);
}
};
...
...
@@ -576,8 +634,9 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetBuildUserFun001
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetBuildUser
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetBuildUser
();
printf
(
"Build User=%s
\n
"
,
value
);
AssertNotEmpty
(
value
);
};
...
...
@@ -590,11 +649,13 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetBuildUserFun002
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetBuildUser
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetBuildUser
();
printf
(
"Build User=%s
\n
"
,
value
);
TEST_ASSERT_NOT_NULL
(
value
);
if
(
value
!=
NULL
)
{
if
(
value
!=
NULL
)
{
TEST_ASSERT_TRUE
(
strlen
(
value
)
<=
32
);
}
};
...
...
@@ -606,8 +667,9 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetBuildHostFun001
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetBuildHost
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetBuildHost
();
printf
(
"Build Host=%s
\n
"
,
value
);
AssertNotEmpty
(
value
);
};
...
...
@@ -620,11 +682,13 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetBuildHostFun002
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetBuildHost
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetBuildHost
();
printf
(
"Build Host=%s
\n
"
,
value
);
TEST_ASSERT_NOT_NULL
(
value
);
if
(
value
!=
NULL
)
{
if
(
value
!=
NULL
)
{
TEST_ASSERT_TRUE
(
strlen
(
value
)
<=
32
);
}
};
...
...
@@ -636,8 +700,9 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetBuildTimeFun001
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetBuildTime
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetBuildTime
();
printf
(
"Build Time=%s
\n
"
,
value
);
AssertNotEmpty
(
value
);
};
...
...
@@ -650,11 +715,13 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetBuildTimeFun002
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetBuildTime
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetBuildTime
();
printf
(
"Build Time=%s
\n
"
,
value
);
TEST_ASSERT_NOT_NULL
(
value
);
if
(
value
!=
NULL
)
{
if
(
value
!=
NULL
)
{
TEST_ASSERT_TRUE
(
strlen
(
value
)
<=
32
);
}
};
...
...
@@ -666,8 +733,9 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetSoftwareModelFun001
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetSoftwareModel
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetSoftwareModel
();
printf
(
"Software Model=%s
\n
"
,
value
);
AssertNotEmpty
(
value
);
};
...
...
@@ -680,11 +748,13 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetSoftwareModelFun002
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetSoftwareModel
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetSoftwareModel
();
printf
(
"Software Model=%s
\n
"
,
value
);
TEST_ASSERT_NOT_NULL
(
value
);
if
(
value
!=
NULL
)
{
if
(
value
!=
NULL
)
{
TEST_ASSERT_TRUE
(
strlen
(
value
)
<=
32
);
}
};
...
...
@@ -696,8 +766,9 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetBuildRootHashFun001
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetBuildRootHash
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetBuildRootHash
();
printf
(
"Build Root Hash=%s
\n
"
,
value
);
TEST_ASSERT_NOT_NULL
(
value
);
};
...
...
@@ -709,8 +780,9 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
*/
LITE_TEST_CASE
(
DeviceInfoFuncTestSuite
,
testGetHardwareProfileFun001
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetHardwareProfile
();
Function
|
MediumTest
|
Level1
)
{
const
char
*
value
=
GetHardwareProfile
();
printf
(
"Hardware Profile=%s
\n
"
,
value
);
AssertNotEmpty
(
value
);
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录