Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
9d5ad488
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看板
提交
9d5ad488
编写于
11月 30, 2020
作者:
O
openharmony_ci
提交者:
Gitee
11月 30, 2020
浏览文件
操作
浏览文件
下载
差异文件
!22 适配三方芯片
Merge pull request !22 from zhouhouxin/master
上级
50a5d7ec
8c189c49
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
92 addition
and
7 deletion
+92
-7
distributedschedule_lite/samgr_hal/src/sendrequest_func_test.c
...ibutedschedule_lite/samgr_hal/src/sendrequest_func_test.c
+56
-5
distributedschedule_lite/samgr_hal/src/sendsharerequest_func_test.c
...dschedule_lite/samgr_hal/src/sendsharerequest_func_test.c
+36
-2
未找到文件。
distributedschedule_lite/samgr_hal/src/sendrequest_func_test.c
浏览文件 @
9d5ad488
...
...
@@ -150,7 +150,24 @@ static BOOL FEATURE_OnMessage(Feature *feature, Request *request)
int32
returnCode
=
0
;;
DemoFeature
*
demoFeature
=
(
DemoFeature
*
)
feature
;
demoFeature
->
featureCalledCount
++
;
demoFeature
->
latestRequest
=
(
char
*
)
request
->
data
;
if
(
demoFeature
->
latestRequest
!=
NULL
)
{
free
(
demoFeature
->
latestRequest
);
}
int
requestLen
;
if
(
request
->
len
>
0
)
{
requestLen
=
request
->
len
;
}
else
{
requestLen
=
strlen
((
char
*
)
request
->
data
)
+
1
;
}
demoFeature
->
latestRequest
=
(
char
*
)
malloc
(
requestLen
*
sizeof
(
char
));
if
(
demoFeature
->
latestRequest
==
NULL
)
{
TEST_FAIL
();
}
errno_t
error
=
strcpy_s
(
demoFeature
->
latestRequest
,
requestLen
,
(
char
*
)
request
->
data
);
if
(
error
!=
EOK
)
{
TEST_FAIL
();
}
switch
(
request
->
msgId
)
{
case
MSG_NO
:
...
...
@@ -180,7 +197,24 @@ static BOOL FEATURE_OnMessage02(Feature *feature, Request *request)
int32
returnCode
=
0
;
DemoFeature
*
demoFeature
=
(
DemoFeature
*
)
feature
;
demoFeature
->
featureCalledCount
++
;
demoFeature
->
latestRequest
=
(
char
*
)
request
->
data
;
if
(
demoFeature
->
latestRequest
!=
NULL
)
{
free
(
demoFeature
->
latestRequest
);
}
int
requestLen
;
if
(
request
->
len
>
0
)
{
requestLen
=
request
->
len
;
}
else
{
requestLen
=
strlen
((
char
*
)
request
->
data
)
+
1
;
}
demoFeature
->
latestRequest
=
(
char
*
)
malloc
(
requestLen
*
sizeof
(
char
));
if
(
demoFeature
->
latestRequest
==
NULL
)
{
TEST_FAIL
();
}
errno_t
error
=
strcpy_s
(
demoFeature
->
latestRequest
,
requestLen
,
(
char
*
)
request
->
data
);
if
(
error
!=
EOK
)
{
TEST_FAIL
();
}
switch
(
request
->
msgId
)
{
case
MSG_NO
:
...
...
@@ -210,7 +244,24 @@ static BOOL FEATURE_OnMessage03(Feature *feature, Request *request)
int32
returnCode
=
0
;
DemoFeature
*
demoFeature
=
(
DemoFeature
*
)
feature
;
demoFeature
->
featureCalledCount
++
;
demoFeature
->
latestRequest
=
(
char
*
)
request
->
data
;
if
(
demoFeature
->
latestRequest
!=
NULL
)
{
free
(
demoFeature
->
latestRequest
);
}
int
requestLen
;
if
(
request
->
len
>
0
)
{
requestLen
=
request
->
len
;
}
else
{
requestLen
=
strlen
((
char
*
)
request
->
data
)
+
1
;
}
demoFeature
->
latestRequest
=
(
char
*
)
malloc
(
requestLen
*
sizeof
(
char
));
if
(
demoFeature
->
latestRequest
==
NULL
)
{
TEST_FAIL
();
}
errno_t
error
=
strcpy_s
(
demoFeature
->
latestRequest
,
requestLen
,
(
char
*
)
request
->
data
);
if
(
error
!=
EOK
)
{
TEST_FAIL
();
}
switch
(
request
->
msgId
)
{
case
MSG_NO
:
...
...
@@ -513,7 +564,7 @@ LITE_TEST_CASE(SendRequestTestSuite, testSendRequest0040, LEVEL2)
}
Request
request
=
{.
msgId
=
MSG_RT
,
.
msgValue
=
0
};
request
.
len
=
0
;
request
.
data
=
NULL
;
request
.
data
=
"I wanna async call good result!"
;
IUnknown
*
iUnknown
=
SAMGR_GetInstance
()
->
GetFeatureApi
(
"serviceName501"
,
"featureName503"
);
DemoFeature
*
feature
=
GET_OBJECT
(
iUnknown
,
DemoFeature
,
iUnknown
);
...
...
@@ -582,7 +633,7 @@ LITE_TEST_CASE(SendRequestTestSuite, testSendRequest0060, LEVEL2)
Request
request
=
{.
msgId
=
MSG_NO
,
.
msgValue
=
0
};
char
*
body
=
"I wanna async call good result!"
;
request
.
len
=
0
;
request
.
data
=
NULL
;
request
.
data
=
"I wanna async call good result!"
;
IUnknown
*
iUnknown
=
SAMGR_GetInstance
()
->
GetFeatureApi
(
"serviceName501"
,
"featureName503"
);
if
(
iUnknown
==
NULL
)
{
TEST_FAIL
();
...
...
distributedschedule_lite/samgr_hal/src/sendsharerequest_func_test.c
浏览文件 @
9d5ad488
...
...
@@ -158,7 +158,24 @@ static BOOL FEATURE_OnMessage02(Feature *feature, Request *request)
int32
returnCode
=
0
;
DemoFeature
*
demoFeature
=
(
DemoFeature
*
)
feature
;
demoFeature
->
featureCalledCount
++
;
demoFeature
->
latestRequest
=
(
char
*
)
request
->
data
;
if
(
demoFeature
->
latestRequest
!=
NULL
)
{
free
(
demoFeature
->
latestRequest
);
}
int
requestLen
;
if
(
request
->
len
>
0
)
{
requestLen
=
request
->
len
;
}
else
{
requestLen
=
strlen
((
char
*
)
request
->
data
)
+
1
;
}
demoFeature
->
latestRequest
=
(
char
*
)
malloc
(
requestLen
*
sizeof
(
char
));
if
(
demoFeature
->
latestRequest
==
NULL
)
{
TEST_FAIL
();
}
errno_t
error
=
strcpy_s
(
demoFeature
->
latestRequest
,
requestLen
,
(
char
*
)
request
->
data
);
if
(
error
!=
EOK
)
{
TEST_FAIL
();
}
switch
(
request
->
msgId
)
{
case
MSG_NO
:
...
...
@@ -188,7 +205,24 @@ static BOOL FEATURE_OnMessage03(Feature *feature, Request *request)
int32
returnCode
=
0
;
DemoFeature
*
demoFeature
=
(
DemoFeature
*
)
feature
;
demoFeature
->
featureCalledCount
++
;
demoFeature
->
latestRequest
=
(
char
*
)
request
->
data
;
if
(
demoFeature
->
latestRequest
!=
NULL
)
{
free
(
demoFeature
->
latestRequest
);
}
int
requestLen
;
if
(
request
->
len
>
0
)
{
requestLen
=
request
->
len
;
}
else
{
requestLen
=
strlen
((
char
*
)
request
->
data
)
+
1
;
}
demoFeature
->
latestRequest
=
(
char
*
)
malloc
(
requestLen
*
sizeof
(
char
));
if
(
demoFeature
->
latestRequest
==
NULL
)
{
TEST_FAIL
();
}
errno_t
error
=
strcpy_s
(
demoFeature
->
latestRequest
,
requestLen
,
(
char
*
)
request
->
data
);
if
(
error
!=
EOK
)
{
TEST_FAIL
();
}
switch
(
request
->
msgId
)
{
case
MSG_NO
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录