Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
9e771027
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看板
提交
9e771027
编写于
9月 29, 2022
作者:
X
xinxin13
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix
Signed-off-by:
N
xinxin13
<
xinxin13@huawei.com
>
上级
59436bb7
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
45 addition
and
49 deletion
+45
-49
bundlemanager/bundle_standard/bundlemanager/actsbmsetsmodulenametest/entry/src/main/ets/test/ActsBmsEtsModuleNameTest.test.ets
...entry/src/main/ets/test/ActsBmsEtsModuleNameTest.test.ets
+5
-5
bundlemanager/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/test/ActsBmsEtsUnPermissionTest.test.ets
...try/src/main/ets/test/ActsBmsEtsUnPermissionTest.test.ets
+2
-2
bundlemanager/bundle_standard/bundlemanager/actsbmsjsunpermissiontest/src/main/js/test/ActsBmsJsUnPermissionTest.test.js
...ontest/src/main/js/test/ActsBmsJsUnPermissionTest.test.js
+2
-2
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/GetResourceTest.test.ets
...retstest/entry/src/main/ets/test/GetResourceTest.test.ets
+2
-2
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/IsAbilityEnabledETSUnit.ets
...stest/entry/src/main/ets/test/IsAbilityEnabledETSUnit.ets
+12
-12
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/IsApplicationEnabledETSUnit.ets
...t/entry/src/main/ets/test/IsApplicationEnabledETSUnit.ets
+5
-5
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/getAllApplicationInfoJsunit.test.ets
...ry/src/main/ets/test/getAllApplicationInfoJsunit.test.ets
+7
-9
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/getApplicationInfoJsunit.test.ets
...entry/src/main/ets/test/getApplicationInfoJsunit.test.ets
+2
-4
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/getBundleArchiveInfo.test.ets
...est/entry/src/main/ets/test/getBundleArchiveInfo.test.ets
+4
-4
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagertest/src/main/js/test/ExampleJsunit.test.js
...sbundlemanagertest/src/main/js/test/ExampleJsunit.test.js
+3
-3
bundlemanager/zlib/actszipfileandunzipfiletest/src/main/js/test/actszipfileandunzipfiletest.test.js
...test/src/main/js/test/actszipfileandunzipfiletest.test.js
+1
-1
未找到文件。
bundlemanager/bundle_standard/bundlemanager/actsbmsetsmodulenametest/entry/src/main/ets/test/ActsBmsEtsModuleNameTest.test.ets
浏览文件 @
9e771027
...
@@ -295,7 +295,7 @@ export default function actsBmsJsModuleNameTest() {
...
@@ -295,7 +295,7 @@ export default function actsBmsJsModuleNameTest() {
expect(err).assertFail();
expect(err).assertFail();
});
});
bundle.isAbilityEnabled(abilityInfo, (err, data) => {
bundle.isAbilityEnabled(abilityInfo, (err, data) => {
expect(err).assertEqual(SUCCESS_CODE);
expect(err
.code
).assertEqual(SUCCESS_CODE);
if (err) {
if (err) {
console.error('[isAbilityEnabledEmptyModule]Operation failed. Err: ' + JSON.stringify(err));
console.error('[isAbilityEnabledEmptyModule]Operation failed. Err: ' + JSON.stringify(err));
}
}
...
@@ -324,7 +324,7 @@ export default function actsBmsJsModuleNameTest() {
...
@@ -324,7 +324,7 @@ export default function actsBmsJsModuleNameTest() {
if (err) {
if (err) {
console.error('[isAbilityEnabledInvalidModule]Operation failed. Err: ' + JSON.stringify(err));
console.error('[isAbilityEnabledInvalidModule]Operation failed. Err: ' + JSON.stringify(err));
}
}
expect(err).assertEqual(SUCCESS_CODE);
expect(err
.code
).assertEqual(SUCCESS_CODE);
console.info("'[isAbilityEnabledInvalidModule]Return data: " + JSON.stringify(data));
console.info("'[isAbilityEnabledInvalidModule]Return data: " + JSON.stringify(data));
done();
done();
});
});
...
@@ -346,7 +346,7 @@ export default function actsBmsJsModuleNameTest() {
...
@@ -346,7 +346,7 @@ export default function actsBmsJsModuleNameTest() {
expect(err).assertFail();
expect(err).assertFail();
});
});
bundle.isAbilityEnabled(abilityInfo, (err, data) => {
bundle.isAbilityEnabled(abilityInfo, (err, data) => {
expect(err).assertEqual(SUCCESS_CODE);
expect(err
.code
).assertEqual(SUCCESS_CODE);
if (err) {
if (err) {
console.error('[isAbilityEnabledHasModule]Operation failed. Err: ' + JSON.stringify(err));
console.error('[isAbilityEnabledHasModule]Operation failed. Err: ' + JSON.stringify(err));
}
}
...
@@ -368,14 +368,14 @@ export default function actsBmsJsModuleNameTest() {
...
@@ -368,14 +368,14 @@ export default function actsBmsJsModuleNameTest() {
expect(data).assertFail();
expect(data).assertFail();
}).catch((err) => {
}).catch((err) => {
console.error('[isAbilityEnabledUndefinedModule]Operation failed. Err: ' + JSON.stringify(err));
console.error('[isAbilityEnabledUndefinedModule]Operation failed. Err: ' + JSON.stringify(err));
expect(err).assertEqual(INVALID_PARAM);
expect(err
.code
).assertEqual(INVALID_PARAM);
});
});
bundle.isAbilityEnabled(abilityInfo, (err, data) => {
bundle.isAbilityEnabled(abilityInfo, (err, data) => {
expect(data).assertEqual(undefined);
expect(data).assertEqual(undefined);
if (err) {
if (err) {
console.error('[isAbilityEnabledUndefinedModule]Operation failed. Err: ' + JSON.stringify(err));
console.error('[isAbilityEnabledUndefinedModule]Operation failed. Err: ' + JSON.stringify(err));
}
}
expect(err).assertEqual(INVALID_PARAM);
expect(err
.code
).assertEqual(INVALID_PARAM);
console.info("'[isAbilityEnabledUndefinedModule]Return data: " + JSON.stringify(data));
console.info("'[isAbilityEnabledUndefinedModule]Return data: " + JSON.stringify(data));
done();
done();
});
});
...
...
bundlemanager/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/test/ActsBmsEtsUnPermissionTest.test.ets
浏览文件 @
9e771027
...
@@ -51,10 +51,10 @@ export default function actsBmsJsUnPermissionTest() {
...
@@ -51,10 +51,10 @@ export default function actsBmsJsUnPermissionTest() {
await
bundle
.
getAllApplicationInfo
(
DEFAULT_FLAG
)
.
then
(
data
=>
{
await
bundle
.
getAllApplicationInfo
(
DEFAULT_FLAG
)
.
then
(
data
=>
{
expect
()
.
assertFail
();
expect
()
.
assertFail
();
})
.
catch
(
err
=>
{
})
.
catch
(
err
=>
{
expect
(
err
)
.
assertEqual
(
INVALID_CODE
);
expect
(
err
.
code
)
.
assertEqual
(
INVALID_CODE
);
});
});
bundle
.
getAllApplicationInfo
(
DEFAULT_FLAG
,
(
err
,
data
)
=>
{
bundle
.
getAllApplicationInfo
(
DEFAULT_FLAG
,
(
err
,
data
)
=>
{
expect
(
err
)
.
assertEqual
(
INVALID_CODE
);
expect
(
err
.
code
)
.
assertEqual
(
INVALID_CODE
);
expect
(
data
)
.
assertEqual
(
undefined
);
expect
(
data
)
.
assertEqual
(
undefined
);
done
();
done
();
});
});
...
...
bundlemanager/bundle_standard/bundlemanager/actsbmsjsunpermissiontest/src/main/js/test/ActsBmsJsUnPermissionTest.test.js
浏览文件 @
9e771027
...
@@ -64,10 +64,10 @@ describe('ActsBmsJsUnPermissionTest', function () {
...
@@ -64,10 +64,10 @@ describe('ActsBmsJsUnPermissionTest', function () {
await
bundle
.
getAllApplicationInfo
(
DEFAULT_FLAG
,
userId
).
then
(
data
=>
{
await
bundle
.
getAllApplicationInfo
(
DEFAULT_FLAG
,
userId
).
then
(
data
=>
{
expect
().
assertFail
();
expect
().
assertFail
();
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
expect
(
err
).
assertEqual
(
INVALID_CODE
);
expect
(
err
.
code
).
assertEqual
(
INVALID_CODE
);
});
});
bundle
.
getAllApplicationInfo
(
DEFAULT_FLAG
,
userId
,
(
err
,
data
)
=>
{
bundle
.
getAllApplicationInfo
(
DEFAULT_FLAG
,
userId
,
(
err
,
data
)
=>
{
expect
(
err
).
assertEqual
(
INVALID_CODE
);
expect
(
err
.
code
).
assertEqual
(
INVALID_CODE
);
expect
(
data
).
assertEqual
(
undefined
);
expect
(
data
).
assertEqual
(
undefined
);
done
();
done
();
});
});
...
...
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/GetResourceTest.test.ets
浏览文件 @
9e771027
...
@@ -176,7 +176,7 @@ export default function GetResourceTest() {
...
@@ -176,7 +176,7 @@ export default function GetResourceTest() {
} else {
} else {
expect().assertFail();
expect().assertFail();
}
}
expect(err).assertEqual(0)
expect(err
.code
).assertEqual(0)
done();
done();
})
})
});
});
...
@@ -291,7 +291,7 @@ export default function GetResourceTest() {
...
@@ -291,7 +291,7 @@ export default function GetResourceTest() {
expect(applicationInfo.descriptionResource.bundleName).assertEqual(BUNDLE_NAME)
expect(applicationInfo.descriptionResource.bundleName).assertEqual(BUNDLE_NAME)
expect(applicationInfo.descriptionResource.moduleName).assertEqual(MODULE_NAME)
expect(applicationInfo.descriptionResource.moduleName).assertEqual(MODULE_NAME)
expect(applicationInfo.descriptionResource.id).assertLarger(0)
expect(applicationInfo.descriptionResource.id).assertLarger(0)
expect(err).assertEqual(0)
expect(err
.code
).assertEqual(0)
done();
done();
})
})
});
});
...
...
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/IsAbilityEnabledETSUnit.ets
浏览文件 @
9e771027
...
@@ -73,7 +73,7 @@ export default function isAbilityEnabledETSUnit() {
...
@@ -73,7 +73,7 @@ export default function isAbilityEnabledETSUnit() {
});
});
timeOldStamp = await Utils.getNowTime();
timeOldStamp = await Utils.getNowTime();
Bundle.isAbilityEnabled(abilityInfo, (error, data) => {
Bundle.isAbilityEnabled(abilityInfo, (error, data) => {
if (error) {
if (error
.code != 0
) {
expect(error).assertFail();
expect(error).assertFail();
}
}
let timeNewStamp = Utils.getNowTime();
let timeNewStamp = Utils.getNowTime();
...
@@ -114,16 +114,16 @@ export default function isAbilityEnabledETSUnit() {
...
@@ -114,16 +114,16 @@ export default function isAbilityEnabledETSUnit() {
expect(error).assertFail();
expect(error).assertFail();
});
});
Bundle.isAbilityEnabled(abilityInfo1, (error, data) => {
Bundle.isAbilityEnabled(abilityInfo1, (error, data) => {
expect(error).assertEqual(0);
expect(error
.code
).assertEqual(0);
expect(data).assertFalse();
expect(data).assertFalse();
Bundle.isAbilityEnabled(abilityInfo2, (error, data) => {
Bundle.isAbilityEnabled(abilityInfo2, (error, data) => {
expect(error).assertEqual(0);
expect(error
.code
).assertEqual(0);
expect(data).assertFalse();
expect(data).assertFalse();
Bundle.isAbilityEnabled(abilityInfo3, (error, data) => {
Bundle.isAbilityEnabled(abilityInfo3, (error, data) => {
expect(error).assertEqual(0);
expect(error
.code
).assertEqual(0);
expect(data).assertFalse();
expect(data).assertFalse();
Bundle.isAbilityEnabled(abilityInfo7, (error, data) => {
Bundle.isAbilityEnabled(abilityInfo7, (error, data) => {
expect(error).assertEqual(0);
expect(error
.code
).assertEqual(0);
expect(data).assertFalse();
expect(data).assertFalse();
done();
done();
});
});
...
@@ -144,26 +144,26 @@ export default function isAbilityEnabledETSUnit() {
...
@@ -144,26 +144,26 @@ export default function isAbilityEnabledETSUnit() {
Bundle.isAbilityEnabled(abilityInfo4).then((data) => {
Bundle.isAbilityEnabled(abilityInfo4).then((data) => {
expect(data).assertFail();
expect(data).assertFail();
}).catch((error) => {
}).catch((error) => {
expect(error).assertEqual(2);
expect(error
.code
).assertEqual(2);
});
});
Bundle.isAbilityEnabled(abilityInfo5).then((data) => {
Bundle.isAbilityEnabled(abilityInfo5).then((data) => {
expect(data).assertFail();
expect(data).assertFail();
}).catch((error) => {
}).catch((error) => {
expect(error).assertEqual(2);
expect(error
.code
).assertEqual(2);
});
});
Bundle.isAbilityEnabled(abilityInfo6).then((data) => {
Bundle.isAbilityEnabled(abilityInfo6).then((data) => {
expect(data).assertFail();
expect(data).assertFail();
}).catch((error) => {
}).catch((error) => {
expect(error).assertEqual(2);
expect(error
.code
).assertEqual(2);
});
});
Bundle.isAbilityEnabled(abilityInfo4, (error, data) => {
Bundle.isAbilityEnabled(abilityInfo4, (error, data) => {
expect(error).assertEqual(2);
expect(error
.code
).assertEqual(2);
expect(data).assertEqual(undefined);
expect(data).assertEqual(undefined);
Bundle.isAbilityEnabled(abilityInfo5, (error, data) => {
Bundle.isAbilityEnabled(abilityInfo5, (error, data) => {
expect(error).assertEqual(2);
expect(error
.code
).assertEqual(2);
expect(data).assertEqual(undefined);
expect(data).assertEqual(undefined);
Bundle.isAbilityEnabled(abilityInfo6, (error, data) => {
Bundle.isAbilityEnabled(abilityInfo6, (error, data) => {
expect(error).assertEqual(2);
expect(error
.code
).assertEqual(2);
expect(data).assertEqual(undefined);
expect(data).assertEqual(undefined);
done();
done();
});
});
...
@@ -184,7 +184,7 @@ export default function isAbilityEnabledETSUnit() {
...
@@ -184,7 +184,7 @@ export default function isAbilityEnabledETSUnit() {
expect(error).assertFail();
expect(error).assertFail();
});
});
Bundle.isAbilityEnabled(abilityInfo, (error, data) => {
Bundle.isAbilityEnabled(abilityInfo, (error, data) => {
expect(error).assertEqual(0);
expect(error
.code
).assertEqual(0);
expect(data).assertTrue();
expect(data).assertTrue();
done();
done();
});
});
...
...
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/IsApplicationEnabledETSUnit.ets
浏览文件 @
9e771027
...
@@ -42,7 +42,7 @@ export default function IsApplicationEnabledETSUnit() {
...
@@ -42,7 +42,7 @@ export default function IsApplicationEnabledETSUnit() {
Bundle.isApplicationEnabled(BUNDLE_NAME, (error, data) => {
Bundle.isApplicationEnabled(BUNDLE_NAME, (error, data) => {
let timeNewStamp = Utils.getNowTime();
let timeNewStamp = Utils.getNowTime();
Utils.getDurationTime('[context_isApplicationEnabled_test_0200]', timeOldStamp, timeNewStamp);
Utils.getDurationTime('[context_isApplicationEnabled_test_0200]', timeOldStamp, timeNewStamp);
expect(error.code).assertEqual(
undefined
);
expect(error.code).assertEqual(
0
);
expect(data).assertTrue();
expect(data).assertTrue();
done();
done();
});
});
...
@@ -67,13 +67,13 @@ export default function IsApplicationEnabledETSUnit() {
...
@@ -67,13 +67,13 @@ export default function IsApplicationEnabledETSUnit() {
await Bundle.isApplicationEnabled(undefined).then((data) => {
await Bundle.isApplicationEnabled(undefined).then((data) => {
expect(data).assertFail();
expect(data).assertFail();
}).catch((error) => {
}).catch((error) => {
expect(error).assertEqual(2);
expect(error
.code
).assertEqual(2);
});
});
Bundle.isApplicationEnabled(BUNDLE_NAME_ERROR, (error, data) => {
Bundle.isApplicationEnabled(BUNDLE_NAME_ERROR, (error, data) => {
expect(error.code).assertEqual(
undefined
);
expect(error.code).assertEqual(
0
);
expect(data).assertFalse();
expect(data).assertFalse();
Bundle.isApplicationEnabled("", (error, data) => {
Bundle.isApplicationEnabled("", (error, data) => {
expect(error.code).assertEqual(
undefined
);
expect(error.code).assertEqual(
0
);
expect(data).assertFalse();
expect(data).assertFalse();
Bundle.isApplicationEnabled(undefined, (error, data) => {
Bundle.isApplicationEnabled(undefined, (error, data) => {
expect(error.code).assertEqual(2);
expect(error.code).assertEqual(2);
...
@@ -98,7 +98,7 @@ export default function IsApplicationEnabledETSUnit() {
...
@@ -98,7 +98,7 @@ export default function IsApplicationEnabledETSUnit() {
});
});
timeOldStamp = await Utils.getNowTime();
timeOldStamp = await Utils.getNowTime();
Bundle.isApplicationEnabled(BUNDLE_NAME_OTHER, (error, data) => {
Bundle.isApplicationEnabled(BUNDLE_NAME_OTHER, (error, data) => {
expect(error.code).assertEqual(
undefined
);
expect(error.code).assertEqual(
0
);
expect(data).assertTrue();
expect(data).assertTrue();
done();
done();
});
});
...
...
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/getAllApplicationInfoJsunit.test.ets
浏览文件 @
9e771027
...
@@ -187,7 +187,7 @@ export default function getAllApplicationBundleTest() {
...
@@ -187,7 +187,7 @@ export default function getAllApplicationBundleTest() {
Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, userId, (error, data) => {
Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, userId, (error, data) => {
let endTime = Utils.getNowTime();
let endTime = Utils.getNowTime();
Utils.getDurationTime(TAG_TEST_0300_001, startTime, endTime);
Utils.getDurationTime(TAG_TEST_0300_001, startTime, endTime);
if (error) {
if (error
.code != 0
) {
expect(error).assertFail();
expect(error).assertFail();
console.info(TAG_TEST_0300_001 + 'UserId callBack error: ' + error);
console.info(TAG_TEST_0300_001 + 'UserId callBack error: ' + error);
}
}
...
@@ -214,7 +214,7 @@ export default function getAllApplicationBundleTest() {
...
@@ -214,7 +214,7 @@ export default function getAllApplicationBundleTest() {
Bundle.getAllApplicationInfo(Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, (error, data) => {
Bundle.getAllApplicationInfo(Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, (error, data) => {
let endTime = Utils.getNowTime();
let endTime = Utils.getNowTime();
Utils.getDurationTime(TAG_TEST_0400_001, startTime, endTime);
Utils.getDurationTime(TAG_TEST_0400_001, startTime, endTime);
if (error) {
if (error
.code != 0
) {
expect(error).assertFail();
expect(error).assertFail();
console.info(TAG_TEST_0400_001 + 'UserId callBack error: ' + error);
console.info(TAG_TEST_0400_001 + 'UserId callBack error: ' + error);
}
}
...
@@ -249,7 +249,7 @@ export default function getAllApplicationBundleTest() {
...
@@ -249,7 +249,7 @@ export default function getAllApplicationBundleTest() {
expect(error).assertFail();
expect(error).assertFail();
});
});
Bundle.getAllApplicationInfo(DEFAULT_FLAG, (err, data) => {
Bundle.getAllApplicationInfo(DEFAULT_FLAG, (err, data) => {
expect(err).assertEqual(0);
expect(err
.code
).assertEqual(0);
expect(data.length).assertLarger(10);
expect(data.length).assertLarger(10);
let flag = 0;
let flag = 0;
for(let i in data){
for(let i in data){
...
@@ -272,19 +272,17 @@ export default function getAllApplicationBundleTest() {
...
@@ -272,19 +272,17 @@ export default function getAllApplicationBundleTest() {
await Bundle.getAllApplicationInfo(null).then((data) => {
await Bundle.getAllApplicationInfo(null).then((data) => {
expect(data).assertFail();
expect(data).assertFail();
}).catch((error) => {
}).catch((error) => {
expect(error).assertEqual(1);
expect(error
.code
).assertEqual(1);
});
});
await Bundle.getAllApplicationInfo(undefined).then((data) => {
await Bundle.getAllApplicationInfo(undefined).then((data) => {
expect(data).assertFail();
expect(data).assertFail();
}).catch((error) => {
}).catch((error) => {
expect(error).assertEqual(1);
expect(error
.code
).assertEqual(1);
});
});
Bundle.getAllApplicationInfo(undefined, (err, data) => {
Bundle.getAllApplicationInfo(undefined, (err, data) => {
expect(err).assertEqual(1);
expect(err.code).assertEqual(1);
expect(data).assertEqual("type mismatch");
Bundle.getAllApplicationInfo(null, (err, data) => {
Bundle.getAllApplicationInfo(null, (err, data) => {
expect(err).assertEqual(1);
expect(err.code).assertEqual(1);
expect(data).assertEqual("type mismatch");
done();
done();
});
});
});
});
...
...
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/getApplicationInfoJsunit.test.ets
浏览文件 @
9e771027
...
@@ -303,7 +303,7 @@ export default function applicationBundleJsunit() {
...
@@ -303,7 +303,7 @@ export default function applicationBundleJsunit() {
});
});
Bundle.getApplicationInfo(BUNDLE_OTHER, FLAG_DEFAULT, (err, data) => {
Bundle.getApplicationInfo(BUNDLE_OTHER, FLAG_DEFAULT, (err, data) => {
console.info('noUserId promise data is: ' + data);
console.info('noUserId promise data is: ' + data);
expect(err).assertEqual(0);
expect(err
.code
).assertEqual(0);
getApplicationInfoSuccessOther(data);
getApplicationInfoSuccessOther(data);
done();
done();
});
});
...
@@ -347,7 +347,7 @@ export default function applicationBundleJsunit() {
...
@@ -347,7 +347,7 @@ export default function applicationBundleJsunit() {
await Bundle.getApplicationInfo(null, FLAG_DEFAULT).then((data) => {
await Bundle.getApplicationInfo(null, FLAG_DEFAULT).then((data) => {
expect(data).assertFail();
expect(data).assertFail();
}).catch((error) => {
}).catch((error) => {
expect(error).assertEqual(1);
expect(error
.code
).assertEqual(1);
});
});
await Bundle.getApplicationInfo(BUNDLE_NAME, null).then((data) => {
await Bundle.getApplicationInfo(BUNDLE_NAME, null).then((data) => {
expect(data).assertFail();
expect(data).assertFail();
...
@@ -359,10 +359,8 @@ export default function applicationBundleJsunit() {
...
@@ -359,10 +359,8 @@ export default function applicationBundleJsunit() {
expect(JSON.stringify(data)).assertEqual(undefined);
expect(JSON.stringify(data)).assertEqual(undefined);
Bundle.getApplicationInfo(null, FLAG_DEFAULT, (err, data) => {
Bundle.getApplicationInfo(null, FLAG_DEFAULT, (err, data) => {
expect(err.code).assertEqual(1);
expect(err.code).assertEqual(1);
expect(data).assertEqual("type mismatch");
Bundle.getApplicationInfo(BUNDLE_NAME, null, (err, data) => {
Bundle.getApplicationInfo(BUNDLE_NAME, null, (err, data) => {
expect(err.code).assertEqual(1);
expect(err.code).assertEqual(1);
expect(data).assertEqual("type mismatch");
done();
done();
});
});
});
});
...
...
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/getBundleArchiveInfo.test.ets
浏览文件 @
9e771027
...
@@ -114,7 +114,7 @@ export default function getBundleArchiveInfo() {
...
@@ -114,7 +114,7 @@ export default function getBundleArchiveInfo() {
done()
done()
}).catch(err => {
}).catch(err => {
console.info("getBundleArchiveInfo fail" + JSON.stringify(err))
console.info("getBundleArchiveInfo fail" + JSON.stringify(err))
expect(err).assertEqual(1)
expect(err
.code
).assertEqual(1)
done()
done()
})
})
})
})
...
@@ -131,7 +131,7 @@ export default function getBundleArchiveInfo() {
...
@@ -131,7 +131,7 @@ export default function getBundleArchiveInfo() {
done()
done()
}).catch(err => {
}).catch(err => {
console.info("getBundleArchiveInfo fail" + JSON.stringify(err))
console.info("getBundleArchiveInfo fail" + JSON.stringify(err))
expect(err).assertEqual(1)
expect(err
.code
).assertEqual(1)
done()
done()
})
})
})
})
...
@@ -232,7 +232,7 @@ export default function getBundleArchiveInfo() {
...
@@ -232,7 +232,7 @@ export default function getBundleArchiveInfo() {
function OnReceiveEvent(err, datainfo) {
function OnReceiveEvent(err, datainfo) {
if (err) {
if (err) {
console.info("getBundleArchiveInfo error" + JSON.stringify(err));
console.info("getBundleArchiveInfo error" + JSON.stringify(err));
expect(err).assertEqual(1);
expect(err
.code
).assertEqual(1);
done();
done();
return;
return;
}
}
...
@@ -252,7 +252,7 @@ export default function getBundleArchiveInfo() {
...
@@ -252,7 +252,7 @@ export default function getBundleArchiveInfo() {
function OnReceiveEvent(err, datainfo) {
function OnReceiveEvent(err, datainfo) {
if (err) {
if (err) {
console.info("getBundleArchiveInfo error" + JSON.stringify(err));
console.info("getBundleArchiveInfo error" + JSON.stringify(err));
expect(err).assertEqual(1);
expect(err
.code
).assertEqual(1);
done();
done();
return;
return;
}
}
...
...
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagertest/src/main/js/test/ExampleJsunit.test.js
浏览文件 @
9e771027
...
@@ -739,7 +739,7 @@ describe('ActsBundleManagerTest', function () {
...
@@ -739,7 +739,7 @@ describe('ActsBundleManagerTest', function () {
await
demo
.
getApplicationInfo
(
NAME1
,
await
demo
.
getApplicationInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
|
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_METADATA
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
|
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_METADATA
,
userId
,
(
error
,
datainfo
)
=>
{
userId
,
(
error
,
datainfo
)
=>
{
if
(
error
)
{
if
(
error
.
code
!=
0
)
{
console
.
info
(
"
testGetApplicationInfoMetaDataCallback fail:
"
+
JSON
.
stringify
(
error
));
console
.
info
(
"
testGetApplicationInfoMetaDataCallback fail:
"
+
JSON
.
stringify
(
error
));
expect
(
error
).
assertFail
();
expect
(
error
).
assertFail
();
done
();
done
();
...
@@ -1005,7 +1005,7 @@ describe('ActsBundleManagerTest', function () {
...
@@ -1005,7 +1005,7 @@ describe('ActsBundleManagerTest', function () {
*/
*/
it
(
'
testGetApplicationInfoDifferentParamCallback
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetApplicationInfoDifferentParamCallback
'
,
0
,
async
function
(
done
)
{
await
demo
.
getApplicationInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_DEFAULT
,
userId
,
(
error
,
datainfo
)
=>
{
await
demo
.
getApplicationInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_BUNDLE_DEFAULT
,
userId
,
(
error
,
datainfo
)
=>
{
if
(
error
)
{
if
(
error
.
code
!=
0
)
{
console
.
info
(
"
testGetApplicationInfoDifferentParamCallback fail
"
+
JSON
.
stringify
(
error
));
console
.
info
(
"
testGetApplicationInfoDifferentParamCallback fail
"
+
JSON
.
stringify
(
error
));
expect
(
error
).
assertFail
();
expect
(
error
).
assertFail
();
done
();
done
();
...
@@ -1066,7 +1066,7 @@ describe('ActsBundleManagerTest', function () {
...
@@ -1066,7 +1066,7 @@ describe('ActsBundleManagerTest', function () {
it
(
'
testGetApplicationInfoCallback
'
,
0
,
async
function
(
done
)
{
it
(
'
testGetApplicationInfoCallback
'
,
0
,
async
function
(
done
)
{
await
demo
.
getApplicationInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
,
userId
,
await
demo
.
getApplicationInfo
(
NAME1
,
demo
.
BundleFlag
.
GET_APPLICATION_INFO_WITH_PERMISSION
,
userId
,
(
error
,
datainfo
)
=>
{
(
error
,
datainfo
)
=>
{
if
(
error
)
{
if
(
error
.
code
!=
0
)
{
console
.
info
(
"
testGetApplicationInfoCallback fail:
"
+
JSON
.
stringify
(
error
));
console
.
info
(
"
testGetApplicationInfoCallback fail:
"
+
JSON
.
stringify
(
error
));
expect
(
error
).
assertFail
();
expect
(
error
).
assertFail
();
done
();
done
();
...
...
bundlemanager/zlib/actszipfileandunzipfiletest/src/main/js/test/actszipfileandunzipfiletest.test.js
浏览文件 @
9e771027
...
@@ -967,7 +967,7 @@ it('ACTS_ZipFile_4500', 0, async function (done) {
...
@@ -967,7 +967,7 @@ it('ACTS_ZipFile_4500', 0, async function (done) {
done
();
done
();
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
log
(
"
ACTS_ZipFile_4500 err:
"
+
err
);
console
.
log
(
"
ACTS_ZipFile_4500 err:
"
+
err
);
expect
(
err
.
code
).
assertEqual
(
zlib
.
ErrorCode
.
ERROR_CODE_ERRNO
);
expect
(
err
).
assertEqual
(
zlib
.
ErrorCode
.
ERROR_CODE_ERRNO
);
done
();
done
();
})
})
}).
catch
(
function
(
error
)
{
}).
catch
(
function
(
error
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录