Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
e3341345
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看板
提交
e3341345
编写于
3月 09, 2022
作者:
D
dy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix assert
Signed-off-by:
N
dy
<
dingyao5@huawei.com
>
上级
a2076d67
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
70 addition
and
22 deletion
+70
-22
aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/getAbilityInfoJsunit.test.ets
...c/main/ets/MainAbility/test/getAbilityInfoJsunit.test.ets
+31
-5
aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/getHapModuleInfoJsunit.test.ets
...main/ets/MainAbility/test/getHapModuleInfoJsunit.test.ets
+4
-6
aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility2/test/getAbilityInfoJsunit2.test.ets
...main/ets/MainAbility2/test/getAbilityInfoJsunit2.test.ets
+31
-5
aafwk/aafwk_standard/actsabilitymanageretstest/myapplication1/src/main/ets/MainAbility/test/getHapModuleInfoJsunit_app1.test.ets
...ets/MainAbility/test/getHapModuleInfoJsunit_app1.test.ets
+4
-6
未找到文件。
aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/getAbilityInfoJsunit.test.ets
浏览文件 @
e3341345
...
@@ -291,13 +291,39 @@ export default function getHapModuleInfoJsunit() {
...
@@ -291,13 +291,39 @@ export default function getHapModuleInfoJsunit() {
expect
(
info
.
icon
)
.
assertEqual
(
"
$media
:icon"
);
expect
(
info
.
icon
)
.
assertEqual
(
"
$media
:icon"
);
expect
(
info
.
process
)
.
assertEqual
(
""
);
expect
(
info
.
process
)
.
assertEqual
(
""
);
expect
(
info
.
supportedModes
)
.
assertEqual
(
0
);
expect
(
info
.
supportedModes
)
.
assertEqual
(
0
);
expect
(
info
.
moduleSourceDirs
[
0
])
.
assertEqual
(
"/data/app/el1/bundle/public/"
+
"com.ohos.acecollaboration/com.ohos.acecollaboration"
);
expect
(
info
.
moduleInfos
[
0
]
.
moduleName
)
.
assertEqual
(
"entry"
);
expect
(
info
.
moduleInfos
[
0
]
.
moduleSourceDir
)
.
assertEqual
(
"/data/app/el1/bundle/public/"
+
"com.ohos.acecollaboration/com.ohos.acecollaboration"
);
expect
(
info
.
entryDir
)
.
assertEqual
(
"/data/app/el1/bundle/public/"
+
expect
(
info
.
entryDir
)
.
assertEqual
(
"/data/app/el1/bundle/public/"
+
"com.ohos.acecollaboration/com.ohos.acecollaboration"
);
"com.ohos.acecollaboration/com.ohos.acecollaboration"
);
if
(
info
.
moduleSourceDirs
.
length
==
1
){
expect
(
info
.
moduleInfos
[
0
]
.
moduleName
)
.
assertEqual
(
"entry"
);
expect
(
info
.
moduleInfos
[
0
]
.
moduleSourceDir
)
.
assertEqual
(
"/data/app/el1/bundle/public/"
+
"com.ohos.acecollaboration/com.ohos.acecollaboration"
);
}
else
if
(
info
.
moduleSourceDirs
.
length
==
2
)
{
if
(
info
.
moduleInfos
[
0
]
.
moduleName
==
"myapplication1"
)
{
expect
(
info
.
moduleInfos
[
0
]
.
moduleName
)
.
assertEqual
(
"myapplication1"
);
expect
(
info
.
moduleInfos
[
0
]
.
moduleSourceDir
)
.
assertEqual
(
"/data/app/el1/bundle/public/"
+
"com.ohos.acecollaboration/com.example.myapplication1"
);
expect
(
info
.
moduleInfos
[
1
]
.
moduleName
)
.
assertEqual
(
"entry"
);
expect
(
info
.
moduleInfos
[
1
]
.
moduleSourceDir
)
.
assertEqual
(
"/data/app/el1/bundle/public/"
+
"com.ohos.acecollaboration/com.ohos.acecollaboration"
);
}
else
{
expect
(
info
.
moduleInfos
[
0
]
.
moduleName
)
.
assertEqual
(
"myapplication2"
);
expect
(
info
.
moduleInfos
[
0
]
.
moduleSourceDir
)
.
assertEqual
(
"/data/app/el1/bundle/public/"
+
"com.ohos.acecollaboration/com.example.myapplication2"
);
expect
(
info
.
moduleInfos
[
1
]
.
moduleName
)
.
assertEqual
(
"entry"
);
expect
(
info
.
moduleInfos
[
1
]
.
moduleSourceDir
)
.
assertEqual
(
"/data/app/el1/bundle/public/"
+
"com.ohos.acecollaboration/com.ohos.acecollaboration"
);
}
}
else
{
expect
(
info
.
moduleInfos
[
0
]
.
moduleName
)
.
assertEqual
(
"myapplication1"
);
expect
(
info
.
moduleInfos
[
0
]
.
moduleSourceDir
)
.
assertEqual
(
"/data/app/el1/bundle/public/"
+
"com.ohos.acecollaboration/com.example.myapplication1"
);
expect
(
info
.
moduleInfos
[
1
]
.
moduleName
)
.
assertEqual
(
"myapplication2"
);
expect
(
info
.
moduleInfos
[
1
]
.
moduleSourceDir
)
.
assertEqual
(
"/data/app/el1/bundle/public/"
+
"com.ohos.acecollaboration/com.example.myapplication2"
);
expect
(
info
.
moduleInfos
[
2
]
.
moduleName
)
.
assertEqual
(
"entry"
);
expect
(
info
.
moduleInfos
[
2
]
.
moduleSourceDir
)
.
assertEqual
(
"/data/app/el1/bundle/public/"
+
"com.ohos.acecollaboration/com.ohos.acecollaboration"
);
}
console
.
log
(
msg
+
"---checkApplicationInfo End--- "
);
console
.
log
(
msg
+
"---checkApplicationInfo End--- "
);
...
...
aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/getHapModuleInfoJsunit.test.ets
浏览文件 @
e3341345
...
@@ -233,8 +233,8 @@ export default function getHapModuleInfoJsunit() {
...
@@ -233,8 +233,8 @@ export default function getHapModuleInfoJsunit() {
expect(data.label).assertEqual("$string:entry_MainAbility");
expect(data.label).assertEqual("$string:entry_MainAbility");
expect(data.description).assertEqual("$string:mainability_description");
expect(data.description).assertEqual("$string:mainability_description");
expect(data.icon).assertEqual("$media:icon");
expect(data.icon).assertEqual("$media:icon");
expect(data.descriptionId
).assertEqual(16777220
);
expect(data.descriptionId
> 0).assertTrue(
);
expect(data.iconId
).assertEqual(16777221
);
expect(data.iconId
> 0).assertTrue(
);
expect(data.moduleName).assertEqual("entry");
expect(data.moduleName).assertEqual("entry");
expect(data.process).assertEqual("");
expect(data.process).assertEqual("");
expect(data.targetAbility).assertEqual("");
expect(data.targetAbility).assertEqual("");
...
@@ -254,7 +254,7 @@ export default function getHapModuleInfoJsunit() {
...
@@ -254,7 +254,7 @@ export default function getHapModuleInfoJsunit() {
expect(data.minFormWidth).assertEqual(0);
expect(data.minFormWidth).assertEqual(0);
expect(data.defaultFormWidth).assertEqual(0);
expect(data.defaultFormWidth).assertEqual(0);
expect(data.uri).assertEqual("");
expect(data.uri).assertEqual("");
expect(data.labelId
).assertEqual(16777218
);
expect(data.labelId
> 0).assertTrue(
);
expect(data.subType).assertEqual(0);
expect(data.subType).assertEqual(0);
console.log(msg+ "---checkAbilityInfo End--- ");
console.log(msg+ "---checkAbilityInfo End--- ");
}
}
...
@@ -337,13 +337,11 @@ export default function getHapModuleInfoJsunit() {
...
@@ -337,13 +337,11 @@ export default function getHapModuleInfoJsunit() {
}
}
expect(info.name).assertEqual("com.ohos.acecollaboration");
expect(info.name).assertEqual("com.ohos.acecollaboration");
expect(info.description).assertEqual("$string:mainability_description");
expect(info.description).assertEqual("$string:mainability_description");
expect(info.descriptionId
).assertEqual(16777220
);
expect(info.descriptionId
> 0).assertTrue(
);
expect(info.systemApp).assertEqual(true);
expect(info.systemApp).assertEqual(true);
expect(info.enabled).assertEqual(true);
expect(info.enabled).assertEqual(true);
expect(info.label).assertEqual("$string:entry_MainAbility");
expect(info.label).assertEqual("$string:entry_MainAbility");
expect(info.labelId).assertEqual("16777218");
expect(info.icon).assertEqual("$media:icon");
expect(info.icon).assertEqual("$media:icon");
expect(info.iconId).assertEqual("16777221");
expect(info.process).assertEqual("");
expect(info.process).assertEqual("");
expect(info.supportedModes).assertEqual(0);
expect(info.supportedModes).assertEqual(0);
expect(info.entryDir).assertEqual("/data/app/el1/bundle/public/" +
expect(info.entryDir).assertEqual("/data/app/el1/bundle/public/" +
...
...
aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility2/test/getAbilityInfoJsunit2.test.ets
浏览文件 @
e3341345
...
@@ -206,13 +206,39 @@ export default function getAbilityInfoJsunit() {
...
@@ -206,13 +206,39 @@ export default function getAbilityInfoJsunit() {
expect(info.icon).assertEqual("$media:icon");
expect(info.icon).assertEqual("$media:icon");
expect(info.process).assertEqual("");
expect(info.process).assertEqual("");
expect(info.supportedModes).assertEqual(0);
expect(info.supportedModes).assertEqual(0);
expect(info.moduleSourceDirs[0]).assertEqual("/data/app/el1/bundle/public/" +
"com.ohos.acecollaboration/com.ohos.acecollaboration");
expect(info.moduleInfos[0].moduleName).assertEqual("entry");
expect(info.moduleInfos[0].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
"com.ohos.acecollaboration/com.ohos.acecollaboration");
expect(info.entryDir).assertEqual("/data/app/el1/bundle/public/" +
expect(info.entryDir).assertEqual("/data/app/el1/bundle/public/" +
"com.ohos.acecollaboration/com.ohos.acecollaboration");
"com.ohos.acecollaboration/com.ohos.acecollaboration");
if (info.moduleSourceDirs.length == 1){
expect(info.moduleInfos[0].moduleName).assertEqual("entry");
expect(info.moduleInfos[0].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
"com.ohos.acecollaboration/com.ohos.acecollaboration");
}else if(info.moduleSourceDirs.length == 2) {
if (info.moduleInfos[0].moduleName == "myapplication1") {
expect(info.moduleInfos[0].moduleName).assertEqual("myapplication1");
expect(info.moduleInfos[0].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
"com.ohos.acecollaboration/com.example.myapplication1");
expect(info.moduleInfos[1].moduleName).assertEqual("entry");
expect(info.moduleInfos[1].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
"com.ohos.acecollaboration/com.ohos.acecollaboration");
}else{
expect(info.moduleInfos[0].moduleName).assertEqual("myapplication2");
expect(info.moduleInfos[0].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
"com.ohos.acecollaboration/com.example.myapplication2");
expect(info.moduleInfos[1].moduleName).assertEqual("entry");
expect(info.moduleInfos[1].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
"com.ohos.acecollaboration/com.ohos.acecollaboration");
}
}else {
expect(info.moduleInfos[0].moduleName).assertEqual("myapplication1");
expect(info.moduleInfos[0].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
"com.ohos.acecollaboration/com.example.myapplication1");
expect(info.moduleInfos[1].moduleName).assertEqual("myapplication2");
expect(info.moduleInfos[1].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
"com.ohos.acecollaboration/com.example.myapplication2");
expect(info.moduleInfos[2].moduleName).assertEqual("entry");
expect(info.moduleInfos[2].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
"com.ohos.acecollaboration/com.ohos.acecollaboration");
}
console.log(msg+ "---checkApplicationInfo End--- ");
console.log(msg+ "---checkApplicationInfo End--- ");
}
}
})
})
...
...
aafwk/aafwk_standard/actsabilitymanageretstest/myapplication1/src/main/ets/MainAbility/test/getHapModuleInfoJsunit_app1.test.ets
浏览文件 @
e3341345
...
@@ -183,8 +183,8 @@ export default function getHapModuleInfoJsunit() {
...
@@ -183,8 +183,8 @@ export default function getHapModuleInfoJsunit() {
expect(data.label).assertEqual("$string:myapplication1_MainAbility");
expect(data.label).assertEqual("$string:myapplication1_MainAbility");
expect(data.description).assertEqual("$string:description_mainability");
expect(data.description).assertEqual("$string:description_mainability");
expect(data.icon).assertEqual("$media:icon");
expect(data.icon).assertEqual("$media:icon");
expect(data.descriptionId
).assertEqual(16777220
);
expect(data.descriptionId
> 0).assertTrue(
);
expect(data.iconId
).assertEqual(16777221
);
expect(data.iconId
> 0).assertTrue(
);
expect(data.moduleName).assertEqual("myapplication1");
expect(data.moduleName).assertEqual("myapplication1");
expect(data.process).assertEqual("");
expect(data.process).assertEqual("");
expect(data.targetAbility).assertEqual("");
expect(data.targetAbility).assertEqual("");
...
@@ -204,7 +204,7 @@ export default function getHapModuleInfoJsunit() {
...
@@ -204,7 +204,7 @@ export default function getHapModuleInfoJsunit() {
expect(data.minFormWidth).assertEqual(0);
expect(data.minFormWidth).assertEqual(0);
expect(data.defaultFormWidth).assertEqual(0);
expect(data.defaultFormWidth).assertEqual(0);
expect(data.uri).assertEqual("");
expect(data.uri).assertEqual("");
expect(data.labelId
).assertEqual(16777218
);
expect(data.labelId
> 0).assertTrue(
);
expect(data.subType).assertEqual(0);
expect(data.subType).assertEqual(0);
console.log(msg+ "---checkAbilityInfo End--- ");
console.log(msg+ "---checkAbilityInfo End--- ");
}
}
...
@@ -254,13 +254,11 @@ export default function getHapModuleInfoJsunit() {
...
@@ -254,13 +254,11 @@ export default function getHapModuleInfoJsunit() {
expect(typeof (info.entryDir)).assertEqual("string");
expect(typeof (info.entryDir)).assertEqual("string");
expect(info.name).assertEqual("com.ohos.acecollaboration");
expect(info.name).assertEqual("com.ohos.acecollaboration");
expect(info.description).assertEqual("$string:mainability_description");
expect(info.description).assertEqual("$string:mainability_description");
expect(info.descriptionId
).assertEqual(16777220
);
expect(info.descriptionId
> 0).assertTrue(
);
expect(info.systemApp).assertEqual(true);
expect(info.systemApp).assertEqual(true);
expect(info.enabled).assertEqual(true);
expect(info.enabled).assertEqual(true);
expect(info.label).assertEqual("$string:entry_MainAbility");
expect(info.label).assertEqual("$string:entry_MainAbility");
expect(info.labelId).assertEqual("16777218");
expect(info.icon).assertEqual("$media:icon");
expect(info.icon).assertEqual("$media:icon");
expect(info.iconId).assertEqual("16777221");
expect(info.process).assertEqual("");
expect(info.process).assertEqual("");
expect(info.supportedModes).assertEqual(0);
expect(info.supportedModes).assertEqual(0);
if (info.moduleSourceDirs.length == 1){
if (info.moduleSourceDirs.length == 1){
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录