Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
275f5539
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看板
提交
275f5539
编写于
10月 28, 2021
作者:
胡
胡永延
提交者:
Gitee
10月 28, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update aafwk_lite/ability_posix/src/AbilityMgrTest.cpp.
上级
4c589fdd
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
23 addition
and
23 deletion
+23
-23
aafwk_lite/ability_posix/src/AbilityMgrTest.cpp
aafwk_lite/ability_posix/src/AbilityMgrTest.cpp
+23
-23
未找到文件。
aafwk_lite/ability_posix/src/AbilityMgrTest.cpp
浏览文件 @
275f5539
...
@@ -146,7 +146,7 @@ protected:
...
@@ -146,7 +146,7 @@ protected:
bool
uninstallResult
=
false
;
bool
uninstallResult
=
false
;
sem_init
(
&
g_sem
,
0
,
0
);
sem_init
(
&
g_sem
,
0
,
0
);
InstallParam
installParam
=
{
.
installLocation
=
1
,
.
keepData
=
false
};
InstallParam
installParam
=
{
.
installLocation
=
1
,
.
keepData
=
false
};
uninstallResult
=
Uninstall
(
"com.
huawei
.testnative"
,
&
installParam
,
TestBundleStateCallback
);
uninstallResult
=
Uninstall
(
"com.
openharmony
.testnative"
,
&
installParam
,
TestBundleStateCallback
);
sem_wait
(
&
g_sem
);
sem_wait
(
&
g_sem
);
if
(
uninstallResult
)
{
if
(
uninstallResult
)
{
printf
(
"sem exit
\n
"
);
printf
(
"sem exit
\n
"
);
...
@@ -207,14 +207,14 @@ HWTEST_F(AbilityMgrTest, testSetWantElement, Function | MediumTest | Level0)
...
@@ -207,14 +207,14 @@ HWTEST_F(AbilityMgrTest, testSetWantElement, Function | MediumTest | Level0)
Want
want
=
{
nullptr
};
Want
want
=
{
nullptr
};
ElementName
element
=
{
nullptr
};
ElementName
element
=
{
nullptr
};
SetElementDeviceID
(
&
element
,
"0001000"
);
SetElementDeviceID
(
&
element
,
"0001000"
);
SetElementBundleName
(
&
element
,
"com.
huawei
.testnative"
);
SetElementBundleName
(
&
element
,
"com.
openharmony
.testnative"
);
SetElementAbilityName
(
&
element
,
"SecondAbility"
);
SetElementAbilityName
(
&
element
,
"SecondAbility"
);
if
(
element
.
abilityName
!=
nullptr
)
{
if
(
element
.
abilityName
!=
nullptr
)
{
bool
setResult
=
SetWantElement
(
&
want
,
element
);
bool
setResult
=
SetWantElement
(
&
want
,
element
);
if
(
setResult
)
{
if
(
setResult
)
{
EXPECT_STREQ
(
want
.
element
->
deviceId
,
"0001000"
);
EXPECT_STREQ
(
want
.
element
->
deviceId
,
"0001000"
);
EXPECT_STREQ
(
want
.
element
->
abilityName
,
"SecondAbility"
);
EXPECT_STREQ
(
want
.
element
->
abilityName
,
"SecondAbility"
);
EXPECT_STREQ
(
want
.
element
->
bundleName
,
"com.
huawei
.testnative"
);
EXPECT_STREQ
(
want
.
element
->
bundleName
,
"com.
openharmony
.testnative"
);
}
}
}
}
ClearElement
(
&
element
);
ClearElement
(
&
element
);
...
@@ -280,14 +280,14 @@ HWTEST_F(AbilityMgrTest, testWantToUri, Function | MediumTest | Level0)
...
@@ -280,14 +280,14 @@ HWTEST_F(AbilityMgrTest, testWantToUri, Function | MediumTest | Level0)
Want
want
=
{
nullptr
};
Want
want
=
{
nullptr
};
ElementName
element
=
{
nullptr
};
ElementName
element
=
{
nullptr
};
SetElementDeviceID
(
&
element
,
"0001000"
);
SetElementDeviceID
(
&
element
,
"0001000"
);
SetElementBundleName
(
&
element
,
"com.
huawei
.testnative"
);
SetElementBundleName
(
&
element
,
"com.
openharmony
.testnative"
);
SetElementAbilityName
(
&
element
,
"SecondAbility"
);
SetElementAbilityName
(
&
element
,
"SecondAbility"
);
if
(
element
.
abilityName
!=
nullptr
)
{
if
(
element
.
abilityName
!=
nullptr
)
{
bool
setResult
=
SetWantElement
(
&
want
,
element
);
bool
setResult
=
SetWantElement
(
&
want
,
element
);
if
(
setResult
)
{
if
(
setResult
)
{
const
char
*
uri
=
WantToUri
(
want
);
const
char
*
uri
=
WantToUri
(
want
);
printf
(
"uri is %s
\n
"
,
uri
);
printf
(
"uri is %s
\n
"
,
uri
);
const
char
*
expectResult
=
"#Want;device=0001000;bundle=com.
huawei
.testnative;ability=SecondAbility;end"
;
const
char
*
expectResult
=
"#Want;device=0001000;bundle=com.
openharmony
.testnative;ability=SecondAbility;end"
;
EXPECT_STREQ
(
uri
,
expectResult
);
EXPECT_STREQ
(
uri
,
expectResult
);
free
((
void
*
)
uri
);
free
((
void
*
)
uri
);
}
}
...
@@ -367,7 +367,7 @@ HWTEST_F(AbilityMgrTest, testWantParseUri, Function | MediumTest | Level0)
...
@@ -367,7 +367,7 @@ HWTEST_F(AbilityMgrTest, testWantParseUri, Function | MediumTest | Level0)
Want
want
=
{
nullptr
};
Want
want
=
{
nullptr
};
ElementName
element
=
{
nullptr
};
ElementName
element
=
{
nullptr
};
SetElementDeviceID
(
&
element
,
"0001000"
);
SetElementDeviceID
(
&
element
,
"0001000"
);
SetElementBundleName
(
&
element
,
"com.
huawei
.testnative"
);
SetElementBundleName
(
&
element
,
"com.
openharmony
.testnative"
);
SetElementAbilityName
(
&
element
,
"SecondAbility"
);
SetElementAbilityName
(
&
element
,
"SecondAbility"
);
if
(
element
.
abilityName
!=
nullptr
)
{
if
(
element
.
abilityName
!=
nullptr
)
{
bool
setResult
=
SetWantElement
(
&
want
,
element
);
bool
setResult
=
SetWantElement
(
&
want
,
element
);
...
@@ -446,7 +446,7 @@ HWTEST_F(AbilityMgrTest, testGetBundleNameIllegal, Function | MediumTest | Level
...
@@ -446,7 +446,7 @@ HWTEST_F(AbilityMgrTest, testGetBundleNameIllegal, Function | MediumTest | Level
memset_s
(
&
want
,
sizeof
(
Want
),
0
,
sizeof
(
Want
));
memset_s
(
&
want
,
sizeof
(
Want
),
0
,
sizeof
(
Want
));
ElementName
element
;
ElementName
element
;
memset_s
(
&
element
,
sizeof
(
ElementName
),
0
,
sizeof
(
ElementName
));
memset_s
(
&
element
,
sizeof
(
ElementName
),
0
,
sizeof
(
ElementName
));
SetElementBundleName
(
&
element
,
"com.
huawei
.testnative"
);
SetElementBundleName
(
&
element
,
"com.
openharmony
.testnative"
);
SetElementAbilityName
(
&
element
,
"SecondAbility"
);
SetElementAbilityName
(
&
element
,
"SecondAbility"
);
SetWantElement
(
&
want
,
element
);
SetWantElement
(
&
want
,
element
);
int
result
=
StartAbility
(
&
want
);
int
result
=
StartAbility
(
&
want
);
...
@@ -468,7 +468,7 @@ HWTEST_F(AbilityMgrTest, testGetSrcPathIllegal, Function | MediumTest | Level1)
...
@@ -468,7 +468,7 @@ HWTEST_F(AbilityMgrTest, testGetSrcPathIllegal, Function | MediumTest | Level1)
printf
(
"------start testGetSrcPathIllegal------
\n
"
);
printf
(
"------start testGetSrcPathIllegal------
\n
"
);
Want
want
=
{
nullptr
};
Want
want
=
{
nullptr
};
ElementName
element
=
{
nullptr
};
ElementName
element
=
{
nullptr
};
SetElementBundleName
(
&
element
,
"com.
huawei
.testnative"
);
SetElementBundleName
(
&
element
,
"com.
openharmony
.testnative"
);
SetElementAbilityName
(
&
element
,
"SecondAbility"
);
SetElementAbilityName
(
&
element
,
"SecondAbility"
);
SetWantElement
(
&
want
,
element
);
SetWantElement
(
&
want
,
element
);
int
result
=
StartAbility
(
&
want
);
int
result
=
StartAbility
(
&
want
);
...
@@ -489,7 +489,7 @@ HWTEST_F(AbilityMgrTest, testGetDataPathIllegal, Function | MediumTest | Level1)
...
@@ -489,7 +489,7 @@ HWTEST_F(AbilityMgrTest, testGetDataPathIllegal, Function | MediumTest | Level1)
printf
(
"------start testGetDataPathIllegal------
\n
"
);
printf
(
"------start testGetDataPathIllegal------
\n
"
);
Want
want
=
{
nullptr
};
Want
want
=
{
nullptr
};
ElementName
element
=
{
nullptr
};
ElementName
element
=
{
nullptr
};
SetElementBundleName
(
&
element
,
"com.
huawei
.testnative"
);
SetElementBundleName
(
&
element
,
"com.
openharmony
.testnative"
);
SetElementAbilityName
(
&
element
,
"SecondAbility"
);
SetElementAbilityName
(
&
element
,
"SecondAbility"
);
SetWantElement
(
&
want
,
element
);
SetWantElement
(
&
want
,
element
);
int
result
=
StartAbility
(
&
want
);
int
result
=
StartAbility
(
&
want
);
...
@@ -513,7 +513,7 @@ HWTEST_F(AbilityMgrTest, testDumpIllegal, Function | MediumTest | Level1)
...
@@ -513,7 +513,7 @@ HWTEST_F(AbilityMgrTest, testDumpIllegal, Function | MediumTest | Level1)
memset_s
(
&
want
,
sizeof
(
Want
),
0
,
sizeof
(
Want
));
memset_s
(
&
want
,
sizeof
(
Want
),
0
,
sizeof
(
Want
));
ElementName
element
;
ElementName
element
;
memset_s
(
&
element
,
sizeof
(
ElementName
),
0
,
sizeof
(
ElementName
));
memset_s
(
&
element
,
sizeof
(
ElementName
),
0
,
sizeof
(
ElementName
));
SetElementBundleName
(
&
element
,
"com.
huawei
.testnative"
);
SetElementBundleName
(
&
element
,
"com.
openharmony
.testnative"
);
SetElementAbilityName
(
&
element
,
"SecondAbility"
);
SetElementAbilityName
(
&
element
,
"SecondAbility"
);
SetWantElement
(
&
want
,
element
);
SetWantElement
(
&
want
,
element
);
Ability
*
ability
=
new
Ability
();
Ability
*
ability
=
new
Ability
();
...
@@ -536,7 +536,7 @@ HWTEST_F(AbilityMgrTest, testStartAbility, Function | MediumTest | Level1)
...
@@ -536,7 +536,7 @@ HWTEST_F(AbilityMgrTest, testStartAbility, Function | MediumTest | Level1)
printf
(
"------start testStartAbility------
\n
"
);
printf
(
"------start testStartAbility------
\n
"
);
Want
want
=
{
nullptr
};
Want
want
=
{
nullptr
};
ElementName
element
=
{
nullptr
};
ElementName
element
=
{
nullptr
};
SetElementBundleName
(
&
element
,
"com.
huawei
.testnative"
);
SetElementBundleName
(
&
element
,
"com.
openharmony
.testnative"
);
SetElementAbilityName
(
&
element
,
"MainAbility"
);
SetElementAbilityName
(
&
element
,
"MainAbility"
);
SetWantElement
(
&
want
,
element
);
SetWantElement
(
&
want
,
element
);
int
result
=
StartAbility
(
&
want
);
int
result
=
StartAbility
(
&
want
);
...
@@ -573,7 +573,7 @@ HWTEST_F(AbilityMgrTest, testStopAbility, Function | MediumTest | Level0)
...
@@ -573,7 +573,7 @@ HWTEST_F(AbilityMgrTest, testStopAbility, Function | MediumTest | Level0)
printf
(
"------start testStopAbility------
\n
"
);
printf
(
"------start testStopAbility------
\n
"
);
Want
want
=
{
nullptr
};
Want
want
=
{
nullptr
};
ElementName
element
=
{
nullptr
};
ElementName
element
=
{
nullptr
};
SetElementBundleName
(
&
element
,
"com.
huawei
.testnative"
);
SetElementBundleName
(
&
element
,
"com.
openharmony
.testnative"
);
SetElementAbilityName
(
&
element
,
"ServiceAbility"
);
SetElementAbilityName
(
&
element
,
"ServiceAbility"
);
SetWantElement
(
&
want
,
element
);
SetWantElement
(
&
want
,
element
);
g_errorCode
=
StartAbility
(
&
want
);
g_errorCode
=
StartAbility
(
&
want
);
...
@@ -613,7 +613,7 @@ HWTEST_F(AbilityMgrTest, testConnectAbility, Function | MediumTest | Level1)
...
@@ -613,7 +613,7 @@ HWTEST_F(AbilityMgrTest, testConnectAbility, Function | MediumTest | Level1)
printf
(
"------start testConnectAbility------
\n
"
);
printf
(
"------start testConnectAbility------
\n
"
);
Want
want
=
{
nullptr
};
Want
want
=
{
nullptr
};
ElementName
element
=
{
nullptr
};
ElementName
element
=
{
nullptr
};
SetElementBundleName
(
&
element
,
"com.
huawei
.testnative"
);
SetElementBundleName
(
&
element
,
"com.
openharmony
.testnative"
);
SetElementAbilityName
(
&
element
,
"ServiceAbility"
);
SetElementAbilityName
(
&
element
,
"ServiceAbility"
);
SetWantElement
(
&
want
,
element
);
SetWantElement
(
&
want
,
element
);
sem_init
(
&
g_sem
,
0
,
0
);
sem_init
(
&
g_sem
,
0
,
0
);
...
@@ -644,7 +644,7 @@ HWTEST_F(AbilityMgrTest, testDisConnectAbility, Function | MediumTest | Level1)
...
@@ -644,7 +644,7 @@ HWTEST_F(AbilityMgrTest, testDisConnectAbility, Function | MediumTest | Level1)
printf
(
"------start testDisConnectAbility------
\n
"
);
printf
(
"------start testDisConnectAbility------
\n
"
);
Want
want
=
{
nullptr
};
Want
want
=
{
nullptr
};
ElementName
element
=
{
nullptr
};
ElementName
element
=
{
nullptr
};
SetElementBundleName
(
&
element
,
"com.
huawei
.testnative"
);
SetElementBundleName
(
&
element
,
"com.
openharmony
.testnative"
);
SetElementAbilityName
(
&
element
,
"ServiceAbility"
);
SetElementAbilityName
(
&
element
,
"ServiceAbility"
);
SetWantElement
(
&
want
,
element
);
SetWantElement
(
&
want
,
element
);
sem_init
(
&
g_sem
,
0
,
0
);
sem_init
(
&
g_sem
,
0
,
0
);
...
@@ -677,7 +677,7 @@ HWTEST_F(AbilityMgrTest, testConnectAbilityIllegal, Function | MediumTest | Leve
...
@@ -677,7 +677,7 @@ HWTEST_F(AbilityMgrTest, testConnectAbilityIllegal, Function | MediumTest | Leve
printf
(
"------start testConnectAbilityIllegal------
\n
"
);
printf
(
"------start testConnectAbilityIllegal------
\n
"
);
Want
want
=
{
nullptr
};
Want
want
=
{
nullptr
};
ElementName
element
=
{
nullptr
};
ElementName
element
=
{
nullptr
};
SetElementBundleName
(
&
element
,
"com.
huawei
.testnative"
);
SetElementBundleName
(
&
element
,
"com.
openharmony
.testnative"
);
SetElementAbilityName
(
&
element
,
"ServiceAbility"
);
SetElementAbilityName
(
&
element
,
"ServiceAbility"
);
SetWantElement
(
&
want
,
element
);
SetWantElement
(
&
want
,
element
);
g_errorCode
=
ConnectAbility
(
nullptr
,
&
g_conn
,
this
);
g_errorCode
=
ConnectAbility
(
nullptr
,
&
g_conn
,
this
);
...
@@ -701,7 +701,7 @@ HWTEST_F(AbilityMgrTest, testDisConnectAbilityIllegal, Function | MediumTest | L
...
@@ -701,7 +701,7 @@ HWTEST_F(AbilityMgrTest, testDisConnectAbilityIllegal, Function | MediumTest | L
printf
(
"------start testDisConnectAbilityIllegal------
\n
"
);
printf
(
"------start testDisConnectAbilityIllegal------
\n
"
);
Want
want
=
{
nullptr
};
Want
want
=
{
nullptr
};
ElementName
element
=
{
nullptr
};
ElementName
element
=
{
nullptr
};
SetElementBundleName
(
&
element
,
"com.
huawei
.testnative"
);
SetElementBundleName
(
&
element
,
"com.
openharmony
.testnative"
);
SetElementAbilityName
(
&
element
,
"ServiceAbility"
);
SetElementAbilityName
(
&
element
,
"ServiceAbility"
);
SetWantElement
(
&
want
,
element
);
SetWantElement
(
&
want
,
element
);
sem_init
(
&
g_sem
,
0
,
0
);
sem_init
(
&
g_sem
,
0
,
0
);
...
@@ -733,7 +733,7 @@ HWTEST_F(AbilityMgrTest, testTerminateAbility, Function | MediumTest | Level1)
...
@@ -733,7 +733,7 @@ HWTEST_F(AbilityMgrTest, testTerminateAbility, Function | MediumTest | Level1)
printf
(
"------start testTerminateAbility------
\n
"
);
printf
(
"------start testTerminateAbility------
\n
"
);
Want
want
=
{
nullptr
};
Want
want
=
{
nullptr
};
ElementName
element
=
{
nullptr
};
ElementName
element
=
{
nullptr
};
SetElementBundleName
(
&
element
,
"com.
huawei
.testnative"
);
SetElementBundleName
(
&
element
,
"com.
openharmony
.testnative"
);
SetElementAbilityName
(
&
element
,
"SecondAbility"
);
SetElementAbilityName
(
&
element
,
"SecondAbility"
);
SetWantElement
(
&
want
,
element
);
SetWantElement
(
&
want
,
element
);
int
result1
=
StartAbility
(
&
want
);
int
result1
=
StartAbility
(
&
want
);
...
@@ -764,7 +764,7 @@ HWTEST_F(AbilityMgrTest, testWantMatchBundle, Function | MediumTest | Level1)
...
@@ -764,7 +764,7 @@ HWTEST_F(AbilityMgrTest, testWantMatchBundle, Function | MediumTest | Level1)
ElementName
element
;
ElementName
element
;
memset_s
(
&
element
,
sizeof
(
ElementName
),
0
,
sizeof
(
ElementName
));
memset_s
(
&
element
,
sizeof
(
ElementName
),
0
,
sizeof
(
ElementName
));
SetElementAbilityName
(
&
element
,
"MainAbility"
);
SetElementAbilityName
(
&
element
,
"MainAbility"
);
SetElementBundleName
(
&
element
,
"com.
huawei
.testnative"
);
SetElementBundleName
(
&
element
,
"com.
openharmony
.testnative"
);
SetElementDeviceID
(
&
element
,
""
);
SetElementDeviceID
(
&
element
,
""
);
SetWantElement
(
&
want
,
element
);
SetWantElement
(
&
want
,
element
);
AbilityInfo
abilityInfo
;
AbilityInfo
abilityInfo
;
...
@@ -800,7 +800,7 @@ HWTEST_F(AbilityMgrTest, testWantNotMathBundle, Function | MediumTest | Level2)
...
@@ -800,7 +800,7 @@ HWTEST_F(AbilityMgrTest, testWantNotMathBundle, Function | MediumTest | Level2)
std
::
string
aName
=
"NoThisAbility"
;
std
::
string
aName
=
"NoThisAbility"
;
memset_s
(
&
element
,
sizeof
(
ElementName
),
0
,
sizeof
(
ElementName
));
memset_s
(
&
element
,
sizeof
(
ElementName
),
0
,
sizeof
(
ElementName
));
SetElementAbilityName
(
&
element
,
aName
.
c_str
());
SetElementAbilityName
(
&
element
,
aName
.
c_str
());
SetElementBundleName
(
&
element
,
"com.
huawei
.nothishap"
);
SetElementBundleName
(
&
element
,
"com.
openharmony
.nothishap"
);
SetWantElement
(
&
want
,
element
);
SetWantElement
(
&
want
,
element
);
AbilityInfo
abilityInfo
;
AbilityInfo
abilityInfo
;
memset_s
(
&
abilityInfo
,
sizeof
(
AbilityInfo
),
0
,
sizeof
(
AbilityInfo
));
memset_s
(
&
abilityInfo
,
sizeof
(
AbilityInfo
),
0
,
sizeof
(
AbilityInfo
));
...
@@ -829,7 +829,7 @@ HWTEST_F(AbilityMgrTest, testWantOnlyMathBundleName, Function | MediumTest | Lev
...
@@ -829,7 +829,7 @@ HWTEST_F(AbilityMgrTest, testWantOnlyMathBundleName, Function | MediumTest | Lev
std
::
string
aName
=
"Ability"
;
std
::
string
aName
=
"Ability"
;
memset_s
(
&
element
,
sizeof
(
ElementName
),
0
,
sizeof
(
ElementName
));
memset_s
(
&
element
,
sizeof
(
ElementName
),
0
,
sizeof
(
ElementName
));
SetElementAbilityName
(
&
element
,
aName
.
c_str
());
SetElementAbilityName
(
&
element
,
aName
.
c_str
());
SetElementBundleName
(
&
element
,
"com.
huawei
.testnative"
);
SetElementBundleName
(
&
element
,
"com.
openharmony
.testnative"
);
SetWantElement
(
&
want
,
element
);
SetWantElement
(
&
want
,
element
);
AbilityInfo
abilityInfo
;
AbilityInfo
abilityInfo
;
memset_s
(
&
abilityInfo
,
sizeof
(
AbilityInfo
),
0
,
sizeof
(
AbilityInfo
));
memset_s
(
&
abilityInfo
,
sizeof
(
AbilityInfo
),
0
,
sizeof
(
AbilityInfo
));
...
@@ -858,7 +858,7 @@ HWTEST_F(AbilityMgrTest, testWantOnlyMathAbility, Function | MediumTest | Level1
...
@@ -858,7 +858,7 @@ HWTEST_F(AbilityMgrTest, testWantOnlyMathAbility, Function | MediumTest | Level1
std
::
string
aName
=
"MainAbility"
;
std
::
string
aName
=
"MainAbility"
;
memset_s
(
&
element
,
sizeof
(
ElementName
),
0
,
sizeof
(
ElementName
));
memset_s
(
&
element
,
sizeof
(
ElementName
),
0
,
sizeof
(
ElementName
));
SetElementAbilityName
(
&
element
,
aName
.
c_str
());
SetElementAbilityName
(
&
element
,
aName
.
c_str
());
SetElementBundleName
(
&
element
,
"com.
huawei
.test"
);
SetElementBundleName
(
&
element
,
"com.
openharmony
.test"
);
SetWantElement
(
&
want
,
element
);
SetWantElement
(
&
want
,
element
);
AbilityInfo
abilityInfo
;
AbilityInfo
abilityInfo
;
memset_s
(
&
abilityInfo
,
sizeof
(
AbilityInfo
),
0
,
sizeof
(
AbilityInfo
));
memset_s
(
&
abilityInfo
,
sizeof
(
AbilityInfo
),
0
,
sizeof
(
AbilityInfo
));
...
@@ -886,7 +886,7 @@ HWTEST_F(AbilityMgrTest, testWantDataMatchLength, Function | MediumTest | Level1
...
@@ -886,7 +886,7 @@ HWTEST_F(AbilityMgrTest, testWantDataMatchLength, Function | MediumTest | Level1
ElementName
element
;
ElementName
element
;
memset_s
(
&
element
,
sizeof
(
ElementName
),
0
,
sizeof
(
ElementName
));
memset_s
(
&
element
,
sizeof
(
ElementName
),
0
,
sizeof
(
ElementName
));
SetElementAbilityName
(
&
element
,
"MainAbility"
);
SetElementAbilityName
(
&
element
,
"MainAbility"
);
SetElementBundleName
(
&
element
,
"com.
huawei
.testnative"
);
SetElementBundleName
(
&
element
,
"com.
openharmony
.testnative"
);
SetWantElement
(
&
want
,
element
);
SetWantElement
(
&
want
,
element
);
SetWantData
(
&
want
,
"test"
,
5
);
SetWantData
(
&
want
,
"test"
,
5
);
AbilityInfo
abilityInfo
;
AbilityInfo
abilityInfo
;
...
@@ -919,7 +919,7 @@ HWTEST_F(AbilityMgrTest, testWantDataNotMatchLength, Function | MediumTest | Lev
...
@@ -919,7 +919,7 @@ HWTEST_F(AbilityMgrTest, testWantDataNotMatchLength, Function | MediumTest | Lev
ElementName
element
;
ElementName
element
;
memset_s
(
&
element
,
sizeof
(
ElementName
),
0
,
sizeof
(
ElementName
));
memset_s
(
&
element
,
sizeof
(
ElementName
),
0
,
sizeof
(
ElementName
));
SetElementAbilityName
(
&
element
,
"SecondAbility"
);
SetElementAbilityName
(
&
element
,
"SecondAbility"
);
SetElementBundleName
(
&
element
,
"com.
huawei
.testnative"
);
SetElementBundleName
(
&
element
,
"com.
openharmony
.testnative"
);
SetWantElement
(
&
want
,
element
);
SetWantElement
(
&
want
,
element
);
SetWantData
(
&
want
,
"test"
,
3
);
SetWantData
(
&
want
,
"test"
,
3
);
int
result
=
StartAbility
(
&
want
);
int
result
=
StartAbility
(
&
want
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录