Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
260d82f0
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看板
未验证
提交
260d82f0
编写于
11月 21, 2022
作者:
O
openharmony_ci
提交者:
Gitee
11月 21, 2022
浏览文件
操作
浏览文件
下载
差异文件
!6507 新增title修改边界用例 & 修复断言错误 - monthly_20221018
Merge pull request !6507 from caochuan/cherry-pick-1668500877
上级
a5c0df3c
23a9ff65
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
220 addition
and
65 deletion
+220
-65
multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestCallback.test.ets
...entry/src/main/ets/test/mediaLibraryTestCallback.test.ets
+4
-4
multimedia/medialibrary/mediaLibrary_file/entry/src/main/ets/test/fileTestCallback.test.ets
...ry_file/entry/src/main/ets/test/fileTestCallback.test.ets
+3
-3
multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetCallback2.test.ets
...Asset/entry/src/main/ets/test/fileAssetCallback2.test.ets
+93
-15
multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetPromise2.test.ets
...eAsset/entry/src/main/ets/test/fileAssetPromise2.test.ets
+90
-13
multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetTestCallback.test.ets
...et/entry/src/main/ets/test/fileAssetTestCallback.test.ets
+8
-8
multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetTestPromise.test.ets
...set/entry/src/main/ets/test/fileAssetTestPromise.test.ets
+4
-4
multimedia/userfilemgr/userfilemgr_base/entry/src/main/ets/test/getFileAssetsCallback.test.ets
...se/entry/src/main/ets/test/getFileAssetsCallback.test.ets
+5
-5
multimedia/userfilemgr/userfilemgr_fileAsset/entry/src/main/ets/test/fileAssetCommitModifyCallback.test.ets
.../src/main/ets/test/fileAssetCommitModifyCallback.test.ets
+1
-1
multimedia/userfilemgr/userfilemgr_fileAsset/entry/src/main/ets/test/fileAssetOpenCallback.test.ets
...et/entry/src/main/ets/test/fileAssetOpenCallback.test.ets
+8
-8
multimedia/userfilemgr/userfilemgr_fileAsset/entry/src/main/ets/test/fileAssetOpenPromise.test.ets
...set/entry/src/main/ets/test/fileAssetOpenPromise.test.ets
+4
-4
未找到文件。
multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestCallback.test.ets
浏览文件 @
260d82f0
...
...
@@ -133,7 +133,7 @@ export default function mediaLibraryTestCallback(abilityContext) {
fetchFileResult
.
getFirstObject
(
async
(
err
,
asset
)
=>
{
if
(
err
)
{
console
.
info
(
`${testNum} err : ${err}`
)
expect
.
assertFail
();
expect
()
.
assertFail
();
done
();
return
;
}
...
...
@@ -181,7 +181,7 @@ export default function mediaLibraryTestCallback(abilityContext) {
media
.
getPublicDirectory
(
dir
,
async
(
err
,
res
)
=>
{
if
(
err
)
{
console
.
info
(
`${testNum} err : ${err}`
)
expect
.
assertFail
();
expect
()
.
assertFail
();
done
();
return
;
}
...
...
@@ -219,7 +219,7 @@ export default function mediaLibraryTestCallback(abilityContext) {
media
.
getFileAssets
(
fetchOps
,
async
(
err
,
fetchFileResult
)
=>
{
if
(
err
)
{
console
.
info
(
`${testNum} err : ${err}`
)
expect
.
assertFail
();
expect
()
.
assertFail
();
done
();
return
;
}
...
...
@@ -243,7 +243,7 @@ export default function mediaLibraryTestCallback(abilityContext) {
media
.
createAsset
(
type
,
name
,
path
,
async
(
err
,
creatAsset
)
=>
{
if
(
err
)
{
console
.
info
(
`${testNum} err : ${err}`
)
expect
.
assertFail
();
expect
()
.
assertFail
();
done
();
return
;
}
...
...
multimedia/medialibrary/mediaLibrary_file/entry/src/main/ets/test/fileTestCallback.test.ets
浏览文件 @
260d82f0
...
...
@@ -69,7 +69,7 @@ export default function fileTestCallbackTest(abilityContext) {
media
.
createAsset
(
type
,
displayName1
,
path
,
async
(
err
,
creatAsset1
)
=>
{
if
(
err
)
{
console
.
info
(
`${testNum} err : ${err}`
)
expect
.
assertFail
();
expect
()
.
assertFail
();
done
();
return
;
}
...
...
@@ -106,7 +106,7 @@ export default function fileTestCallbackTest(abilityContext) {
media
.
createAsset
(
type
,
displayName
,
path
,
async
(
err
,
creatAsset
)
=>
{
if
(
err
)
{
console
.
info
(
`${testNum} err : ${err}`
)
expect
.
assertFail
();
expect
()
.
assertFail
();
done
();
return
;
}
...
...
@@ -138,7 +138,7 @@ export default function fileTestCallbackTest(abilityContext) {
asset
.
commitModify
(
async
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`${testNum} err : ${err}`
)
expect
.
assertFail
();
expect
()
.
assertFail
();
done
();
return
;
}
...
...
multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetCallback2.test.ets
浏览文件 @
260d82f0
...
...
@@ -58,7 +58,7 @@ export default function fileAssetCallback2Test(abilityContext) {
asset.commitModify(async (err) => {
if (err) {
console.info(`${testNum} err : ${err}`)
expect.assertFail();
expect
()
.assertFail();
done();
return;
}
...
...
@@ -96,7 +96,7 @@ export default function fileAssetCallback2Test(abilityContext) {
done();
return;
}
expect.assertFail();
expect
()
.assertFail();
done();
});
...
...
@@ -184,13 +184,14 @@ export default function fileAssetCallback2Test(abilityContext) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_005'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '05', IMAGE_TYPE);
let prop = 'displayName'
let
newName
= "";
let
val
= "";
for (var i = 0; i < 83; i++) {
newName
+= "中";
val
+= "中";
}
let val = newName + '.jpg'
val += ".jpg";
await checkCommitModify(done, testNum, fetchOp, prop, val)
});
/**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_006
* @tc.name : commitModify
...
...
@@ -203,14 +204,52 @@ export default function fileAssetCallback2Test(abilityContext) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_006'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '06', IMAGE_TYPE);
let prop = 'displayName'
let
newName
= "";
let
val
= "";
for (var i = 0; i < 251; i++) {
newName
+= "a";
val
+= "a";
}
let val = newName + '.jpg'
val += ".jpg";
await checkCommitModify(done, testNum, fetchOp, prop, val)
});
/**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_007
* @tc.name : commitModify
* @tc.desc : Modify title '中中....' (85)
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it("SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_007", 0, async function (done) {
let testNum = "SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_007";
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyCb/", "07", IMAGE_TYPE);
let prop = "title";
let val = "";
for (var i = 0; i < 85; i++) {
val += "中";
}
await checkCommitModify(done, testNum, fetchOp, prop, val);
});
/**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_008
* @tc.name : commitModify
* @tc.desc : Modify title 'aaaaaaa....' (255)
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it("SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_008", 0, async function (done) {
let testNum = "SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_008";
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyCb/", "08", IMAGE_TYPE);
let prop = "title";
let val = "";
for (var i = 0; i < 255; i++) {
val += "a";
}
await checkCommitModify(done, testNum, fetchOp, prop, val);
});
/**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_009
* @tc.name : commitModify
...
...
@@ -223,13 +262,14 @@ export default function fileAssetCallback2Test(abilityContext) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_009'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '09', IMAGE_TYPE);
let prop = 'displayName'
let
newName
= "";
let
val
= "";
for (var i = 0; i < 84; i++) {
newName
+= "中";
val
+= "中";
}
let val = newName + '.jpg'
val += ".jpg";
await abnormalCheckCommitModify(done, testNum, fetchOp, prop, val)
});
/**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_010
* @tc.name : commitModify
...
...
@@ -242,14 +282,52 @@ export default function fileAssetCallback2Test(abilityContext) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_010'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '010', IMAGE_TYPE);
let prop = 'displayName'
let
newName
= "";
let
val
= "";
for (var i = 0; i < 252; i++) {
newName
+= "a";
val
+= "a";
}
let val = newName + '.jpg'
val += ".jpg";
await abnormalCheckCommitModify(done, testNum, fetchOp, prop, val)
});
/**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_011
* @tc.name : commitModify
* @tc.desc : Modify title '中中....' (86)
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it("SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_011", 0, async function (done) {
let testNum = "SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_011";
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyCb/", "011", IMAGE_TYPE);
let prop = "title";
let val = "";
for (var i = 0; i < 86; i++) {
val += "中";
}
await abnormalCheckCommitModify(done, testNum, fetchOp, prop, val);
});
/**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_012
* @tc.name : commitModify
* @tc.desc : Modify title 'aaaaaaa....' (256)
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it("SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_012", 0, async function (done) {
let testNum = "SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_012";
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyCb/", "012", IMAGE_TYPE);
let prop = "title";
let val = "";
for (var i = 0; i < 256; i++) {
val += "a";
}
await abnormalCheckCommitModify(done, testNum, fetchOp, prop, val);
});
/**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_FILEASSET_ISDIRECTORY_CALLBACK_001
* @tc.name : isDirectory
...
...
@@ -267,7 +345,7 @@ export default function fileAssetCallback2Test(abilityContext) {
asset.isDirectory((err, isDir) =>{
if (err) {
console.info(`${testNum} err : ${err}`);
expect.assertFail();
expect
()
.assertFail();
done();
return;
}
...
...
multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetPromise2.test.ets
浏览文件 @
260d82f0
...
...
@@ -103,7 +103,7 @@ export default function fileAssetPromise2Test(abilityContext) {
asset[prop] = val;
try {
await asset.commitModify();
expect.assertFail();
expect
()
.assertFail();
done();
} catch (error) {
console.info(`${testNum} passed : ${error}`)
...
...
@@ -193,13 +193,14 @@ export default function fileAssetPromise2Test(abilityContext) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_005'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '05', IMAGE_TYPE);
let prop = 'displayName'
let
newName
= "";
let
val
= "";
for (var i = 0; i < 83; i++) {
newName
+= "中";
val
+= "中";
}
let val = newName + '.jpg'
val += ".jpg";
await checkCommitModify(done, testNum, fetchOp, prop, val)
});
/**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_006
* @tc.name : commitModify
...
...
@@ -212,14 +213,52 @@ export default function fileAssetPromise2Test(abilityContext) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_006'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '06', IMAGE_TYPE);
let prop = 'displayName'
let
newName
= "";
let
val
= "";
for (var i = 0; i < 251; i++) {
newName += "a";
val += "a";
}
val += ".jpg";
await checkCommitModify(done, testNum, fetchOp, prop, val)
});
/**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_007
* @tc.name : commitModify
* @tc.desc : Modify title '中中....' (85)
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_007', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_007'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '07', IMAGE_TYPE);
let prop = 'title'
let val = "";
for (var i = 0; i < 85; i++) {
val += "中";
}
let val = newName + '.jpg'
await checkCommitModify(done, testNum, fetchOp, prop, val)
});
/**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_008
* @tc.name : title
* @tc.desc : Modify title 'aaaaaaa....' (255)
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it("SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_008", 0, async function (done) {
let testNum = "SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_008";
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyPro/", "08", IMAGE_TYPE);
let prop = "title";
let val = "";
for (var i = 0; i < 255; i++) {
val += "a";
}
await checkCommitModify(done, testNum, fetchOp, prop, val);
});
/**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_009
* @tc.name : commitModify
...
...
@@ -232,13 +271,14 @@ export default function fileAssetPromise2Test(abilityContext) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_009'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '09', IMAGE_TYPE);
let prop = 'displayName'
let
newName
= "";
let
val
= "";
for (var i = 0; i < 84; i++) {
newName
+= "中";
val
+= "中";
}
let val = newName + '.jpg'
val += ".jpg";
await abnormalCheckCommitModify(done, testNum, fetchOp, prop, val)
});
/**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_010
* @tc.name : commitModify
...
...
@@ -251,14 +291,51 @@ export default function fileAssetPromise2Test(abilityContext) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_010'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '010', IMAGE_TYPE);
let prop = 'displayName'
let
newName
= "";
let
val
= "";
for (var i = 0; i < 252; i++) {
newName
+= "a";
val
+= "a";
}
let val = newName + '.jpg'
val += ".jpg";
await abnormalCheckCommitModify(done, testNum, fetchOp, prop, val)
});
/**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_011
* @tc.name : commitModify
* @tc.desc : Modify title '中中....' (86)
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it("SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_011", 0, async function (done) {
let testNum = "SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_011";
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyPro/", "011", IMAGE_TYPE);
let prop = "title";
let val = "";
for (var i = 0; i < 86; i++) {
val += "中";
}
await abnormalCheckCommitModify(done, testNum, fetchOp, prop, val);
});
/**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_012
* @tc.name : commitModify
* @tc.desc : Modify title 'aaaaaaa....' (256)
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it("SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_012", 0, async function (done) {
let testNum = "SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_012";
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyPro/", "012", IMAGE_TYPE);
let prop = "title";
let val = "";
for (var i = 0; i < 256; i++) {
val += "a";
}
await abnormalCheckCommitModify(done, testNum, fetchOp, prop, val);
});
/**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_02_001
...
...
multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetTestCallback.test.ets
浏览文件 @
260d82f0
...
...
@@ -56,7 +56,7 @@ export default function fileAssetTestCallbackTest(abilityContext) {
asset.open('rw', async (err, fd) => {
if (err) {
console.info(`${testNum} :: err: ${err}`);
expect.assertFail();
expect
()
.assertFail();
done();
return;
}
...
...
@@ -88,7 +88,7 @@ export default function fileAssetTestCallbackTest(abilityContext) {
console.info(`${testNum} :: error: ${error}`);
await asset.close(fd);
await asset1.close(fd1);
expect.assertFail();
expect
()
.assertFail();
done();
}
}
...
...
@@ -104,7 +104,7 @@ export default function fileAssetTestCallbackTest(abilityContext) {
asset.open('r', async (err, fd) => {
if (err) {
console.info(`${testNum} :: err: ${err}`);
expect.assertFail();
expect
()
.assertFail();
done();
return;
}
...
...
@@ -115,7 +115,7 @@ export default function fileAssetTestCallbackTest(abilityContext) {
expect(res.bytesRead).assertEqual(assetProps.bytesRead);
try {
await fileio.write(fd, buf);
expect.assertFail();
expect
()
.assertFail();
} catch (error) {
expect(true).assertTrue();
await asset.close(fd);
...
...
@@ -125,7 +125,7 @@ export default function fileAssetTestCallbackTest(abilityContext) {
} catch (error) {
console.info(`${testNum} :: error: ${error}`);
expect.assertFail();
expect
()
.assertFail();
await asset.close(fd);
done();
}
...
...
@@ -146,7 +146,7 @@ export default function fileAssetTestCallbackTest(abilityContext) {
asset.open('w', async (err, fd) => {
if (err) {
console.info(`${testNum} :: err: ${err}`);
expect.assertFail();
expect
()
.assertFail();
done();
return;
}
...
...
@@ -160,7 +160,7 @@ export default function fileAssetTestCallbackTest(abilityContext) {
let buf1 = new ArrayBuffer(4096);
try {
await fileio.read(fd, buf1);
expect.assertFail();
expect
()
.assertFail();
} catch (error) {
expect(true).assertTrue();
...
...
@@ -191,7 +191,7 @@ export default function fileAssetTestCallbackTest(abilityContext) {
asset.close(fd, async (err) => {
if (err) {
console.info(`${testNum} :: err: ${err}`);
expect.assertFail();
expect
()
.assertFail();
done();
return;
}
...
...
multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetTestPromise.test.ets
浏览文件 @
260d82f0
...
...
@@ -80,7 +80,7 @@ export default function fileAssetTestPromiseTest(abilityContext) {
console.info(`${testNum} :: error: ${error}`);
await asset.close(fd);
await asset1.close(fd1);
expect.assertFail();
expect
()
.assertFail();
done();
}
}
...
...
@@ -101,7 +101,7 @@ export default function fileAssetTestPromiseTest(abilityContext) {
expect(res.bytesRead).assertEqual(assetProps.bytesRead);
try {
await fileio.write(fd, buf);
expect.assertFail();
expect
()
.assertFail();
} catch (error) {
expect(true).assertTrue();
await asset.close(fd);
...
...
@@ -109,7 +109,7 @@ export default function fileAssetTestPromiseTest(abilityContext) {
}
} catch (error) {
console.info(`${testNum} :: error: ${error}`);
expect.assertFail();
expect
()
.assertFail();
await asset.close(fd);
done();
}
...
...
@@ -138,7 +138,7 @@ export default function fileAssetTestPromiseTest(abilityContext) {
let buf1 = new ArrayBuffer(4096);
try {
await fileio.read(fd, buf1);
expect.assertFail();
expect
()
.assertFail();
} catch (error) {
expect(true).assertTrue();
...
...
multimedia/userfilemgr/userfilemgr_base/entry/src/main/ets/test/getFileAssetsCallback.test.ets
浏览文件 @
260d82f0
...
...
@@ -75,7 +75,7 @@ export default function getFileAssetsCallbackTest(abilityContext) {
fetchAssetResult
.
getFirstObject
(
async
(
err
,
asset
)
=>
{
if
(
err
)
{
console
.
info
(
`${testNum} err : ${err}`
)
expect
.
assertFail
();
expect
()
.
assertFail
();
fetchAssetResult
.
close
();
done
();
return
;
...
...
@@ -106,7 +106,7 @@ export default function getFileAssetsCallbackTest(abilityContext) {
fetchAssetResult
.
getNextObject
(
async
(
err
,
asset
)
=>
{
if
(
err
)
{
console
.
info
(
`${testNum} err : ${err}`
)
expect
.
assertFail
();
expect
()
.
assertFail
();
fetchAssetResult
.
close
();
done
();
return
;
...
...
@@ -136,7 +136,7 @@ export default function getFileAssetsCallbackTest(abilityContext) {
fetchAssetResult
.
getLastObject
(
async
(
err
,
asset
)
=>
{
if
(
err
)
{
console
.
info
(
`${testNum} err : ${err}`
)
expect
.
assertFail
();
expect
()
.
assertFail
();
fetchAssetResult
.
close
();
done
();
return
;
...
...
@@ -166,7 +166,7 @@ export default function getFileAssetsCallbackTest(abilityContext) {
fetchAssetResult
.
getPositionObject
(
pos
,
async
(
err
,
asset
)
=>
{
if
(
err
)
{
console
.
info
(
`${testNum} err : ${err}`
)
expect
.
assertFail
();
expect
()
.
assertFail
();
fetchAssetResult
.
close
();
done
();
return
;
...
...
@@ -263,7 +263,7 @@ export default function getFileAssetsCallbackTest(abilityContext) {
fetchAssetResult
.
getFirstObject
((
err
,
asset
)
=>
{
if
(
err
)
{
console
.
info
(
`${testNum} err : ${err}`
)
expect
.
assertFail
();
expect
()
.
assertFail
();
fetchAssetResult
.
close
();
done
();
return
;
...
...
multimedia/userfilemgr/userfilemgr_fileAsset/entry/src/main/ets/test/fileAssetCommitModifyCallback.test.ets
浏览文件 @
260d82f0
...
...
@@ -67,7 +67,7 @@ export default function fileAssetCommitModifyCallbackTest(abilityContext) {
await asset.commitModify(async (err) => {
if (err) {
console.info(`${testNum} err : ${err}`)
expect.assertFail();
expect
()
.assertFail();
done();
return;
}
...
...
multimedia/userfilemgr/userfilemgr_fileAsset/entry/src/main/ets/test/fileAssetOpenCallback.test.ets
浏览文件 @
260d82f0
...
...
@@ -60,7 +60,7 @@ export default function fileAssetOpenCallbackTest(abilityContext) {
asset.open('r', async (err, fd) => {
if (err) {
console.info(`${testNum} :: err: ${err}`);
expect.assertFail();
expect
()
.assertFail();
done();
return;
}
...
...
@@ -71,7 +71,7 @@ export default function fileAssetOpenCallbackTest(abilityContext) {
expect(res.bytesRead).assertEqual(assetProps.bytesRead);
try {
await fileio.write(fd, buf);
expect.assertFail();
expect
()
.assertFail();
} catch (error) {
expect(true).assertTrue();
await asset.close(fd);
...
...
@@ -80,7 +80,7 @@ export default function fileAssetOpenCallbackTest(abilityContext) {
});
} catch (error) {
console.info(`${testNum} :: error: ${error}`);
expect.assertFail();
expect
()
.assertFail();
await asset.close(fd);
done();
}
...
...
@@ -104,7 +104,7 @@ export default function fileAssetOpenCallbackTest(abilityContext) {
asset.open('w', async (err, fd) => {
if (err) {
console.info(`${testNum} :: err: ${err}`);
expect.assertFail();
expect
()
.assertFail();
done();
return;
}
...
...
@@ -118,7 +118,7 @@ export default function fileAssetOpenCallbackTest(abilityContext) {
let buf1 = new ArrayBuffer(4096);
try {
await fileio.read(fd, buf1);
expect.assertFail();
expect
()
.assertFail();
} catch (error) {
expect(true).assertTrue();
}
...
...
@@ -149,7 +149,7 @@ export default function fileAssetOpenCallbackTest(abilityContext) {
asset.open('rw', async (err, fd) => {
if (err) {
console.info(`${testNum} :: err: ${err}`);
expect.assertFail();
expect
()
.assertFail();
done();
return;
}
...
...
@@ -175,7 +175,7 @@ export default function fileAssetOpenCallbackTest(abilityContext) {
console.info(`${testNum} :: error: ${error}`);
await asset.close(fd);
await asset1.close(fd1);
expect.assertFail();
expect
()
.assertFail();
done();
}
}
...
...
@@ -198,7 +198,7 @@ export default function fileAssetOpenCallbackTest(abilityContext) {
asset.close(fd, async (err) => {
if (err) {
console.info(`${testNum} :: err: ${err}`);
expect.assertFail();
expect
()
.assertFail();
done();
return;
}
...
...
multimedia/userfilemgr/userfilemgr_fileAsset/entry/src/main/ets/test/fileAssetOpenPromise.test.ets
浏览文件 @
260d82f0
...
...
@@ -66,7 +66,7 @@ export default function fileAssetOpenPromiseTest(abilityContext) {
expect(res.bytesRead).assertEqual(assetProps.bytesRead);
try {
await fileio.write(fd, buf);
expect.assertFail();
expect
()
.assertFail();
} catch (error) {
expect(true).assertTrue();
await asset.close(fd);
...
...
@@ -74,7 +74,7 @@ export default function fileAssetOpenPromiseTest(abilityContext) {
}
} catch (error) {
console.info(`${testNum} :: error: ${error}`);
expect.assertFail();
expect
()
.assertFail();
await asset.close(fd);
done();
}
...
...
@@ -107,7 +107,7 @@ export default function fileAssetOpenPromiseTest(abilityContext) {
let buf1 = new ArrayBuffer(4096);
try {
await fileio.read(fd, buf1);
expect.assertFail();
expect
()
.assertFail();
} catch (error) {
expect(true).assertTrue();
...
...
@@ -158,7 +158,7 @@ export default function fileAssetOpenPromiseTest(abilityContext) {
console.info(`${testNum} :: error: ${error}`);
await asset.close(fd);
await asset1.close(fd1);
expect.assertFail();
expect
()
.assertFail();
done();
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录