提交 17de958b 编写于 作者: L lwx1121892

<liuxueqi3@huawei.com>

Signed-off-by: Nlwx1121892 <liuxueqi3@huawei.com>
上级 1564f013
...@@ -63,59 +63,7 @@ export default function imageDecodeOptions() { ...@@ -63,59 +63,7 @@ export default function imageDecodeOptions() {
console.info('afterAll case'); console.info('afterAll case');
}) })
/**
* @tc.number : TC_063
* @tc.name : release ImagePacker - promise
* @tc.desc : 1.create ImagePacker
* 2.call release
* 3.return undefined
* @tc.size : MEDIUM
* @tc.type : Functional
* @tc.level : Level 1
*/
it('TC_063', 0, async function (done) {
const imagePackerApi = image.createImagePacker();
if (imagePackerApi == undefined) {
console.info('TC_063 create image packer failed');
expect(false).assertTrue();
done();
} else {
imagePackerApi.release().then(() => {
console.info('TC_063 success');
expect(true).assertTrue();
done();
}).catch(() => {
console.log('TC_063 error: ' + error);
expect(false).assertTrue();
done();
})
}
})
/**
* @tc.number : TC_063-1
* @tc.name : release ImagePacker - callback
* @tc.desc : 1.create ImagePacker
* 2.call release
* 3.return undefined
* @tc.size : MEDIUM
* @tc.type : Functional
* @tc.level : Level 1
*/
it('TC_063-1', 0, async function (done) {
const imagePackerApi = image.createImagePacker();
if (imagePackerApi == undefined) {
console.info('TC_063-1 create image packer failed');
expect(false).assertTrue();
done();
} else {
imagePackerApi.release(() => {
console.info('TC_063-1 success');
expect(true).assertTrue();
done();
})
}
})
/** /**
* @tc.number : TC_050 * @tc.number : TC_050
......
...@@ -19,7 +19,7 @@ import featureAbility from '@ohos.ability.featureAbility' ...@@ -19,7 +19,7 @@ import featureAbility from '@ohos.ability.featureAbility'
import fileio from '@ohos.fileio' import fileio from '@ohos.fileio'
export default function imagePacking() { export default function imagePacking() {
describe('imagePacking', function () { describe('imagePacking', function () {
let filePath; let filePath;
let fdNumber; let fdNumber;
async function getFd(fileName) { async function getFd(fileName) {
...@@ -959,4 +959,59 @@ describe('imagePacking', function () { ...@@ -959,4 +959,59 @@ describe('imagePacking', function () {
} }
}) })
})} /**
* @tc.number : TC_063
* @tc.name : release ImagePacker - promise
* @tc.desc : 1.create ImagePacker
* 2.call release
* 3.return undefined
* @tc.size : MEDIUM
* @tc.type : Functional
* @tc.level : Level 1
*/
it('TC_063', 0, async function (done) {
const imagePackerApi = image.createImagePacker();
if (imagePackerApi == undefined) {
console.info('TC_063 create image packer failed');
expect(false).assertTrue();
done();
} else {
imagePackerApi.release().then(() => {
console.info('TC_063 success');
expect(true).assertTrue();
done();
}).catch(() => {
console.log('TC_063 error: ' + error);
expect(false).assertTrue();
done();
})
}
})
/**
* @tc.number : TC_063-1
* @tc.name : release ImagePacker - callback
* @tc.desc : 1.create ImagePacker
* 2.call release
* 3.return undefined
* @tc.size : MEDIUM
* @tc.type : Functional
* @tc.level : Level 1
*/
it('TC_063-1', 0, async function (done) {
const imagePackerApi = image.createImagePacker();
if (imagePackerApi == undefined) {
console.info('TC_063-1 create image packer failed');
expect(false).assertTrue();
done();
} else {
imagePackerApi.release(() => {
console.info('TC_063-1 success');
expect(true).assertTrue();
done();
})
}
})
})
}
...@@ -20,9 +20,7 @@ ...@@ -20,9 +20,7 @@
"type": "ShellKit", "type": "ShellKit",
"run-command": [ "run-command": [
"hilog -Q pidoff", "hilog -Q pidoff",
"hilog -b D", "hilog -b D"
"killall com.ohos.medialibrary.MediaScannerAbilityA",
"aa start -a MediaScannerAbility -b com.ohos.medialibrary.MediaScannerAbilityA"
], ],
"teardown-command": [] "teardown-command": []
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册