Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
3c98b3f4
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看板
未验证
提交
3c98b3f4
编写于
9月 02, 2022
作者:
O
openharmony_ci
提交者:
Gitee
9月 02, 2022
浏览文件
操作
浏览文件
下载
差异文件
!5357 【startup_lite】【3.1release】modify device info api test case.
Merge pull request !5357 from leiyuqian/startuplite0902
上级
065881a6
f12ca311
变更
5
展开全部
隐藏空白更改
内联
并排
Showing
5 changed file
with
1010 addition
and
560 deletion
+1010
-560
startup_lite/syspara_hal/BUILD.gn
startup_lite/syspara_hal/BUILD.gn
+1
-0
startup_lite/syspara_hal/src/deviceinfo_func_test.c
startup_lite/syspara_hal/src/deviceinfo_func_test.c
+718
-0
startup_lite/syspara_hal/src/parameter_func_test.c
startup_lite/syspara_hal/src/parameter_func_test.c
+166
-436
startup_lite/syspara_hal/src/parameter_reli_test.c
startup_lite/syspara_hal/src/parameter_reli_test.c
+124
-123
startup_lite/syspara_hal/src/parameter_utils.c
startup_lite/syspara_hal/src/parameter_utils.c
+1
-1
未找到文件。
startup_lite/syspara_hal/BUILD.gn
浏览文件 @
3c98b3f4
...
...
@@ -16,6 +16,7 @@ import("//test/xts/tools/lite/build/suite_lite.gni")
hctest_suite("ActsParameterTest") {
suite_name = "acts"
sources = [
"src/deviceinfo_func_test.c",
"src/parameter_func_test.c",
"src/parameter_reli_test.c",
"src/parameter_utils.c",
...
...
startup_lite/syspara_hal/src/deviceinfo_func_test.c
0 → 100644
浏览文件 @
3c98b3f4
此差异已折叠。
点击以展开。
startup_lite/syspara_hal/src/parameter_func_test.c
浏览文件 @
3c98b3f4
此差异已折叠。
点击以展开。
startup_lite/syspara_hal/src/parameter_reli_test.c
浏览文件 @
3c98b3f4
...
...
@@ -13,16 +13,17 @@
* limitations under the License.
*/
#include "ohos_types.h"
#include <securec.h>
#include "hctest.h"
#include "ohos_types.h"
#include "parameter.h"
#include "parameter_utils.h"
#define QUERY_TIMES
50
#define QUERY_TIMES 50
/**
* @tc.desc : register a test suite, this suite is used to test basic flow and interface dependency
* @tc.desc : register a test suite, this suite is used to test basic flow
* and interface dependency
* @param : subsystem name is utils
* @param : module name is parameter
* @param : test suit name is ParameterReliTestSuite
...
...
@@ -53,13 +54,13 @@ static BOOL ParameterReliTestSuiteTearDown(void)
* @tc.name : Obtaining ProductType for multiple times
* @tc.desc : [C- SOFTWARE -0200]
*/
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli001
,
Function
|
MediumTest
|
Level1
)
{
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli001
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetDeviceType
();
AssertNotEmpty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetDeviceType
();
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetDeviceType
();
}
const
char
*
value2
=
GetDeviceType
();
TEST_ASSERT_EQUAL_STRING
(
value1
,
value2
);
...
...
@@ -70,13 +71,13 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli001, Function | Medi
* @tc.name : Obtaining Manufacture for multiple times
* @tc.desc : [C- SOFTWARE -0200]
*/
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli002
,
Function
|
MediumTest
|
Level1
)
{
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli002
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetManufacture
();
AssertNotEmpty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetManufacture
();
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetManufacture
();
}
const
char
*
value2
=
GetManufacture
();
TEST_ASSERT_EQUAL_STRING
(
value1
,
value2
);
...
...
@@ -87,13 +88,13 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli002, Function | Medi
* @tc.name : Obtaining Brand for multiple times
* @tc.desc : [C- SOFTWARE -0200]
*/
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli003
,
Function
|
MediumTest
|
Level1
)
{
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli003
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetBrand
();
AssertNotEmpty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetBrand
();
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetBrand
();
}
const
char
*
value2
=
GetBrand
();
TEST_ASSERT_EQUAL_STRING
(
value1
,
value2
);
...
...
@@ -104,13 +105,13 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli003, Function | Medi
* @tc.name : Obtaining MarketName for multiple times
* @tc.desc : [C- SOFTWARE -0200]
*/
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli004
,
Function
|
MediumTest
|
Level1
)
{
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli004
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetMarketName
();
AssertNotEmpty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetMarketName
();
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetMarketName
();
}
const
char
*
value2
=
GetMarketName
();
TEST_ASSERT_EQUAL_STRING
(
value1
,
value2
);
...
...
@@ -121,13 +122,13 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli004, Function | Medi
* @tc.name : Obtaining ProductSeries for multiple times
* @tc.desc : [C- SOFTWARE -0200]
*/
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli005
,
Function
|
MediumTest
|
Level1
)
{
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli005
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetProductSeries
();
AssertNotEmpty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetProductSeries
();
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetProductSeries
();
}
const
char
*
value2
=
GetProductSeries
();
TEST_ASSERT_EQUAL_STRING
(
value1
,
value2
);
...
...
@@ -138,13 +139,13 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli005, Function | Medi
* @tc.name : Obtaining ProductModel for multiple times
* @tc.desc : [C- SOFTWARE -0200]
*/
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli006
,
Function
|
MediumTest
|
Level1
)
{
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli006
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetProductModel
();
AssertNotEmpty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetProductModel
();
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetProductModel
();
}
const
char
*
value2
=
GetProductModel
();
TEST_ASSERT_EQUAL_STRING
(
value1
,
value2
);
...
...
@@ -155,13 +156,13 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli006, Function | Medi
* @tc.name : Obtaining HardwareModel for multiple times
* @tc.desc : [C- SOFTWARE -0200]
*/
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli007
,
Function
|
MediumTest
|
Level1
)
{
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli007
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetHardwareModel
();
AssertNotEmpty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetHardwareModel
();
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetHardwareModel
();
}
const
char
*
value2
=
GetHardwareModel
();
TEST_ASSERT_EQUAL_STRING
(
value1
,
value2
);
...
...
@@ -172,13 +173,13 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli007, Function | Medi
* @tc.name : Obtaining HardwareProfile for multiple times
* @tc.desc : [C- SOFTWARE -0200]
*/
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli008
,
Function
|
MediumTest
|
Level1
)
{
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli008
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetHardwareProfile
();
AssertNotEmpty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetHardwareProfile
();
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetHardwareProfile
();
}
const
char
*
value2
=
GetHardwareProfile
();
TEST_ASSERT_EQUAL_STRING
(
value1
,
value2
);
...
...
@@ -189,16 +190,16 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli008, Function | Medi
* @tc.name : Obtaining Serial for multiple times
* @tc.desc : [C- SOFTWARE -0200]
*/
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli009
,
Function
|
MediumTest
|
Level1
)
{
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli009
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetSerial
();
if
(
value1
==
NULL
)
{
printf
(
"The serial number needs to be written
\n
"
);
TEST_IGNORE
();
}
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetSerial
();
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetSerial
();
}
const
char
*
value2
=
GetSerial
();
TEST_ASSERT_EQUAL_STRING
(
value1
,
value2
);
...
...
@@ -209,13 +210,13 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli009, Function | Medi
* @tc.name : Obtaining OsName for multiple times
* @tc.desc : [C- SOFTWARE -0200]
*/
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli010
,
Function
|
MediumTest
|
Level1
)
{
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli010
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetOSFullName
();
AssertNotEmpty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetOSFullName
();
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetOSFullName
();
}
const
char
*
value2
=
GetOSFullName
();
TEST_ASSERT_EQUAL_STRING
(
value1
,
value2
);
...
...
@@ -226,13 +227,13 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli010, Function | Medi
* @tc.name : Obtaining DisplayVersion for multiple times
* @tc.desc : [C- SOFTWARE -0200]
*/
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli011
,
Function
|
MediumTest
|
Level1
)
{
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli011
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetDisplayVersion
();
AssertNotEmpty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetDisplayVersion
();
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetDisplayVersion
();
}
const
char
*
value2
=
GetDisplayVersion
();
TEST_ASSERT_EQUAL_STRING
(
value1
,
value2
);
...
...
@@ -243,13 +244,13 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli011, Function | Medi
* @tc.name : Obtaining BootloaderVersion for multiple times
* @tc.desc : [C- SOFTWARE -0200]
*/
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli012
,
Function
|
MediumTest
|
Level1
)
{
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli012
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetBootloaderVersion
();
AssertNotEmpty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetBootloaderVersion
();
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetBootloaderVersion
();
}
const
char
*
value2
=
GetBootloaderVersion
();
TEST_ASSERT_EQUAL_STRING
(
value1
,
value2
);
...
...
@@ -260,13 +261,13 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli012, Function | Medi
* @tc.name : Obtaining SecurityPatchTag for multiple times
* @tc.desc : [C- SOFTWARE -0200]
*/
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli013
,
Function
|
MediumTest
|
Level1
)
{
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli013
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetSecurityPatchTag
();
AssertNotEmpty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetSecurityPatchTag
();
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetSecurityPatchTag
();
}
const
char
*
value2
=
GetSecurityPatchTag
();
TEST_ASSERT_EQUAL_STRING
(
value1
,
value2
);
...
...
@@ -277,13 +278,13 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli013, Function | Medi
* @tc.name : Obtaining AbiList for multiple times
* @tc.desc : [C- SOFTWARE -0200]
*/
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli014
,
Function
|
MediumTest
|
Level1
)
{
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli014
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetAbiList
();
AssertNotEmpty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetAbiList
();
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetAbiList
();
}
const
char
*
value2
=
GetAbiList
();
TEST_ASSERT_EQUAL_STRING
(
value1
,
value2
);
...
...
@@ -294,14 +295,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli014, Function | Medi
* @tc.name : Obtaining FirstApiLevel for multiple times
* @tc.desc : [C- SOFTWARE -0200]
*/
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli015
,
Function
|
MediumTest
|
Level1
)
{
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli015
,
Function
|
MediumTest
|
Level1
)
{
int
value1
=
GetFirstApiVersion
();
TEST_ASSERT_NOT_NULL
(
value1
);
TEST_ASSERT_TRUE
((
int
)
value1
==
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
int
value
=
GetFirstApiVersion
();
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
int
value
=
GetFirstApiVersion
();
}
int
value2
=
GetFirstApiVersion
();
TEST_ASSERT_EQUAL_INT
(
value1
,
value2
);
...
...
@@ -312,13 +313,13 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli015, Function | Medi
* @tc.name : Obtaining IncrementalVersion for multiple times
* @tc.desc : [C- SOFTWARE -0200]
*/
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli016
,
Function
|
MediumTest
|
Level1
)
{
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli016
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetIncrementalVersion
();
AssertNotEmpty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetIncrementalVersion
();
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetIncrementalVersion
();
}
const
char
*
value2
=
GetIncrementalVersion
();
TEST_ASSERT_EQUAL_STRING
(
value1
,
value2
);
...
...
@@ -329,13 +330,13 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli016, Function | Medi
* @tc.name : Obtaining VersionId for multiple times
* @tc.desc : [C- SOFTWARE -0200]
*/
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli017
,
Function
|
MediumTest
|
Level1
)
{
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli017
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetVersionId
();
AssertNotEmpty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetVersionId
();
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetVersionId
();
}
const
char
*
value2
=
GetVersionId
();
TEST_ASSERT_EQUAL_STRING
(
value1
,
value2
);
...
...
@@ -346,13 +347,13 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli017, Function | Medi
* @tc.name : Obtaining BuildType for multiple times
* @tc.desc : [C- SOFTWARE -0200]
*/
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli018
,
Function
|
MediumTest
|
Level1
)
{
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli018
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetBuildType
();
AssertNotEmpty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetBuildType
();
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetBuildType
();
}
const
char
*
value2
=
GetBuildType
();
TEST_ASSERT_EQUAL_STRING
(
value1
,
value2
);
...
...
@@ -363,13 +364,13 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli018, Function | Medi
* @tc.name : Obtaining BuildUser for multiple times
* @tc.desc : [C- SOFTWARE -0200]
*/
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli019
,
Function
|
MediumTest
|
Level1
)
{
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli019
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetBuildUser
();
AssertNotEmpty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetBuildUser
();
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetBuildUser
();
}
const
char
*
value2
=
GetBuildUser
();
TEST_ASSERT_EQUAL_STRING
(
value1
,
value2
);
...
...
@@ -380,13 +381,13 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli019, Function | Medi
* @tc.name : Obtaining BuildHost for multiple times
* @tc.desc : [C- SOFTWARE -0200]
*/
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli020
,
Function
|
MediumTest
|
Level1
)
{
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli020
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetBuildHost
();
AssertNotEmpty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetBuildHost
();
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetBuildHost
();
}
const
char
*
value2
=
GetBuildHost
();
TEST_ASSERT_EQUAL_STRING
(
value1
,
value2
);
...
...
@@ -397,13 +398,13 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli020, Function | Medi
* @tc.name : Obtaining BuildTime for multiple times
* @tc.desc : [C- SOFTWARE -0200]
*/
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli021
,
Function
|
MediumTest
|
Level1
)
{
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli021
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetBuildTime
();
AssertNotEmpty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetBuildTime
();
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetBuildTime
();
}
const
char
*
value2
=
GetBuildTime
();
TEST_ASSERT_EQUAL_STRING
(
value1
,
value2
);
...
...
@@ -414,13 +415,13 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli021, Function | Medi
* @tc.name : Obtaining BuildRootHash for multiple times
* @tc.desc : [C- SOFTWARE -0200]
*/
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli022
,
Function
|
MediumTest
|
Level1
)
{
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli022
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetBuildRootHash
();
TEST_ASSERT_NOT_NULL
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetBuildRootHash
();
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetBuildRootHash
();
}
const
char
*
value2
=
GetBuildRootHash
();
TEST_ASSERT_EQUAL_STRING
(
value1
,
value2
);
...
...
@@ -431,13 +432,13 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli022, Function | Medi
* @tc.name : Obtaining SoftwareModel for multiple times
* @tc.desc : [C- SOFTWARE -0200]
*/
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli023
,
Function
|
MediumTest
|
Level1
)
{
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli023
,
Function
|
MediumTest
|
Level1
)
{
const
char
*
value1
=
GetSoftwareModel
();
AssertNotEmpty
(
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetSoftwareModel
();
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
const
char
*
value
=
GetSoftwareModel
();
}
const
char
*
value2
=
GetSoftwareModel
();
TEST_ASSERT_EQUAL_STRING
(
value1
,
value2
);
...
...
@@ -448,14 +449,14 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli023, Function | Medi
* @tc.name : Obtaining SdkApiLevel for multiple times
* @tc.desc : [C- SOFTWARE -0200]
*/
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli024
,
Function
|
MediumTest
|
Level1
)
{
LITE_TEST_CASE
(
ParameterReliTestSuite
,
testObtainSysParaReli024
,
Function
|
MediumTest
|
Level1
)
{
int
value1
=
GetSdkApiVersion
();
TEST_ASSERT_NOT_NULL
(
value1
);
TEST_ASSERT_TRUE
((
int
)
value1
==
value1
);
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
int
value
=
GetSdkApiVersion
();
for
(
int
i
=
0
;
i
<
QUERY_TIMES
;
i
++
)
{
int
value
=
GetSdkApiVersion
();
}
int
value2
=
GetSdkApiVersion
();
TEST_ASSERT_EQUAL_INT
(
value1
,
value2
);
...
...
startup_lite/syspara_hal/src/parameter_utils.c
浏览文件 @
3c98b3f4
...
...
@@ -13,8 +13,8 @@
* limitations under the License.
*/
#include "hctest.h"
#include "parameter_utils.h"
#include "hctest.h"
void
AssertNotEmpty
(
const
char
*
sysPara
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录