未验证 提交 d0542c03 编写于 作者: O openharmony_ci 提交者: Gitee

!3323 Image测试用例整改

Merge pull request !3323 from 秦莉文/OpenHarmony-3.2-Beta1
...@@ -20,24 +20,66 @@ ...@@ -20,24 +20,66 @@
"./resource/image/test.jpg ->/storage/media/100/local/files", "./resource/image/test.jpg ->/storage/media/100/local/files",
"./resource/image/test_exif.jpg ->/storage/media/100/local/files", "./resource/image/test_exif.jpg ->/storage/media/100/local/files",
"./resource/image/moving_test.gif ->/storage/media/100/local/files" "./resource/image/moving_test.gif ->/storage/media/100/local/files"
] ]
}, },
{ {
"type": "ShellKit", "type": "ShellKit",
"run-command": [ "run-command": [
"mkdir /storage/media/100/local/files/cjh", "mkdir /storage/media/100/local/files/img",
"cp /storage/media/100/local/files/test.tiff /storage/media/100/local/files/cjh/", "cp /storage/media/100/local/files/test.tiff /storage/media/100/local/files/img/",
"cp /storage/media/100/local/files/test.123 /storage/media/100/local/files/cjh/", "cp /storage/media/100/local/files/test.123 /storage/media/100/local/files/img/",
"cp /storage/media/100/local/files/test.bmp /storage/media/100/local/files/cjh/", "cp /storage/media/100/local/files/test.bmp /storage/media/100/local/files/img/",
"cp /storage/media/100/local/files/test.png /storage/media/100/local/files/cjh/", "cp /storage/media/100/local/files/test.bmp /storage/media/100/local/files/img/test0.bmp",
"cp /storage/media/100/local/files/test.gif /storage/media/100/local/files/cjh/", "cp /storage/media/100/local/files/test.bmp /storage/media/100/local/files/img/test1.bmp",
"cp /storage/media/100/local/files/test.jpg /storage/media/100/local/files/cjh/", "cp /storage/media/100/local/files/test.bmp /storage/media/100/local/files/img/test2.bmp",
"cp /storage/media/100/local/files/test_exif.jpg /storage/media/100/local/files/cjh/", "cp /storage/media/100/local/files/test.bmp /storage/media/100/local/files/img/test3.bmp",
"cp /storage/media/100/local/files/moving_test.gif /storage/media/100/local/files/cjh/", "cp /storage/media/100/local/files/test.bmp /storage/media/100/local/files/img/test4.bmp",
"cp /storage/media/100/local/files/test.bmp /storage/media/100/local/files/img/test5.bmp",
"cp /storage/media/100/local/files/test.bmp /storage/media/100/local/files/img/test6.bmp",
"cp /storage/media/100/local/files/test.bmp /storage/media/100/local/files/img/test7.bmp",
"cp /storage/media/100/local/files/test.bmp /storage/media/100/local/files/img/test8.bmp",
"cp /storage/media/100/local/files/test.bmp /storage/media/100/local/files/img/test9.bmp",
"cp /storage/media/100/local/files/test.bmp /storage/media/100/local/files/img/test10.bmp",
"cp /storage/media/100/local/files/test.bmp /storage/media/100/local/files/img/test11.bmp",
"cp /storage/media/100/local/files/test.bmp /storage/media/100/local/files/img/test12.bmp",
"cp /storage/media/100/local/files/test.bmp /storage/media/100/local/files/img/test13.bmp",
"cp /storage/media/100/local/files/test.bmp /storage/media/100/local/files/img/test14.bmp",
"cp /storage/media/100/local/files/test.bmp /storage/media/100/local/files/img/test15.bmp",
"cp /storage/media/100/local/files/test.png /storage/media/100/local/files/img/",
"cp /storage/media/100/local/files/test.png /storage/media/100/local/files/img/test0.png",
"cp /storage/media/100/local/files/test.png /storage/media/100/local/files/img/test1.png",
"cp /storage/media/100/local/files/test.png /storage/media/100/local/files/img/test2.png",
"cp /storage/media/100/local/files/test.png /storage/media/100/local/files/img/test3.png",
"cp /storage/media/100/local/files/test.png /storage/media/100/local/files/img/test4.png",
"cp /storage/media/100/local/files/test.png /storage/media/100/local/files/img/test5.png",
"cp /storage/media/100/local/files/test.png /storage/media/100/local/files/img/test6.png",
"cp /storage/media/100/local/files/test.png /storage/media/100/local/files/img/test7.png",
"cp /storage/media/100/local/files/test.png /storage/media/100/local/files/img/test8.png",
"cp /storage/media/100/local/files/test.png /storage/media/100/local/files/img/test9.png",
"cp /storage/media/100/local/files/test.png /storage/media/100/local/files/img/test10.png",
"cp /storage/media/100/local/files/test.png /storage/media/100/local/files/img/test11.png",
"cp /storage/media/100/local/files/test.png /storage/media/100/local/files/img/test12.png",
"cp /storage/media/100/local/files/test.png /storage/media/100/local/files/img/test13.png",
"cp /storage/media/100/local/files/test.png /storage/media/100/local/files/img/test14.png",
"cp /storage/media/100/local/files/test.png /storage/media/100/local/files/img/test15.png",
"cp /storage/media/100/local/files/test.png /storage/media/100/local/files/img/test00.png",
"cp /storage/media/100/local/files/test.png /storage/media/100/local/files/img/test01.png",
"cp /storage/media/100/local/files/test.png /storage/media/100/local/files/img/test02.png",
"cp /storage/media/100/local/files/test.png /storage/media/100/local/files/img/test03.png",
"cp /storage/media/100/local/files/test.png /storage/media/100/local/files/img/test04.png",
"cp /storage/media/100/local/files/test.png /storage/media/100/local/files/img/test05.png",
"cp /storage/media/100/local/files/test.png /storage/media/100/local/files/img/test06.png",
"cp /storage/media/100/local/files/test.png /storage/media/100/local/files/img/test07.png",
"cp /storage/media/100/local/files/test.png /storage/media/100/local/files/img/test08.png",
"cp /storage/media/100/local/files/test.png /storage/media/100/local/files/img/test09.png",
"cp /storage/media/100/local/files/test.gif /storage/media/100/local/files/img/",
"cp /storage/media/100/local/files/test.jpg /storage/media/100/local/files/img/",
"cp /storage/media/100/local/files/test.jpg /storage/media/100/local/files/img/test0.jpg",
"cp /storage/media/100/local/files/test_exif.jpg /storage/media/100/local/files/img/",
"cp /storage/media/100/local/files/moving_test.gif /storage/media/100/local/files/img/",
"chmod -R 666 /data/media/*", "chmod -R 666 /data/media/*",
"chmod -R 666 /storage/media/100/local/files/cjh/*", "chmod -R 666 /storage/media/100/local/files/img/*",
"killall com.ohos.medialibrary.MediaScannerAbilityA", "killall com.ohos.medialibrary.MediaScannerAbilityA",
"aa start -a MediaScannerAbility -b com.ohos.medialibrary.MediaScannerAbilityA" "aa start -a MediaScannerAbility -b com.ohos.medialibrary.MediaScannerAbilityA"
], ],
......
...@@ -61,7 +61,7 @@ describe('Image', function () { ...@@ -61,7 +61,7 @@ describe('Image', function () {
let fileKeyObj = mediaLibrary.FileKey; let fileKeyObj = mediaLibrary.FileKey;
let getFileOp = { let getFileOp = {
selections : fileKeyObj.DISPLAY_NAME + '= ? AND ' + fileKeyObj.RELATIVE_PATH + '= ?', selections : fileKeyObj.DISPLAY_NAME + '= ? AND ' + fileKeyObj.RELATIVE_PATH + '= ?',
selectionArgs : [ fileName, 'cjh/' ], selectionArgs : [ fileName, 'img/' ],
order : fileKeyObj.ID + " DESC LIMIT 0,100", order : fileKeyObj.ID + " DESC LIMIT 0,100",
extendArgs : "", extendArgs : "",
} }
...@@ -852,55 +852,57 @@ describe('Image', function () { ...@@ -852,55 +852,57 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_022-1', 0, async function (done) { it('TC_022-1', 0, async function (done) {
const color = new ArrayBuffer(96); const color = new ArrayBuffer(96);
let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 } } let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 } }
image.createPixelMap(color, opts, (err, pixelmap) => { image.createPixelMap(color, opts, (err, pixelmap) => {
if (pixelmap == undefined) { if (pixelmap == undefined) {
console.info('TC_022-1 createPixelMap failed'); console.info('TC_022-1 createPixelMap failed');
expect(false).assertTrue() expect(false).assertTrue()
done(); done();
} }
const area = { pixels: new ArrayBuffer(8), const area = {
pixels: new ArrayBuffer(8),
offset: 0,
stride: 8,
region: { size: { height: 1, width: 2 }, x: 0, y: 0 }
}
var bufferArr = new Uint8Array(area.pixels);
for (var i = 0; i < bufferArr.length; i++) {
bufferArr[i] = i + 1;
}
pixelmap.writePixels(area, () => {
const readArea = {
pixels: new ArrayBuffer(8),
offset: 0, offset: 0,
stride: 8, stride: 8,
region: { size: { height: 1, width: 2 }, x: 0, y: 0 } region: { size: { height: 1, width: 2 }, x: 0, y: 0 }
} }
var bufferArr = new Uint8Array(area.pixels); pixelmap.readPixels(readArea, () => {
for (var i = 0; i < bufferArr.length; i++) { var readArr = new Uint8Array(readArea.pixels);
bufferArr[i] = i + 1; var res = true;
} for (var i = 0; i < readArr.length; i++) {
pixelmap.writePixels(area, () => { if (readArr[i] != tc_022buf[i]) {
const readArea = { pixels: new ArrayBuffer(8), res = false;
offset: 0, console.info('TC_022-1 failed');
stride: 8, expect(false).assertTrue();
region: { size: { height: 1, width: 2 }, x: 0, y: 0 }
}
pixelmap.readPixels(readArea,() => {
var readArr = new Uint8Array(readArea.pixels);
var res = true;
for (var i = 0; i < readArr.length; i++) {
if (readArr[i] == 0) {
res = false;
console.info('TC_022-1 failed');
expect(false).assertTrue();
done();
break;
}
}
if (res) {
console.info('TC_022-1 success');
expect(true).assertTrue()
done(); done();
break;
} }
}) }
if (res) {
console.info('TC_022-1 success');
expect(true).assertTrue()
done();
}
}) })
}) })
})
.catch(error => { .catch(error => {
console.log('TC_022-1 error: ' + error); console.log('TC_022-1 error: ' + error);
expect().assertFail(); expect().assertFail();
done(); done();
}) })
}) })
/** /**
* @tc.number : TC_023 * @tc.number : TC_023
...@@ -1345,7 +1347,6 @@ describe('Image', function () { ...@@ -1345,7 +1347,6 @@ describe('Image', function () {
*/ */
it('TC_042', 0, async function (done) { it('TC_042', 0, async function (done) {
await getFd("test.jpg"); await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_042 create image source failed'); console.info('TC_042 create image source failed');
...@@ -1353,9 +1354,24 @@ describe('Image', function () { ...@@ -1353,9 +1354,24 @@ describe('Image', function () {
done(); done();
} else { } else {
imageSourceApi.getImageInfo((err,imageInfo) => { imageSourceApi.getImageInfo((err,imageInfo) => {
console.info('TC_042 success'); if (err){
expect(imageInfo != undefined).assertTrue(); expect(false).assertTrue();
done(); console.info('TC_042 err: ' + err);
done();
return
}
if (imageInfo != undefined){
console.info('TC_042 success');
console.info('TC_042 imageInfo height: ' + imageInfo.size.height);
console.info('TC_042 imageInfo width: ' + imageInfo.size.width);
expect(true).assertTrue();
done();
}else{
console.info('TC_042 failed');
expect(false).assertTrue();
done();
}
}) })
} }
}) })
...@@ -1435,7 +1451,6 @@ describe('Image', function () { ...@@ -1435,7 +1451,6 @@ describe('Image', function () {
*/ */
it('TC_044', 0, async function (done) { it('TC_044', 0, async function (done) {
await getFd("test.jpg"); await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_044 create image source failed'); console.info('TC_044 create image source failed');
...@@ -1466,7 +1481,6 @@ describe('Image', function () { ...@@ -1466,7 +1481,6 @@ describe('Image', function () {
*/ */
it('TC_044-1', 0, async function (done) { it('TC_044-1', 0, async function (done) {
await getFd("test.jpg"); await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_044-1 create image source failed'); console.info('TC_044-1 create image source failed');
...@@ -1481,35 +1495,6 @@ describe('Image', function () { ...@@ -1481,35 +1495,6 @@ describe('Image', function () {
} }
}) })
/**
* @tc.number : TC_045
* @tc.name : getImageInfo(callback: AsyncCallback<ImageInfo>)-jpg
* @tc.desc : 1.create imageSource
* 2.imageSourcecall getImageInfo(ImageInfo)
* 3.callback return undefined
* @tc.size : MEDIUM
* @tc.type : Functional
* @tc.level : Level 1
*/
it('TC_045', 0, async function (done) {
await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_045 create image source failed');
expect(false).assertTrue();
done();
} else {
imageSourceApi.getImageInfo((err,imageInfo) => {
console.info('TC_045 imageInfo');
console.info('imageInfo.size.height:'+imageInfo.size.height);
console.info('imageInfo.size.width:'+imageInfo.size.width);
expect(imageInfo != undefined).assertTrue();
done();
})
}
})
/** /**
* @tc.number : TC_045-1 * @tc.number : TC_045-1
* @tc.name : getImageInfo(callback: AsyncCallback<ImageInfo>)-bmp * @tc.name : getImageInfo(callback: AsyncCallback<ImageInfo>)-bmp
...@@ -1577,7 +1562,6 @@ describe('Image', function () { ...@@ -1577,7 +1562,6 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_045-3', 0, async function (done) { it('TC_045-3', 0, async function (done) {
console.info('TC_045-3');
await getFd("test.gif"); await getFd("test.gif");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
...@@ -1586,11 +1570,23 @@ describe('Image', function () { ...@@ -1586,11 +1570,23 @@ describe('Image', function () {
done(); done();
} else { } else {
imageSourceApi.getImageInfo((err,imageInfo) => { imageSourceApi.getImageInfo((err,imageInfo) => {
expect(imageInfo != undefined).assertTrue(); if (err){
console.info('TC_045-3 imageInfo'); expect(false).assertTrue();
console.info('imageInfo.size.height:'+imageInfo.size.height); console.info('TC_045-3 error' + err);
console.info('imageInfo.size.width:'+imageInfo.size.width); done();
done(); return
}
if (imageInfo != undefined && imageInfo != null){
expect(true).assertTrue();
console.info('TC_045-3 imageInfo.size.height:' + imageInfo.size.height);
console.info('TC_045-3 imageInfo.size.width:'+imageInfo.size.width);
console.info('TC_045-3 success')
done();
}else{
expect(false).assertTrue();
console.info('TC_045-3 failed')
done();
}
}) })
} }
}) })
...@@ -1607,7 +1603,6 @@ describe('Image', function () { ...@@ -1607,7 +1603,6 @@ describe('Image', function () {
*/ */
it('TC_046', 0, async function (done) { it('TC_046', 0, async function (done) {
await getFd("test.jpg"); await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_046 create image source failed'); console.info('TC_046 create image source failed');
...@@ -1644,9 +1639,8 @@ describe('Image', function () { ...@@ -1644,9 +1639,8 @@ describe('Image', function () {
} else { } else {
imageSourceApi.getImageInfo(0, (err, imageInfo) => { imageSourceApi.getImageInfo(0, (err, imageInfo) => {
expect(imageInfo != undefined).assertTrue(); expect(imageInfo != undefined).assertTrue();
console.info('TC_046-1 imageInfo'); console.info('TC_046-1 imageInfo.size.height:'+imageInfo.size.height);
console.info('imageInfo.size.height:'+imageInfo.size.height); console.info('TC_046-1 imageInfo.size.width:'+imageInfo.size.width);
console.info('imageInfo.size.width:'+imageInfo.size.width);
done(); done();
}) })
} }
...@@ -1699,11 +1693,23 @@ describe('Image', function () { ...@@ -1699,11 +1693,23 @@ describe('Image', function () {
done(); done();
} else { } else {
imageSourceApi.getImageInfo(0,(err, imageInfo) => { imageSourceApi.getImageInfo(0,(err, imageInfo) => {
expect(imageInfo != undefined).assertTrue(); if (err){
console.info('TC_046-3 imageInfo'); expect(false).assertTrue();
console.info('imageInfo.size.height:'+imageInfo.size.height); console.info('TC_046-3 error' + err);
console.info('imageInfo.size.width:'+imageInfo.size.width); done();
done(); return
}
if (imageInfo != undefined && imageInfo != null){
expect(true).assertTrue();
console.info('TC_046-3 imageInfo.size.height:' + imageInfo.size.height);
console.info('TC_046-3 imageInfo.size.width:'+imageInfo.size.width);
console.info('TC_046-3 success')
done();
}else{
expect(false).assertTrue();
console.info('TC_046-3 failed')
done();
}
}) })
} }
}) })
...@@ -1774,7 +1780,6 @@ describe('Image', function () { ...@@ -1774,7 +1780,6 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_047', 0, async function (done) { it('TC_047', 0, async function (done) {
await getFd("test.jpg"); await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
...@@ -1883,11 +1888,16 @@ describe('Image', function () { ...@@ -1883,11 +1888,16 @@ describe('Image', function () {
} else { } else {
imageSourceApi.getImageInfo(0) imageSourceApi.getImageInfo(0)
.then(imageInfo => { .then(imageInfo => {
expect(imageInfo != undefined).assertTrue(); if (imageInfo != undefined && imageInfo != null){
console.info('TC_047-3 '); expect(true).assertTrue();
console.info('imageInfo.size.height:'+imageInfo.size.height); console.info('TC_047-3 imageInfo.size.height:'+imageInfo.size.height);
console.info('imageInfo.size.width:'+imageInfo.size.width); console.info('TC_047-3 imageInfo.size.width:'+imageInfo.size.width);
done(); done();
}else{
expect(false).assertTrue();
console.info('TC_047-3 failed');
done();
}
}).catch(error => { }).catch(error => {
console.log('TC_047-3 error: ' + error); console.log('TC_047-3 error: ' + error);
expect().assertFail(); expect().assertFail();
...@@ -2519,7 +2529,7 @@ describe('Image', function () { ...@@ -2519,7 +2529,7 @@ describe('Image', function () {
}) })
/** /**
* @tc.number : TC_050-14 * @tc.number : TC_05s0-14
* @tc.name : createPixelMap-promise-jpg * @tc.name : createPixelMap-promise-jpg
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -2695,10 +2705,7 @@ describe('Image', function () { ...@@ -2695,10 +2705,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_062', 0, async function (done) { it('TC_062', 0, async function (done) {
await getFd("test.Png"); await getFd("test00.png");
console.log('start~~~');
console.log('fdPng0~~~~~~~~' + fdNumber);
console.log('fdPng1~~~~~~~~' + JSON.stringify(fdPng));
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_062 create image source failed'); console.info('TC_062 create image source failed');
...@@ -2738,7 +2745,7 @@ describe('Image', function () { ...@@ -2738,7 +2745,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_062-1', 0, async function (done) { it('TC_062-1', 0, async function (done) {
await getFd("test.png"); await getFd("test01.png");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_062-1 create image source failed'); console.info('TC_062-1 create image source failed');
...@@ -2773,7 +2780,7 @@ describe('Image', function () { ...@@ -2773,7 +2780,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_062-2', 0, async function (done) { it('TC_062-2', 0, async function (done) {
await getFd("test.png"); await getFd("test02.png");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_062-2 create image source failed'); console.info('TC_062-2 create image source failed');
...@@ -2809,7 +2816,7 @@ describe('Image', function () { ...@@ -2809,7 +2816,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_062-3', 0, async function (done) { it('TC_062-3', 0, async function (done) {
await getFd("test.png"); await getFd("test03.png");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_062-3 create image source failed'); console.info('TC_062-3 create image source failed');
...@@ -2822,7 +2829,7 @@ describe('Image', function () { ...@@ -2822,7 +2829,7 @@ describe('Image', function () {
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
let packOpts = { format:["image/jpg"], quality:101 } let packOpts = { format:["image/jpeg"], quality:101 }
imagePackerApi.packing(imageSourceApi, packOpts, (err, data) => { imagePackerApi.packing(imageSourceApi, packOpts, (err, data) => {
console.info('TC_062-3 success'); console.info('TC_062-3 success');
expect(data == undefined).assertTrue(); expect(data == undefined).assertTrue();
...@@ -2845,7 +2852,7 @@ describe('Image', function () { ...@@ -2845,7 +2852,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_062-4', 0, async function (done) { it('TC_062-4', 0, async function (done) {
await getFd("test.png"); await getFd("test04.png");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_062-4 create image source failed'); console.info('TC_062-4 create image source failed');
...@@ -2876,9 +2883,9 @@ describe('Image', function () { ...@@ -2876,9 +2883,9 @@ describe('Image', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_062-5', 0, async function (done) { it('TC_062-5', 0, async function (done) {
// await getFd("test.png"); await getFd("test05.png");
await getFd("test.Png");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_062-5 create image source failed'); console.info('TC_062-5 create image source failed');
...@@ -2891,7 +2898,7 @@ describe('Image', function () { ...@@ -2891,7 +2898,7 @@ describe('Image', function () {
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
let packOpts = { format:["image/jpg"] } let packOpts = { format:["image/jpeg"] }
imagePackerApi.packing(imageSourceApi, packOpts) imagePackerApi.packing(imageSourceApi, packOpts)
.then( data => { .then( data => {
console.info('TC_062-5 failed'); console.info('TC_062-5 failed');
...@@ -2906,6 +2913,7 @@ describe('Image', function () { ...@@ -2906,6 +2913,7 @@ describe('Image', function () {
} }
} }
}) })
/** /**
* @tc.number : TC_062-6 * @tc.number : TC_062-6
...@@ -2919,7 +2927,7 @@ describe('Image', function () { ...@@ -2919,7 +2927,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_062-6', 0, async function (done) { it('TC_062-6', 0, async function (done) {
await getFd("test.png"); await getFd("test06.png");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_062-6 create image source failed'); console.info('TC_062-6 create image source failed');
...@@ -2948,41 +2956,6 @@ describe('Image', function () { ...@@ -2948,41 +2956,6 @@ describe('Image', function () {
} }
}) })
/**
* @tc.number : TC_062-7
* @tc.name : packing ImageSource - callback - quality 100
* @tc.desc : 1.create ImageSource
* 2.call packing
* 3.return array
* 4.callbackcall return undefined
* @tc.size : MEDIUM
* @tc.type : Functional
* @tc.level : Level 1
*/
it('TC_062-7', 0, async function (done) {
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_062-7 create image source failed');
expect(false).assertTrue();
done();
} else {
const imagePackerApi = image.createImagePacker();
if (imagePackerApi == undefined) {
console.info('TC_062-7 create image packer failed');
expect(false).assertTrue();
done();
} else {
let packOpts = { format:["image/jpeg"], quality:100 }
imagePackerApi.packing(imageSourceApi, packOpts, (err, data) => {
console.info('TC_062-7 success');
expect(data != undefined).assertTrue();
done();
})
}
}
})
/** /**
* @tc.number : TC_062-8 * @tc.number : TC_062-8
* @tc.name : packing ImageSource - callback - quality 0 * @tc.name : packing ImageSource - callback - quality 0
...@@ -2995,7 +2968,7 @@ describe('Image', function () { ...@@ -2995,7 +2968,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_062-8', 0, async function (done) { it('TC_062-8', 0, async function (done) {
await getFd("test.png"); await getFd("test08.png");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_062-8 create image source failed'); console.info('TC_062-8 create image source failed');
...@@ -3030,7 +3003,7 @@ describe('Image', function () { ...@@ -3030,7 +3003,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_062-9', 0, async function (done) { it('TC_062-9', 0, async function (done) {
await getFd("test.png"); await getFd("test09.png");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_062-9 create image source failed'); console.info('TC_062-9 create image source failed');
...@@ -3155,9 +3128,16 @@ describe('Image', function () { ...@@ -3155,9 +3128,16 @@ describe('Image', function () {
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.release(() => { imageSourceApi.release(async(err) => {
if (err){
console.info('TC_064-1 err:' + err);
expect(false).assertTrue();
done();
return
}
console.info('TC_064-1 Success'); console.info('TC_064-1 Success');
expect(true).assertTrue(); expect(true).assertTrue();
expect(true).assertTrue();
done(); done();
}) })
} }
...@@ -3211,7 +3191,7 @@ describe('Image', function () { ...@@ -3211,7 +3191,7 @@ describe('Image', function () {
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.release(() => { imageSourceApi.release(async() => {
console.info('TC_065-1 Success'); console.info('TC_065-1 Success');
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
...@@ -3886,7 +3866,7 @@ describe('Image', function () { ...@@ -3886,7 +3866,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068', 0, async function (done) { it('TC_068', 0, async function (done) {
await getFd("test.bmp"); await getFd("test0.bmp");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_068 create image source failed'); console.info('TC_068 create image source failed');
...@@ -3921,7 +3901,7 @@ describe('Image', function () { ...@@ -3921,7 +3901,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068-1', 0, async function (done) { it('TC_068-1', 0, async function (done) {
await getFd("test.bmp"); await getFd("test1.bmp");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_068-1 create image source failed'); console.info('TC_068-1 create image source failed');
...@@ -3956,7 +3936,7 @@ describe('Image', function () { ...@@ -3956,7 +3936,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068-2', 0, async function (done) { it('TC_068-2', 0, async function (done) {
await getFd("test.bmp"); await getFd("test2.bmp");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_068-2 create image source failed'); console.info('TC_068-2 create image source failed');
...@@ -3991,7 +3971,7 @@ describe('Image', function () { ...@@ -3991,7 +3971,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068-3', 0, async function (done) { it('TC_068-3', 0, async function (done) {
await getFd("test.bmp"); await getFd("test3.bmp");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_068-3 create image source failed'); console.info('TC_068-3 create image source failed');
...@@ -4032,7 +4012,7 @@ describe('Image', function () { ...@@ -4032,7 +4012,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068-4', 0, async function (done) { it('TC_068-4', 0, async function (done) {
await getFd("test.bmp"); await getFd("test4.bmp");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_068-4 create image source failed'); console.info('TC_068-4 create image source failed');
...@@ -4073,7 +4053,7 @@ describe('Image', function () { ...@@ -4073,7 +4053,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068-5', 0, async function (done) { it('TC_068-5', 0, async function (done) {
await getFd("test.bmp"); await getFd("test5.bmp");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_068-5 create image source failed'); console.info('TC_068-5 create image source failed');
...@@ -4114,7 +4094,7 @@ describe('Image', function () { ...@@ -4114,7 +4094,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068-6', 0, async function (done) { it('TC_068-6', 0, async function (done) {
await getFd("test.bmp"); await getFd("test6.bmp");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_068-6 create image source failed'); console.info('TC_068-6 create image source failed');
...@@ -4155,7 +4135,7 @@ describe('Image', function () { ...@@ -4155,7 +4135,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068-7', 0, async function (done) { it('TC_068-7', 0, async function (done) {
await getFd("test.bmp"); await getFd("test7.bmp");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_068-7 create image source failed'); console.info('TC_068-7 create image source failed');
...@@ -4196,7 +4176,7 @@ describe('Image', function () { ...@@ -4196,7 +4176,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068-8', 0, async function (done) { it('TC_068-8', 0, async function (done) {
await getFd("test.bmp"); await getFd("test8.bmp");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_068-8 create image source failed'); console.info('TC_068-8 create image source failed');
...@@ -4232,7 +4212,7 @@ describe('Image', function () { ...@@ -4232,7 +4212,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068-9', 0, async function (done) { it('TC_068-9', 0, async function (done) {
await getFd("test.bmp"); await getFd("test9.bmp");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_068-9 create image source failed'); console.info('TC_068-9 create image source failed');
...@@ -4268,7 +4248,7 @@ describe('Image', function () { ...@@ -4268,7 +4248,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068-10', 0, async function (done) { it('TC_068-10', 0, async function (done) {
await getFd("test.bmp"); await getFd("test10.bmp");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info(' TC_068-10 create image source failed'); console.info(' TC_068-10 create image source failed');
...@@ -4309,7 +4289,7 @@ describe('Image', function () { ...@@ -4309,7 +4289,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068-11', 0, async function (done) { it('TC_068-11', 0, async function (done) {
await getFd("test.bmp"); await getFd("test11.bmp");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_068-11 create image source failed'); console.info('TC_068-11 create image source failed');
...@@ -4350,7 +4330,7 @@ describe('Image', function () { ...@@ -4350,7 +4330,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068-12', 0, async function (done) { it('TC_068-12', 0, async function (done) {
await getFd("test.bmp"); await getFd("test12.bmp");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_068-12 create image source failed'); console.info('TC_068-12 create image source failed');
...@@ -4390,7 +4370,7 @@ describe('Image', function () { ...@@ -4390,7 +4370,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068-13', 0, async function (done) { it('TC_068-13', 0, async function (done) {
await getFd("test.bmp"); await getFd("test13.bmp");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_068-13 create image source failed'); console.info('TC_068-13 create image source failed');
...@@ -4430,7 +4410,7 @@ describe('Image', function () { ...@@ -4430,7 +4410,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068-14', 0, async function (done) { it('TC_068-14', 0, async function (done) {
await getFd("test.bmp"); await getFd("test14.bmp");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_068-14 create image source failed'); console.info('TC_068-14 create image source failed');
...@@ -4461,7 +4441,7 @@ describe('Image', function () { ...@@ -4461,7 +4441,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068-15', 0, async function (done) { it('TC_068-15', 0, async function (done) {
await getFd("test.bmp"); await getFd("test15.bmp");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_068-15 create image source failed'); console.info('TC_068-15 create image source failed');
...@@ -4487,7 +4467,7 @@ describe('Image', function () { ...@@ -4487,7 +4467,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163', 0, async function (done) { it('TC_163', 0, async function (done) {
await getFd("test.png"); await getFd("test0.png");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_163 create image source failed'); console.info('TC_163 create image source failed');
...@@ -4522,7 +4502,7 @@ describe('Image', function () { ...@@ -4522,7 +4502,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163-1', 0, async function (done) { it('TC_163-1', 0, async function (done) {
await getFd("test.png"); await getFd("test1.png");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_163-1 create image source failed'); console.info('TC_163-1 create image source failed');
...@@ -4557,7 +4537,7 @@ describe('Image', function () { ...@@ -4557,7 +4537,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163-2', 0, async function (done) { it('TC_163-2', 0, async function (done) {
await getFd("test.png"); await getFd("test2.png");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_163-2 create image source failed'); console.info('TC_163-2 create image source failed');
...@@ -4592,7 +4572,7 @@ describe('Image', function () { ...@@ -4592,7 +4572,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163-3', 0, async function (done) { it('TC_163-3', 0, async function (done) {
await getFd("test.png"); await getFd("test3.png");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_163-3 create image source failed'); console.info('TC_163-3 create image source failed');
...@@ -4634,7 +4614,7 @@ describe('Image', function () { ...@@ -4634,7 +4614,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163-4', 0, async function (done) { it('TC_163-4', 0, async function (done) {
await getFd("test.png"); await getFd("test4.png");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_163-4 create image source failed'); console.info('TC_163-4 create image source failed');
...@@ -4676,7 +4656,7 @@ describe('Image', function () { ...@@ -4676,7 +4656,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163-5', 0, async function (done) { it('TC_163-5', 0, async function (done) {
await getFd("test.png"); await getFd("test5.png");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_163-5 create image source failed'); console.info('TC_163-5 create image source failed');
...@@ -4718,7 +4698,7 @@ describe('Image', function () { ...@@ -4718,7 +4698,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163-6', 0, async function (done) { it('TC_163-6', 0, async function (done) {
await getFd("test.png"); await getFd("test6.png");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_163-6 create image source failed'); console.info('TC_163-6 create image source failed');
...@@ -4760,7 +4740,7 @@ describe('Image', function () { ...@@ -4760,7 +4740,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163-7', 0, async function (done) { it('TC_163-7', 0, async function (done) {
await getFd("test.png"); await getFd("test7.png");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_163-7 create image source failed'); console.info('TC_163-7 create image source failed');
...@@ -4802,7 +4782,7 @@ describe('Image', function () { ...@@ -4802,7 +4782,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163-8', 0, async function (done) { it('TC_163-8', 0, async function (done) {
await getFd("test.png"); await getFd("test8.png");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_163-8 create image source failed'); console.info('TC_163-8 create image source failed');
...@@ -4838,8 +4818,9 @@ describe('Image', function () { ...@@ -4838,8 +4818,9 @@ describe('Image', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163-9', 0, async function (done) { it('TC_163-9', 0, async function (done) {
await getFd("test.png"); await getFd("test9.png");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_163-9 create image source failed'); console.info('TC_163-9 create image source failed');
...@@ -4849,7 +4830,7 @@ describe('Image', function () { ...@@ -4849,7 +4830,7 @@ describe('Image', function () {
let decodingOptions = { let decodingOptions = {
sampleSize:1, sampleSize:1,
editable: true, editable: true,
desiredSize:{ width:10000, height:10000}, desiredSize:{ width:500, height:500},
rotate:10, rotate:10,
desiredPixelFormat:2, desiredPixelFormat:2,
desiredRegion: { size: { height: 1, width: 2 }, x: 0, y: 0 }, desiredRegion: { size: { height: 1, width: 2 }, x: 0, y: 0 },
...@@ -4876,7 +4857,7 @@ describe('Image', function () { ...@@ -4876,7 +4857,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163-10', 0, async function (done) { it('TC_163-10', 0, async function (done) {
await getFd("test.png"); await getFd("test10.png");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info(' TC_163-10 create image source failed'); console.info(' TC_163-10 create image source failed');
...@@ -4918,7 +4899,7 @@ describe('Image', function () { ...@@ -4918,7 +4899,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163-11', 0, async function (done) { it('TC_163-11', 0, async function (done) {
await getFd("test.png"); await getFd("test11.png");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_163-11 create image source failed'); console.info('TC_163-11 create image source failed');
...@@ -4960,7 +4941,7 @@ describe('Image', function () { ...@@ -4960,7 +4941,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163-12', 0, async function (done) { it('TC_163-12', 0, async function (done) {
await getFd("test.png"); await getFd("test12.png");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_163-12 create image source failed'); console.info('TC_163-12 create image source failed');
...@@ -5000,7 +4981,7 @@ describe('Image', function () { ...@@ -5000,7 +4981,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163-13', 0, async function (done) { it('TC_163-13', 0, async function (done) {
await getFd("test.png"); await getFd("test13.png");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_163-13 create image source failed'); console.info('TC_163-13 create image source failed');
...@@ -5040,7 +5021,7 @@ describe('Image', function () { ...@@ -5040,7 +5021,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163-14', 0, async function (done) { it('TC_163-14', 0, async function (done) {
await getFd("test.png"); await getFd("test14.png");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_163-14 create image source failed'); console.info('TC_163-14 create image source failed');
...@@ -5071,7 +5052,7 @@ describe('Image', function () { ...@@ -5071,7 +5052,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163-15', 0, async function (done) { it('TC_163-15', 0, async function (done) {
await getFd("test.png"); await getFd("test15.png");
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_163-15 create image source failed'); console.info('TC_163-15 create image source failed');
...@@ -5256,7 +5237,7 @@ describe('Image', function () { ...@@ -5256,7 +5237,7 @@ describe('Image', function () {
imageSourceApi.getImageProperty("BitsPerSample") imageSourceApi.getImageProperty("BitsPerSample")
.then(data => { .then(data => {
console.info('TC_171 BitsPerSample ' + data); console.info('TC_171 BitsPerSample ' + data);
expect(data != undefined && data != '' ).assertTrue(); expect(data != undefined).assertTrue();
done(); done();
}) })
.catch(error => { .catch(error => {
...@@ -5556,7 +5537,7 @@ describe('Image', function () { ...@@ -5556,7 +5537,7 @@ describe('Image', function () {
done(); done();
}else{ }else{
console.info('TC_172 BitsPerSample ' + data); console.info('TC_172 BitsPerSample ' + data);
expect(data != undefined && data != '' ).assertTrue(); expect(data != undefined).assertTrue();
done(); done();
} }
}) })
...@@ -5846,7 +5827,7 @@ describe('Image', function () { ...@@ -5846,7 +5827,7 @@ describe('Image', function () {
done(); done();
}else{ }else{
console.info('TC_173 BitsPerSample ' + data); console.info('TC_173 BitsPerSample ' + data);
expect(data != '9999' && data != undefined && data != '').assertTrue(); expect(data != '9999' && data != undefined).assertTrue();
done(); done();
} }
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册