Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
eadc7d37
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看板
提交
eadc7d37
编写于
8月 15, 2021
作者:
C
chensiming
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Signed-off-by:chensiming<chensiming3@huawei.com>
Signed-off-by:
N
chensiming
<
1067037310@qq.com
>
上级
827ffffc
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
29 addition
and
35 deletion
+29
-35
startup_lite/syspara_hal/src/parameter_func_test.c
startup_lite/syspara_hal/src/parameter_func_test.c
+24
-29
startup_lite/syspara_hal/src/parameter_utils.c
startup_lite/syspara_hal/src/parameter_utils.c
+4
-5
startup_lite/syspara_hal/src/parameter_utils.h
startup_lite/syspara_hal/src/parameter_utils.h
+1
-1
未找到文件。
startup_lite/syspara_hal/src/parameter_func_test.c
浏览文件 @
eadc7d37
...
...
@@ -62,7 +62,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara001, Function | MediumTe
{
char
*
value
=
GetProductType
();
printf
(
"Product Type=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
free
(
value
);
};
...
...
@@ -75,7 +75,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara002, Function | MediumTe
{
char
*
value
=
GetManufacture
();
printf
(
"Manufacture=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
free
(
value
);
};
...
...
@@ -88,7 +88,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara003, Function | MediumTe
{
char
*
value
=
GetBrand
();
printf
(
"Brand=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
free
(
value
);
};
...
...
@@ -101,7 +101,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara004, Function | MediumTe
{
char
*
value
=
GetMarketName
();
printf
(
"Market Name=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
free
(
value
);
};
...
...
@@ -114,7 +114,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara005, Function | MediumTe
{
char
*
value
=
GetProductSeries
();
printf
(
"Product Series=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
free
(
value
);
};
...
...
@@ -127,7 +127,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara006, Function | MediumTe
{
char
*
value
=
GetProductModel
();
printf
(
"Product Model=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
free
(
value
);
};
...
...
@@ -140,7 +140,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara007, Function | MediumTe
{
char
*
value
=
GetHardwareModel
();
printf
(
"Hardware Model=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
free
(
value
);
};
...
...
@@ -153,7 +153,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara008, Function | MediumTe
{
char
*
value
=
GetHardwareProfile
();
printf
(
"Hardware Profile=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
free
(
value
);
};
...
...
@@ -166,12 +166,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara009, Function | MediumTe
{
char
*
value
=
GetSerial
();
printf
(
"Serial=%s
\n
"
,
value
);
if
(
value
==
NULL
)
{
printf
(
"The serial number needs to be written
\n
"
);
TEST_IGNORE
();
}
else
{
TEST_ASSERT_EQUAL_INT
(
1
,
1
);
}
AssertNotEmpty
(
value
);
free
(
value
);
};
...
...
@@ -184,7 +179,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara010, Function | MediumTe
{
char
*
value
=
GetOsName
();
printf
(
"Os Name=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
free
(
value
);
};
...
...
@@ -197,7 +192,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara011, Function | MediumTe
{
char
*
value
=
GetDisplayVersion
();
printf
(
"Display Version=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
free
(
value
);
};
...
...
@@ -210,7 +205,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara012, Function | MediumTe
{
char
*
value
=
GetBootloaderVersion
();
printf
(
"Bootloader Version=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
free
(
value
);
};
...
...
@@ -223,7 +218,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara013, Function | MediumTe
{
char
*
value
=
GetSecurityPatchTag
();
printf
(
"Secure Patch Level=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
free
(
value
);
};
...
...
@@ -236,7 +231,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara014, Function | MediumTe
{
char
*
value
=
GetAbiList
();
printf
(
"Abi List=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
free
(
value
);
};
...
...
@@ -249,7 +244,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara015, Function | MediumTe
{
char
*
value
=
GetFirstApiLevel
();
printf
(
"First Api Level=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
free
(
value
);
};
...
...
@@ -262,7 +257,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara016, Function | MediumTe
{
char
*
value
=
GetIncrementalVersion
();
printf
(
"Incremental Version=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
free
(
value
);
};
...
...
@@ -275,7 +270,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara017, Function | MediumTe
{
char
*
value
=
GetVersionId
();
printf
(
"Version Id=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
free
(
value
);
};
...
...
@@ -288,7 +283,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara018, Function | MediumTe
{
char
*
value
=
GetBuildType
();
printf
(
"Build Type=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
free
(
value
);
};
...
...
@@ -301,7 +296,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara019, Function | MediumTe
{
char
*
value
=
GetBuildUser
();
printf
(
"Build User=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
free
(
value
);
};
...
...
@@ -314,7 +309,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara020, Function | MediumTe
{
char
*
value
=
GetBuildHost
();
printf
(
"Build Host=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
free
(
value
);
};
...
...
@@ -327,7 +322,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara021, Function | MediumTe
{
char
*
value
=
GetBuildTime
();
printf
(
"Build Time=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
free
(
value
);
};
...
...
@@ -340,7 +335,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara022, Function | MediumTe
{
char
*
value
=
GetBuildRootHash
();
printf
(
"Build Root Hash=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
free
(
value
);
};
...
...
@@ -353,7 +348,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara023, Function | MediumTe
{
char
*
value
=
GetSoftwareModel
();
printf
(
"Software Model=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
free
(
value
);
};
...
...
@@ -366,7 +361,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara024, Function | MediumTe
{
char
*
value
=
GetSdkApiLevel
();
printf
(
"Sdk Api Level=%s
\n
"
,
value
);
Is
Empty
(
value
);
AssertNot
Empty
(
value
);
free
(
value
);
};
...
...
startup_lite/syspara_hal/src/parameter_utils.c
浏览文件 @
eadc7d37
...
...
@@ -16,11 +16,10 @@
#include "hctest.h"
#include "parameter_utils.h"
void
Is
Empty
(
const
char
*
sysPara
)
void
AssertNot
Empty
(
const
char
*
sysPara
)
{
TEST_ASSERT_NOT_NULL
(
sysPara
);
if
(
sysPara
!=
NULL
)
{
TEST_ASSERT_EQUAL_INT
(
1
,
1
);
}
else
{
TEST_FAIL
();
}
TEST_ASSERT_TRUE
(
strlen
(
sysPara
)
>
0
);
}
}
\ No newline at end of file
startup_lite/syspara_hal/src/parameter_utils.h
浏览文件 @
eadc7d37
...
...
@@ -25,7 +25,7 @@
* @tc.name :determines whether the string is empty.
* @param :system parameter
*/
void
Is
Empty
(
const
char
*
sysPara
);
void
AssertNot
Empty
(
const
char
*
sysPara
);
#ifdef __cplusplus
#if __cplusplus
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录