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

!5345 Modify XTS case name

Merge pull request !5345 from renhw/master
...@@ -61,7 +61,7 @@ export default function addImage() { ...@@ -61,7 +61,7 @@ export default function addImage() {
} }
/** /**
* @tc.number : addImage_001 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0100
* @tc.name : create pixelmap-promise (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 }, bytes = buffer,scaleMode: 1, alphaType: 0) * @tc.name : create pixelmap-promise (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 }, bytes = buffer,scaleMode: 1, alphaType: 0)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
* 2.set editable,pixeFormat,size * 2.set editable,pixeFormat,size
...@@ -71,13 +71,13 @@ export default function addImage() { ...@@ -71,13 +71,13 @@ export default function addImage() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('add_01_001', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0100', 0, async function (done) {
let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 }, scaleMode: 1, alphaType: 0 } let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 }, scaleMode: 1, alphaType: 0 }
createPixMapPromise(done, 'add_01_001', opts); createPixMapPromise(done, 'SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0100', opts);
}) })
/** /**
* @tc.number : add_01_002 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0200
* @tc.name : create pixelmap-promise (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 }, bytes = buffer,scaleMode: 1, alphaType: 1) * @tc.name : create pixelmap-promise (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 }, bytes = buffer,scaleMode: 1, alphaType: 1)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
* 2.set editable,pixeFormat,size * 2.set editable,pixeFormat,size
...@@ -87,13 +87,13 @@ export default function addImage() { ...@@ -87,13 +87,13 @@ export default function addImage() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('add_01_002', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0200', 0, async function (done) {
let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 }, scaleMode: 1, alphaType: 1 } let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 }, scaleMode: 1, alphaType: 1 }
createPixMapPromise(done, 'add_01_002', opts); createPixMapPromise(done, 'SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0200', opts);
}) })
/** /**
* @tc.number : add_01_003 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0300
* @tc.name : create pixelmap-promise (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 }, bytes = buffer,scaleMode: 0, alphaType: 2) * @tc.name : create pixelmap-promise (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 }, bytes = buffer,scaleMode: 0, alphaType: 2)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
* 2.set editable,pixeFormat,size * 2.set editable,pixeFormat,size
...@@ -103,13 +103,13 @@ export default function addImage() { ...@@ -103,13 +103,13 @@ export default function addImage() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('add_01_003', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0300', 0, async function (done) {
let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 }, scaleMode: 0, alphaType: 2 } let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 }, scaleMode: 0, alphaType: 2 }
createPixMapPromise(done, 'add_01_003', opts); createPixMapPromise(done, 'SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0300', opts);
}) })
/** /**
* @tc.number : add_01_004 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0400
* @tc.name : create pixelmap-promise (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 }, bytes = buffer,scaleMode: 0, alphaType: 3) * @tc.name : create pixelmap-promise (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 }, bytes = buffer,scaleMode: 0, alphaType: 3)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
* 2.set editable,pixeFormat,size * 2.set editable,pixeFormat,size
...@@ -119,13 +119,13 @@ export default function addImage() { ...@@ -119,13 +119,13 @@ export default function addImage() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('add_01_004', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0400', 0, async function (done) {
let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 }, scaleMode: 0, alphaType: 3 } let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 }, scaleMode: 0, alphaType: 3 }
createPixMapPromise(done, 'add_01_004', opts); createPixMapPromise(done, 'SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0400', opts);
}) })
/** /**
* @tc.number : add_02_001 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_0100
* @tc.name : create pixelmap-callback (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 }, bytes = buffer,scaleMode: 0, alphaType: 0) * @tc.name : create pixelmap-callback (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 }, bytes = buffer,scaleMode: 0, alphaType: 0)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
* 2.set editable,pixeFormat,size * 2.set editable,pixeFormat,size
...@@ -135,13 +135,13 @@ export default function addImage() { ...@@ -135,13 +135,13 @@ export default function addImage() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('add_02_001', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_0100', 0, async function (done) {
let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 }, scaleMode: 0, alphaType: 0 } let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 }, scaleMode: 0, alphaType: 0 }
createPixMapCb(done, 'add_02_001', opts); createPixMapCb(done, 'SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_0100', opts);
}) })
/** /**
* @tc.number : add_02_002 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_0200
* @tc.name : create pixelmap-callback (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 }, bytes = buffer,scaleMode: 0, alphaType: 1) * @tc.name : create pixelmap-callback (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 }, bytes = buffer,scaleMode: 0, alphaType: 1)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
* 2.set editable,pixeFormat,size * 2.set editable,pixeFormat,size
...@@ -151,13 +151,13 @@ export default function addImage() { ...@@ -151,13 +151,13 @@ export default function addImage() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('add_02_002', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_0200', 0, async function (done) {
let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 }, scaleMode: 0, alphaType: 1 } let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 }, scaleMode: 0, alphaType: 1 }
createPixMapCb(done, 'add_02_002', opts); createPixMapCb(done, 'SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_0200', opts);
}) })
/** /**
* @tc.number : add_02_003 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_0300
* @tc.name : create pixelmap-callback (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 }, bytes = buffer,scaleMode: 1, alphaType: 2) * @tc.name : create pixelmap-callback (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 }, bytes = buffer,scaleMode: 1, alphaType: 2)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
* 2.set editable,pixeFormat,size * 2.set editable,pixeFormat,size
...@@ -167,13 +167,13 @@ export default function addImage() { ...@@ -167,13 +167,13 @@ export default function addImage() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('add_02_003', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_0300', 0, async function (done) {
let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 }, scaleMode: 1, alphaType: 2 } let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 }, scaleMode: 1, alphaType: 2 }
createPixMapCb(done, 'add_02_003', opts); createPixMapCb(done, 'SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_0300', opts);
}) })
/** /**
* @tc.number : add_02_004 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_0400
* @tc.name : create pixelmap-callback (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 }, bytes = buffer,scaleMode: 1, alphaType: 3) * @tc.name : create pixelmap-callback (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 }, bytes = buffer,scaleMode: 1, alphaType: 3)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
* 2.set editable,pixeFormat,size * 2.set editable,pixeFormat,size
...@@ -183,13 +183,13 @@ export default function addImage() { ...@@ -183,13 +183,13 @@ export default function addImage() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('add_02_004', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_0400', 0, async function (done) {
let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 }, scaleMode: 1, alphaType: 3 } let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 }, scaleMode: 1, alphaType: 3 }
createPixMapCb(done, 'add_02_004', opts); createPixMapCb(done, 'SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_0400', opts);
}) })
/** /**
* @tc.number : add_053 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_PNG_PROMISE_0100
* @tc.name : createIncrementalSource-updateData-png-promise * @tc.name : createIncrementalSource-updateData-png-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.update data * 2.update data
...@@ -198,38 +198,38 @@ export default function addImage() { ...@@ -198,38 +198,38 @@ export default function addImage() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('add_053', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_PNG_PROMISE_0100', 0, async function (done) {
try { try {
let testimagebuffer = testPng; let testimagebuffer = testPng;
console.info('add_053 0003 ' + testimagebuffer.length); console.info('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_PNG_PROMISE_0100 0003 ' + testimagebuffer.length);
let bufferSize = 5000; let bufferSize = 5000;
let offset = 0; let offset = 0;
const incSouce = image.createIncrementalSource(new ArrayBuffer(1)); const incSouce = image.createIncrementalSource(new ArrayBuffer(1));
let ret; let ret;
let isFinished = false; let isFinished = false;
while (offset < testimagebuffer.length) { while (offset < testimagebuffer.length) {
console.info('add_053 0006 ' + testimagebuffer.length); console.info('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_PNG_PROMISE_0100 0006 ' + testimagebuffer.length);
var oneStep = testimagebuffer.slice(offset, offset + bufferSize); var oneStep = testimagebuffer.slice(offset, offset + bufferSize);
console.info('add_053 0007 ' + oneStep.length); console.info('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_PNG_PROMISE_0100 0007 ' + oneStep.length);
if (oneStep.length < bufferSize) { if (oneStep.length < bufferSize) {
isFinished = true; isFinished = true;
} }
ret = await incSouce.updateData(oneStep, isFinished, 0, oneStep.length); ret = await incSouce.updateData(oneStep, isFinished, 0, oneStep.length);
if (!ret) { if (!ret) {
console.info('add_053 updateData failed'); console.info('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_PNG_PROMISE_0100 updateData failed');
expect(ret).assertTrue(); expect(ret).assertTrue();
break; break;
} }
offset = offset + oneStep.length; offset = offset + oneStep.length;
console.info('add_053 0011 ' + offset); console.info('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_PNG_PROMISE_0100 0011 ' + offset);
} }
if (ret) { if (ret) {
console.info('add_053 updateData success '); console.info('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_PNG_PROMISE_0100 updateData success ');
let decodingOptions = { let decodingOptions = {
sampleSize: 1 sampleSize: 1
}; };
incSouce.createPixelMap(decodingOptions, (err, pixelmap) => { incSouce.createPixelMap(decodingOptions, (err, pixelmap) => {
console.info('add_053 0014' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_PNG_PROMISE_0100 0014' + pixelmap);
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
}) })
...@@ -239,12 +239,12 @@ export default function addImage() { ...@@ -239,12 +239,12 @@ export default function addImage() {
} }
} catch (error) { } catch (error) {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('add_053 updateData failed ' + error); console.info('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_PNG_PROMISE_0100 updateData failed ' + error);
} }
}) })
/** /**
* @tc.number : add_053-1 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_PNG_PROMISE_0200
* @tc.name : createIncrementalSource-updateData-png-promise * @tc.name : createIncrementalSource-updateData-png-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.update data * 2.update data
...@@ -253,10 +253,10 @@ export default function addImage() { ...@@ -253,10 +253,10 @@ export default function addImage() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('add_053-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_PNG_PROMISE_0200', 0, async function (done) {
try { try {
let testimagebuffer = testPng; let testimagebuffer = testPng;
console.info('add_053-1 0001 ' + testimagebuffer.length); console.info('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_PNG_PROMISE_0200 0001 ' + testimagebuffer.length);
let bufferSize = 5000; let bufferSize = 5000;
let offset = 0; let offset = 0;
const incSouce = image.createIncrementalSource(new ArrayBuffer(1)); const incSouce = image.createIncrementalSource(new ArrayBuffer(1));
...@@ -264,7 +264,7 @@ export default function addImage() { ...@@ -264,7 +264,7 @@ export default function addImage() {
let isFinished = false; let isFinished = false;
while (offset < testimagebuffer.length) { while (offset < testimagebuffer.length) {
var oneStep = testimagebuffer.slice(offset, offset + bufferSize); var oneStep = testimagebuffer.slice(offset, offset + bufferSize);
console.info('add_053-1 0002 ' + oneStep.length); console.info('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_PNG_PROMISE_0200 0002 ' + oneStep.length);
if (oneStep.length < bufferSize) { if (oneStep.length < bufferSize) {
isFinished = true; isFinished = true;
} }
...@@ -274,20 +274,20 @@ export default function addImage() { ...@@ -274,20 +274,20 @@ export default function addImage() {
}) })
}) })
if (!ret) { if (!ret) {
console.info('add_053-1 updateData failed'); console.info('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_PNG_PROMISE_0200 updateData failed');
expect(ret).assertTrue(); expect(ret).assertTrue();
break; break;
} }
offset = offset + oneStep.length; offset = offset + oneStep.length;
console.info('add_053-1 0003 ' + offset); console.info('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_PNG_PROMISE_0200 0003 ' + offset);
} }
if (ret) { if (ret) {
console.info('add_053-1 updateData success '); console.info('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_PNG_PROMISE_0200 updateData success ');
let decodingOptions = { let decodingOptions = {
sampleSize: 1 sampleSize: 1
}; };
incSouce.createPixelMap(decodingOptions, (err, pixelmap) => { incSouce.createPixelMap(decodingOptions, (err, pixelmap) => {
console.info('add_053-1 0004' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_PNG_PROMISE_0200 0004' + pixelmap);
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
}) })
...@@ -297,7 +297,7 @@ export default function addImage() { ...@@ -297,7 +297,7 @@ export default function addImage() {
} }
} catch (error) { } catch (error) {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('add_053-1 updateData failed ' + error); console.info('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_PNG_PROMISE_0200 updateData failed ' + error);
} }
}) })
}) })
......
...@@ -65,7 +65,7 @@ export default function imageJsTest() { ...@@ -65,7 +65,7 @@ export default function imageJsTest() {
}) })
/** /**
* @tc.number : TC_001 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0500
* @tc.name : create pixelmap-promise (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 }, bytes = buffer) * @tc.name : create pixelmap-promise (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 }, bytes = buffer)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
* 2.set editable,pixeFormat,size * 2.set editable,pixeFormat,size
...@@ -75,25 +75,25 @@ export default function imageJsTest() { ...@@ -75,25 +75,25 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('TC_001', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0500', 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) image.createPixelMap(Color, opts)
.then(pixelmap => { .then(pixelmap => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
console.info('TC_001 success'); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0500 success');
done(); done();
}) })
.catch(error => { .catch(error => {
console.log('TC_001 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0500 error: ' + error);
expect().assertFail(); expect().assertFail();
done(); done();
}) })
}) })
/** /**
* @tc.number : TC_001-1 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_0500
* @tc.name : create pixelmap-callback (editable: false, pixelFormat: RGBA_8888, size: { height: 4, width: 6 },bytes = buffer) * @tc.name : create pixelmap-callback (editable: false, pixelFormat: RGBA_8888, size: { height: 4, width: 6 },bytes = buffer)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
* 2.set editable,pixelFormat,size * 2.set editable,pixelFormat,size
...@@ -103,19 +103,19 @@ export default function imageJsTest() { ...@@ -103,19 +103,19 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('TC_001-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_0500', 0, async function (done) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
let opts = { editable: false, pixelFormat: 3, size: { height: 4, width: 6 } } let opts = { editable: false, pixelFormat: 3, size: { height: 4, width: 6 } }
image.createPixelMap(Color, opts, (err, pixelmap) => { image.createPixelMap(Color, opts, (err, pixelmap) => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
console.info('TC_001-1 success'); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_0500 success');
done(); done();
}) })
}) })
/** /**
* @tc.number : TC_001-2 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0600
* @tc.name : createpixelmap-promise (editable: true, pixelFormat: RGB_565, size: { height: 6, width: 8 },bytes = buffer) * @tc.name : createpixelmap-promise (editable: true, pixelFormat: RGB_565, size: { height: 6, width: 8 },bytes = buffer)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
* 2.set editable,pixelFormat,size * 2.set editable,pixelFormat,size
...@@ -125,25 +125,25 @@ export default function imageJsTest() { ...@@ -125,25 +125,25 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('TC_001-2', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0600', 0, async function (done) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
let opts = { editable: true, pixelFormat: 2, size: { height: 6, width: 8 } } let opts = { editable: true, pixelFormat: 2, size: { height: 6, width: 8 } }
image.createPixelMap(Color, opts) image.createPixelMap(Color, opts)
.then(pixelmap => { .then(pixelmap => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
console.info('TC_001-2 success'); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0600 success');
done(); done();
}) })
.catch(error => { .catch(error => {
console.log('TC_001-2 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0600 error: ' + error);
expect().assertFail(); expect().assertFail();
done(); done();
}) })
}) })
/** /**
* @tc.number : TC_001-3 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_0600
* @tc.name : createpixelmap-callback (editable: false, pixelFormat: RGB_565, size: { height: 6, width: 8 },bytes = buffer) * @tc.name : createpixelmap-callback (editable: false, pixelFormat: RGB_565, size: { height: 6, width: 8 },bytes = buffer)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
* 2.set editable,pixelFormat,size * 2.set editable,pixelFormat,size
...@@ -153,20 +153,20 @@ export default function imageJsTest() { ...@@ -153,20 +153,20 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('TC_001-3', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_0600', 0, async function (done) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
let opts = { editable: false, pixelFormat: 2, size: { height: 6, width: 8 } } let opts = { editable: false, pixelFormat: 2, size: { height: 6, width: 8 } }
image.createPixelMap(Color, opts, (err, pixelmap) => { image.createPixelMap(Color, opts, (err, pixelmap) => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
console.info('TC_001-3 success'); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_0600 success');
done(); done();
}) })
}) })
/** /**
* @tc.number : TC_001-4 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0700
* @tc.name : createpixelmap-promise(editable: true, pixelFormat: unkonwn, size: { height: 6, width: 8 }) * @tc.name : createpixelmap-promise(editable: true, pixelFormat: unkonwn, size: { height: 6, width: 8 })
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
* 2.set editable,pixelFormat,size * 2.set editable,pixelFormat,size
...@@ -176,25 +176,25 @@ export default function imageJsTest() { ...@@ -176,25 +176,25 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('TC_001-4', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0700', 0, async function (done) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
let opts = { editable: true, pixelFormat: 0, size: { height: 6, width: 8 } } let opts = { editable: true, pixelFormat: 0, size: { height: 6, width: 8 } }
image.createPixelMap(Color, opts) image.createPixelMap(Color, opts)
.then(pixelmap => { .then(pixelmap => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
console.info('TC_001-4 success'); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0700 success');
done(); done();
}) })
.catch(error => { .catch(error => {
console.log('TC_001-4 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0700 error: ' + error);
expect().assertFail(); expect().assertFail();
done(); done();
}) })
}) })
/** /**
* @tc.number : TC_001-5 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_0700
* @tc.name : create pixelmap-callback(editable: false, pixelFormat: unkonwn, size: { height: 6, width: 8 }) * @tc.name : create pixelmap-callback(editable: false, pixelFormat: unkonwn, size: { height: 6, width: 8 })
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
* 2.set editable,pixelFormat,size * 2.set editable,pixelFormat,size
...@@ -204,19 +204,19 @@ export default function imageJsTest() { ...@@ -204,19 +204,19 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('TC_001-5', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_0700', 0, async function (done) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
let opts = { editable: false, pixelFormat: 0, size: { height: 6, width: 8 } } let opts = { editable: false, pixelFormat: 0, size: { height: 6, width: 8 } }
image.createPixelMap(Color, opts, (err, pixelmap) => { image.createPixelMap(Color, opts, (err, pixelmap) => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
console.info('TC_001-5 success'); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_0700 success');
done(); done();
}) })
}) })
/** /**
* @tc.number : TC_001-6 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_0800
* @tc.name : create pixelmap-callback(editable: true, pixelFormat: RGBA_8888, size: { height: 6, width: 8 } bytes > buffer ) * @tc.name : create pixelmap-callback(editable: true, pixelFormat: RGBA_8888, size: { height: 6, width: 8 } bytes > buffer )
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
* 2.set editable,pixeFormat,size * 2.set editable,pixeFormat,size
...@@ -226,19 +226,19 @@ export default function imageJsTest() { ...@@ -226,19 +226,19 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('TC_001-6', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_0800', 0, async function (done) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
let opts = { editable: true, pixelFormat: 3, size: { height: 6, width: 8 } } let opts = { editable: true, pixelFormat: 3, size: { height: 6, width: 8 } }
image.createPixelMap(Color, opts, (err, pixelmap) => { image.createPixelMap(Color, opts, (err, pixelmap) => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
console.info('TC_001-6 success'); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_0800 success');
done(); done();
}) })
}) })
/** /**
* @tc.number : TC_001-7 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_0900
* @tc.name : create pixelmap-callback(editable: true, pixelFormat: RGB_565, size: { height: 2, width: 3 }, bytes < buffer) * @tc.name : create pixelmap-callback(editable: true, pixelFormat: RGB_565, size: { height: 2, width: 3 }, bytes < buffer)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
* 2.set editable,pixeFormat,size * 2.set editable,pixeFormat,size
...@@ -248,19 +248,19 @@ export default function imageJsTest() { ...@@ -248,19 +248,19 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('TC_001-7', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_0900', 0, async function (done) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
let opts = { editable: true, pixelFormat: 2, size: { height: 2, width: 3 } } let opts = { editable: true, pixelFormat: 2, size: { height: 2, width: 3 } }
image.createPixelMap(Color, opts, (err, pixelmap) => { image.createPixelMap(Color, opts, (err, pixelmap) => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
console.info('TC_001-7 success'); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_0900 success');
done(); done();
}) })
}) })
/** /**
* @tc.number : TC_001-8 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_1000
* @tc.name : create pixelmap-callback(editable: true, pixelFormat: unkonwn, size: { height: -1, width: -1 }) * @tc.name : create pixelmap-callback(editable: true, pixelFormat: unkonwn, size: { height: -1, width: -1 })
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
* 2.set editable,pixeFormat,size * 2.set editable,pixeFormat,size
...@@ -270,19 +270,19 @@ export default function imageJsTest() { ...@@ -270,19 +270,19 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('TC_001-8', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_1000', 0, async function (done) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
let opts = { editable: true, pixelFormat: 0, size: { height: -1, width: -1 } } let opts = { editable: true, pixelFormat: 0, size: { height: -1, width: -1 } }
image.createPixelMap(Color, opts, (err, pixelmap) => { image.createPixelMap(Color, opts, (err, pixelmap) => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
expect(pixelmap == undefined).assertTrue(); expect(pixelmap == undefined).assertTrue();
console.info('TC_001-8 success'); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_1000 success');
done(); done();
}) })
}) })
/** /**
* @tc.number : TC_001-9 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_1100
* @tc.name : create pixelmap-callback(editable: true, pixelFormat: unsupported format, size: { height: 6, width: 8 }) * @tc.name : create pixelmap-callback(editable: true, pixelFormat: unsupported format, size: { height: 6, width: 8 })
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
* 2.set editable,pixeFormat,size(Unsupported formats are converted to RGBA_8888) * 2.set editable,pixeFormat,size(Unsupported formats are converted to RGBA_8888)
...@@ -292,19 +292,19 @@ export default function imageJsTest() { ...@@ -292,19 +292,19 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('TC_001-9', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_1100', 0, async function (done) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
let opts = { editable: true, pixelFormat: 21, size: { height: 6, width: 8 } } let opts = { editable: true, pixelFormat: 21, size: { height: 6, width: 8 } }
image.createPixelMap(Color, opts, (err, pixelmap) => { image.createPixelMap(Color, opts, (err, pixelmap) => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
console.info('TC_001-9 success'); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_1100 success');
done(); done();
}) })
}) })
/** /**
* @tc.number : TC_020 * @tc.number : SUB_GRAPHIC_IMAGE_READPIXELSTOBUFFER_PROMISE_0100
* @tc.name : readPixelsToBuffer-promise * @tc.name : readPixelsToBuffer-promise
* @tc.desc : read all pixels to an buffer * @tc.desc : read all pixels to an buffer
* 1.create PixelMap,buffer * 1.create PixelMap,buffer
...@@ -314,8 +314,8 @@ export default function imageJsTest() { ...@@ -314,8 +314,8 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_020', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_READPIXELSTOBUFFER_PROMISE_0100', 0, async function (done) {
console.info('TC_020 in'); console.info('SUB_GRAPHIC_IMAGE_READPIXELSTOBUFFER_PROMISE_0100 in');
const color = new ArrayBuffer(96); const color = new ArrayBuffer(96);
var bufferArr = new Uint8Array(color); var bufferArr = new Uint8Array(color);
for (var i = 0; i < bufferArr.length; i++) { for (var i = 0; i < bufferArr.length; i++) {
...@@ -327,7 +327,7 @@ export default function imageJsTest() { ...@@ -327,7 +327,7 @@ export default function imageJsTest() {
.then(pixelmap => { .then(pixelmap => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
if (pixelmap == undefined) { if (pixelmap == undefined) {
console.info('TC_020 createPixelMap failed'); console.info('SUB_GRAPHIC_IMAGE_READPIXELSTOBUFFER_PROMISE_0100 createPixelMap failed');
expect(false).assertTrue() expect(false).assertTrue()
done(); done();
} }
...@@ -339,31 +339,31 @@ export default function imageJsTest() { ...@@ -339,31 +339,31 @@ export default function imageJsTest() {
if (bufferArr2[i] != tcBuf020[i]) { if (bufferArr2[i] != tcBuf020[i]) {
res = false; res = false;
console.info('TC_20_buffer' + bufferArr2[i]); console.info('TC_20_buffer' + bufferArr2[i]);
console.info('TC_020 failed'); console.info('SUB_GRAPHIC_IMAGE_READPIXELSTOBUFFER_PROMISE_0100 failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
break; break;
} }
} }
if (res) { if (res) {
console.info('TC_020 success'); console.info('SUB_GRAPHIC_IMAGE_READPIXELSTOBUFFER_PROMISE_0100 success');
expect(true).assertTrue() expect(true).assertTrue()
done(); done();
} }
}).catch(error => { }).catch(error => {
console.log('TC_020 read error: ' + error); console.log('SUB_GRAPHIC_IMAGE_READPIXELSTOBUFFER_PROMISE_0100 read error: ' + error);
expect().assertFail(); expect().assertFail();
done(); done();
}) })
}).catch(error => { }).catch(error => {
console.log('TC_020 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_READPIXELSTOBUFFER_PROMISE_0100 error: ' + error);
expect().assertFail(); expect().assertFail();
done(); done();
}) })
}) })
/** /**
* @tc.number : TC_020-1 * @tc.number : SUB_GRAPHIC_IMAGE_READPIXELSTOBUFFER_CALLBACK_0100
* @tc.name : readPixelsToBuffer-callback * @tc.name : readPixelsToBuffer-callback
* @tc.desc : read all pixels to an buffer * @tc.desc : read all pixels to an buffer
* 1.create PixelMap,buffer * 1.create PixelMap,buffer
...@@ -373,8 +373,8 @@ export default function imageJsTest() { ...@@ -373,8 +373,8 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_020-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_READPIXELSTOBUFFER_CALLBACK_0100', 0, async function (done) {
console.info('TC_020-1 in'); console.info('SUB_GRAPHIC_IMAGE_READPIXELSTOBUFFER_CALLBACK_0100 in');
const color = new ArrayBuffer(96); const color = new ArrayBuffer(96);
var bufferArr = new Uint8Array(color); var bufferArr = new Uint8Array(color);
for (var i = 0; i < bufferArr.length; i++) { for (var i = 0; i < bufferArr.length; i++) {
...@@ -385,7 +385,7 @@ export default function imageJsTest() { ...@@ -385,7 +385,7 @@ export default function imageJsTest() {
image.createPixelMap(color, opts, (err, pixelmap) => { image.createPixelMap(color, opts, (err, pixelmap) => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
if (pixelmap == undefined) { if (pixelmap == undefined) {
console.info('TC_020-1 createPixelMap failed'); console.info('SUB_GRAPHIC_IMAGE_READPIXELSTOBUFFER_CALLBACK_0100 createPixelMap failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -396,14 +396,14 @@ export default function imageJsTest() { ...@@ -396,14 +396,14 @@ export default function imageJsTest() {
for (var i = 0; i < bufferArr.length; i++) { for (var i = 0; i < bufferArr.length; i++) {
if (bufferArr[i] != tcBuf020_1[i]) { if (bufferArr[i] != tcBuf020_1[i]) {
res = false; res = false;
console.info('TC_020-1 failed'); console.info('SUB_GRAPHIC_IMAGE_READPIXELSTOBUFFER_CALLBACK_0100 failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
break; break;
} }
} }
if (res) { if (res) {
console.info('TC_020-1 success'); console.info('SUB_GRAPHIC_IMAGE_READPIXELSTOBUFFER_CALLBACK_0100 success');
expect(true).assertTrue() expect(true).assertTrue()
done(); done();
} }
...@@ -413,7 +413,7 @@ export default function imageJsTest() { ...@@ -413,7 +413,7 @@ export default function imageJsTest() {
}) })
/** /**
* @tc.number : TC_020-2 * @tc.number : SUB_GRAPHIC_IMAGE_READPIXELSTOBUFFER_CALLBACK_0200
* @tc.name : readPixelsToBuffer-callback(buffer:0) * @tc.name : readPixelsToBuffer-callback(buffer:0)
* @tc.desc : read all pixels to an buffer * @tc.desc : read all pixels to an buffer
* 1.create PixelMap,buffer * 1.create PixelMap,buffer
...@@ -423,8 +423,8 @@ export default function imageJsTest() { ...@@ -423,8 +423,8 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_020-2', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_READPIXELSTOBUFFER_CALLBACK_0200', 0, async function (done) {
console.info('TC_020-2 in'); console.info('SUB_GRAPHIC_IMAGE_READPIXELSTOBUFFER_CALLBACK_0200 in');
const color = new ArrayBuffer(96); const color = new ArrayBuffer(96);
var bufferArr = new Uint8Array(color); var bufferArr = new Uint8Array(color);
for (var i = 0; i < bufferArr.length; i++) { for (var i = 0; i < bufferArr.length; i++) {
...@@ -435,7 +435,7 @@ export default function imageJsTest() { ...@@ -435,7 +435,7 @@ export default function imageJsTest() {
image.createPixelMap(color, opts, (err, pixelmap) => { image.createPixelMap(color, opts, (err, pixelmap) => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
if (pixelmap == undefined) { if (pixelmap == undefined) {
console.info('TC_020-2 createPixelMap failed'); console.info('SUB_GRAPHIC_IMAGE_READPIXELSTOBUFFER_CALLBACK_0200 createPixelMap failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -446,14 +446,14 @@ export default function imageJsTest() { ...@@ -446,14 +446,14 @@ export default function imageJsTest() {
for (var i = 0; i < bufferArr.length; i++) { for (var i = 0; i < bufferArr.length; i++) {
if (bufferArr[i] == 0) { if (bufferArr[i] == 0) {
res = false; res = false;
console.info('TC_020-2 failed'); console.info('SUB_GRAPHIC_IMAGE_READPIXELSTOBUFFER_CALLBACK_0200 failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
break; break;
} }
} }
if (res) { if (res) {
console.info('TC_020-2 success'); console.info('SUB_GRAPHIC_IMAGE_READPIXELSTOBUFFER_CALLBACK_0200 success');
expect(true).assertTrue() expect(true).assertTrue()
done(); done();
} }
...@@ -463,7 +463,7 @@ export default function imageJsTest() { ...@@ -463,7 +463,7 @@ export default function imageJsTest() {
}) })
/** /**
* @tc.number : TC_021 * @tc.number : SUB_GRAPHIC_IMAGE_READPIXELS_PROMISE_0100
* @tc.name : readPixels-promise * @tc.name : readPixels-promise
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.call readPixels * 2.call readPixels
...@@ -473,7 +473,7 @@ export default function imageJsTest() { ...@@ -473,7 +473,7 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_021', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_READPIXELS_PROMISE_0100', 0, async function (done) {
const color = new ArrayBuffer(96); const color = new ArrayBuffer(96);
var bufferArr = new Uint8Array(color); var bufferArr = new Uint8Array(color);
for (var i = 0; i < bufferArr.length; i++) { for (var i = 0; i < bufferArr.length; i++) {
...@@ -484,7 +484,7 @@ export default function imageJsTest() { ...@@ -484,7 +484,7 @@ export default function imageJsTest() {
.then(pixelmap => { .then(pixelmap => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
if (pixelmap == undefined) { if (pixelmap == undefined) {
console.info('TC_021 createPixelMap failed'); console.info('SUB_GRAPHIC_IMAGE_READPIXELS_PROMISE_0100 createPixelMap failed');
expect(false).assertTrue() expect(false).assertTrue()
done(); done();
} }
...@@ -500,28 +500,28 @@ export default function imageJsTest() { ...@@ -500,28 +500,28 @@ export default function imageJsTest() {
for (var i = 0; i < bufferArr2.length; i++) { for (var i = 0; i < bufferArr2.length; i++) {
if (bufferArr2[i] != tcBuf021[i]) { if (bufferArr2[i] != tcBuf021[i]) {
res = false; res = false;
console.info('TC_021 failed'); console.info('SUB_GRAPHIC_IMAGE_READPIXELS_PROMISE_0100 failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
break; break;
} }
} }
if (res) { if (res) {
console.info('TC_021 success'); console.info('SUB_GRAPHIC_IMAGE_READPIXELS_PROMISE_0100 success');
expect(true).assertTrue() expect(true).assertTrue()
done(); done();
} }
}) })
}) })
.catch(error => { .catch(error => {
console.log('TC_021 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_READPIXELS_PROMISE_0100 error: ' + error);
expect().assertFail(); expect().assertFail();
done(); done();
}) })
}) })
/** /**
* @tc.number : TC_021-1 * @tc.number : SUB_GRAPHIC_IMAGE_READPIXELS_CALLBACK_0100
* @tc.name : readPixels-callback * @tc.name : readPixels-callback
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.call readPixels * 2.call readPixels
...@@ -531,7 +531,7 @@ export default function imageJsTest() { ...@@ -531,7 +531,7 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_021-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_READPIXELS_CALLBACK_0100', 0, async function (done) {
const color = new ArrayBuffer(96); const color = new ArrayBuffer(96);
var bufferArr = new Uint8Array(color); var bufferArr = new Uint8Array(color);
for (var i = 0; i < bufferArr.length; i++) { for (var i = 0; i < bufferArr.length; i++) {
...@@ -541,7 +541,7 @@ export default function imageJsTest() { ...@@ -541,7 +541,7 @@ export default function imageJsTest() {
image.createPixelMap(color, opts, (err, pixelmap) => { image.createPixelMap(color, opts, (err, pixelmap) => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
if (pixelmap == undefined) { if (pixelmap == undefined) {
console.info('TC_020-1 createPixelMap failed'); console.info('SUB_GRAPHIC_IMAGE_READPIXELSTOBUFFER_CALLBACK_0100 createPixelMap failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -555,17 +555,17 @@ export default function imageJsTest() { ...@@ -555,17 +555,17 @@ export default function imageJsTest() {
var bufferArr = new Uint8Array(area.pixels); var bufferArr = new Uint8Array(area.pixels);
var res = true; var res = true;
for (var i = 0; i < bufferArr.length; i++) { for (var i = 0; i < bufferArr.length; i++) {
console.info('TC_021-1 buffer ' + bufferArr[i]); console.info('SUB_GRAPHIC_IMAGE_READPIXELS_CALLBACK_0100 buffer ' + bufferArr[i]);
if (bufferArr[i] != tcBuf021_1[i]) { if (bufferArr[i] != tcBuf021_1[i]) {
res = false; res = false;
console.info('TC_021-1 failed'); console.info('SUB_GRAPHIC_IMAGE_READPIXELS_CALLBACK_0100 failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
break; break;
} }
} }
if (res) { if (res) {
console.info('TC_021-1 success'); console.info('SUB_GRAPHIC_IMAGE_READPIXELS_CALLBACK_0100 success');
expect(true).assertTrue() expect(true).assertTrue()
done(); done();
} }
...@@ -575,7 +575,7 @@ export default function imageJsTest() { ...@@ -575,7 +575,7 @@ export default function imageJsTest() {
}) })
/** /**
* @tc.number : TC_021-2 * @tc.number : SUB_GRAPHIC_IMAGE_READPIXELS_CALLBACK_0200
* @tc.name : readPixels-callback( region: { size: { height: 1, width: 2 }, x: -1, y: -1 }) * @tc.name : readPixels-callback( region: { size: { height: 1, width: 2 }, x: -1, y: -1 })
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.call readPixels * 2.call readPixels
...@@ -585,7 +585,7 @@ export default function imageJsTest() { ...@@ -585,7 +585,7 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_021-2', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_READPIXELS_CALLBACK_0200', 0, async function (done) {
const color = new ArrayBuffer(96); const color = new ArrayBuffer(96);
var bufferArr = new Uint8Array(color); var bufferArr = new Uint8Array(color);
for (var i = 0; i < bufferArr.length; i++) { for (var i = 0; i < bufferArr.length; i++) {
...@@ -596,7 +596,7 @@ export default function imageJsTest() { ...@@ -596,7 +596,7 @@ export default function imageJsTest() {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
if (pixelmap == undefined) { if (pixelmap == undefined) {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('TC_021-2 create pixelmap fail'); console.info('SUB_GRAPHIC_IMAGE_READPIXELS_CALLBACK_0200 create pixelmap fail');
done(); done();
} else { } else {
const area = { const area = {
...@@ -606,12 +606,12 @@ export default function imageJsTest() { ...@@ -606,12 +606,12 @@ export default function imageJsTest() {
region: { size: { height: 1, width: 2 }, x: -1, y: -1 } region: { size: { height: 1, width: 2 }, x: -1, y: -1 }
} }
pixelmap.readPixels(area).then(() => { pixelmap.readPixels(area).then(() => {
console.info('TC_021-2 failed'); console.info('SUB_GRAPHIC_IMAGE_READPIXELS_CALLBACK_0200 failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
}).catch(() => { }).catch(() => {
expect(true).assertTrue(); expect(true).assertTrue();
console.info('TC_021-2 success'); console.info('SUB_GRAPHIC_IMAGE_READPIXELS_CALLBACK_0200 success');
done(); done();
}) })
} }
...@@ -619,7 +619,7 @@ export default function imageJsTest() { ...@@ -619,7 +619,7 @@ export default function imageJsTest() {
}) })
/** /**
* @tc.number : TC_021-3 * @tc.number : SUB_GRAPHIC_IMAGE_READPIXELS_PROMISE_0200
* @tc.name : readPixels-promise(buffer:0) * @tc.name : readPixels-promise(buffer:0)
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.call readPixels * 2.call readPixels
...@@ -629,7 +629,7 @@ export default function imageJsTest() { ...@@ -629,7 +629,7 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_021-3', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_READPIXELS_PROMISE_0200', 0, async function (done) {
const color = new ArrayBuffer(96); const color = new ArrayBuffer(96);
var bufferArr = new Uint8Array(color); var bufferArr = new Uint8Array(color);
for (var i = 0; i < bufferArr.length; i++) { for (var i = 0; i < bufferArr.length; i++) {
...@@ -640,7 +640,7 @@ export default function imageJsTest() { ...@@ -640,7 +640,7 @@ export default function imageJsTest() {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
if (pixelmap == undefined) { if (pixelmap == undefined) {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('TC_021-3 create pixelmap failed'); console.info('SUB_GRAPHIC_IMAGE_READPIXELS_PROMISE_0200 create pixelmap failed');
done(); done();
} else { } else {
const area = { const area = {
...@@ -650,12 +650,12 @@ export default function imageJsTest() { ...@@ -650,12 +650,12 @@ export default function imageJsTest() {
region: { size: { height: 1, width: 2 }, x: 0, y: 0 } region: { size: { height: 1, width: 2 }, x: 0, y: 0 }
} }
pixelmap.readPixels(area).then(() => { pixelmap.readPixels(area).then(() => {
console.info('TC_021-3 failed'); console.info('SUB_GRAPHIC_IMAGE_READPIXELS_PROMISE_0200 failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
}).catch(() => { }).catch(() => {
expect(true).assertTrue(); expect(true).assertTrue();
console.info('TC_021-3 success'); console.info('SUB_GRAPHIC_IMAGE_READPIXELS_PROMISE_0200 success');
done(); done();
}) })
} }
...@@ -663,7 +663,7 @@ export default function imageJsTest() { ...@@ -663,7 +663,7 @@ export default function imageJsTest() {
}) })
/** /**
* @tc.number : TC_021-4 * @tc.number : SUB_GRAPHIC_IMAGE_READPIXELS_PROMISE_0300
* @tc.name : readPixels-promise(offset > buffer) * @tc.name : readPixels-promise(offset > buffer)
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.call readPixels * 2.call readPixels
...@@ -673,7 +673,7 @@ export default function imageJsTest() { ...@@ -673,7 +673,7 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_021-4', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_READPIXELS_PROMISE_0300', 0, async function (done) {
const color = new ArrayBuffer(96); const color = new ArrayBuffer(96);
var bufferArr = new Uint8Array(color); var bufferArr = new Uint8Array(color);
for (var i = 0; i < bufferArr.length; i++) { for (var i = 0; i < bufferArr.length; i++) {
...@@ -684,7 +684,7 @@ export default function imageJsTest() { ...@@ -684,7 +684,7 @@ export default function imageJsTest() {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
if (pixelmap == undefined) { if (pixelmap == undefined) {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('TC_021-4 createPixelMap success'); console.info('SUB_GRAPHIC_IMAGE_READPIXELS_PROMISE_0300 createPixelMap success');
done(); done();
} }
const area = { const area = {
...@@ -694,19 +694,19 @@ export default function imageJsTest() { ...@@ -694,19 +694,19 @@ export default function imageJsTest() {
region: { size: { height: 1, width: 2 }, x: 0, y: 0 } region: { size: { height: 1, width: 2 }, x: 0, y: 0 }
} }
pixelmap.readPixels(area).then(() => { pixelmap.readPixels(area).then(() => {
console.info('TC_021-4 failed'); console.info('SUB_GRAPHIC_IMAGE_READPIXELS_PROMISE_0300 failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
}).catch(() => { }).catch(() => {
expect(true).assertTrue(); expect(true).assertTrue();
console.info('TC_021-4 success'); console.info('SUB_GRAPHIC_IMAGE_READPIXELS_PROMISE_0300 success');
done(); done();
}) })
}) })
}) })
/** /**
* @tc.number : TC_021-5 * @tc.number : SUB_GRAPHIC_IMAGE_READPIXELS_PROMISE_0400
* @tc.name : readPixels-promise(region: { size: { height: -1, width:-1}, x: 0, y: 0 }) * @tc.name : readPixels-promise(region: { size: { height: -1, width:-1}, x: 0, y: 0 })
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.call readPixels * 2.call readPixels
...@@ -716,7 +716,7 @@ export default function imageJsTest() { ...@@ -716,7 +716,7 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_021-5', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_READPIXELS_PROMISE_0400', 0, async function (done) {
const color = new ArrayBuffer(96); const color = new ArrayBuffer(96);
var bufferArr = new Uint8Array(color); var bufferArr = new Uint8Array(color);
for (var i = 0; i < bufferArr.length; i++) { for (var i = 0; i < bufferArr.length; i++) {
...@@ -727,7 +727,7 @@ export default function imageJsTest() { ...@@ -727,7 +727,7 @@ export default function imageJsTest() {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
if (pixelmap == undefined) { if (pixelmap == undefined) {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('TC_021-5 createPixelMap success'); console.info('SUB_GRAPHIC_IMAGE_READPIXELS_PROMISE_0400 createPixelMap success');
done(); done();
} }
const area = { const area = {
...@@ -737,19 +737,19 @@ export default function imageJsTest() { ...@@ -737,19 +737,19 @@ export default function imageJsTest() {
region: { size: { height: -1, width: -1 }, x: 0, y: 0 } region: { size: { height: -1, width: -1 }, x: 0, y: 0 }
} }
pixelmap.readPixels(area).then(() => { pixelmap.readPixels(area).then(() => {
console.info('TC_021-5 failed'); console.info('SUB_GRAPHIC_IMAGE_READPIXELS_PROMISE_0400 failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
}).catch(() => { }).catch(() => {
expect(true).assertTrue(); expect(true).assertTrue();
console.info('TC_021-5 success'); console.info('SUB_GRAPHIC_IMAGE_READPIXELS_PROMISE_0400 success');
done(); done();
}) })
}) })
}) })
/** /**
* @tc.number : TC_022 * @tc.number : SUB_GRAPHIC_IMAGE_WRITEPIXELS_PROMISE_0100
* @tc.name : writePixels-promise * @tc.name : writePixels-promise
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.call writePixels * 2.call writePixels
...@@ -759,14 +759,14 @@ export default function imageJsTest() { ...@@ -759,14 +759,14 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_022', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WRITEPIXELS_PROMISE_0100', 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) image.createPixelMap(color, opts)
.then(pixelmap => { .then(pixelmap => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
if (pixelmap == undefined) { if (pixelmap == undefined) {
console.info('TC_022 createPixelMap failed'); console.info('SUB_GRAPHIC_IMAGE_WRITEPIXELS_PROMISE_0100 createPixelMap failed');
expect(false).assertTrue() expect(false).assertTrue()
done(); done();
} }
...@@ -796,14 +796,14 @@ export default function imageJsTest() { ...@@ -796,14 +796,14 @@ export default function imageJsTest() {
for (var i = 0; i < readArr.length; i++) { for (var i = 0; i < readArr.length; i++) {
if (readArr[i] != tcBuf022[i]) { if (readArr[i] != tcBuf022[i]) {
res = false; res = false;
console.info('TC_022 failed'); console.info('SUB_GRAPHIC_IMAGE_WRITEPIXELS_PROMISE_0100 failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
break; break;
} }
} }
if (res) { if (res) {
console.info('TC_022 success'); console.info('SUB_GRAPHIC_IMAGE_WRITEPIXELS_PROMISE_0100 success');
expect(true).assertTrue() expect(true).assertTrue()
done(); done();
} }
...@@ -811,14 +811,14 @@ export default function imageJsTest() { ...@@ -811,14 +811,14 @@ export default function imageJsTest() {
}) })
}) })
.catch(error => { .catch(error => {
console.log('TC_022 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_WRITEPIXELS_PROMISE_0100 error: ' + error);
expect().assertFail(); expect().assertFail();
done(); done();
}) })
}) })
/** /**
* @tc.number : TC_022-1 * @tc.number : SUB_GRAPHIC_IMAGE_WRITEPIXELS_CALLBACK_0100
* @tc.name : writePixels-callback * @tc.name : writePixels-callback
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.call writePixels * 2.call writePixels
...@@ -828,14 +828,14 @@ export default function imageJsTest() { ...@@ -828,14 +828,14 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_022-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WRITEPIXELS_CALLBACK_0100', 0, async function (done) {
try { try {
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) => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
if (pixelmap == undefined) { if (pixelmap == undefined) {
console.info('TC_022-1 createPixelMap failed'); console.info('SUB_GRAPHIC_IMAGE_WRITEPIXELS_CALLBACK_0100 createPixelMap failed');
expect(false).assertTrue() expect(false).assertTrue()
done(); done();
} }
...@@ -862,14 +862,14 @@ export default function imageJsTest() { ...@@ -862,14 +862,14 @@ export default function imageJsTest() {
for (var i = 0; i < readArr.length; i++) { for (var i = 0; i < readArr.length; i++) {
if (readArr[i] != tcBuf022[i]) { if (readArr[i] != tcBuf022[i]) {
res = false; res = false;
console.info('TC_022-1 failed'); console.info('SUB_GRAPHIC_IMAGE_WRITEPIXELS_CALLBACK_0100 failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
break; break;
} }
} }
if (res) { if (res) {
console.info('TC_022-1 success'); console.info('SUB_GRAPHIC_IMAGE_WRITEPIXELS_CALLBACK_0100 success');
expect(true).assertTrue() expect(true).assertTrue()
done(); done();
} }
...@@ -877,14 +877,14 @@ export default function imageJsTest() { ...@@ -877,14 +877,14 @@ export default function imageJsTest() {
}) })
}) })
} catch (error) { } catch (error) {
console.info('TC_022-1 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_WRITEPIXELS_CALLBACK_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_023 * @tc.number : SUB_GRAPHIC_IMAGE_WRITEBUFFERTOPIXELS_PROMISE_0100
* @tc.name : writeBufferToPixels-promise * @tc.name : writeBufferToPixels-promise
* @tc.desc : 1.create PixelMap,buffer * @tc.desc : 1.create PixelMap,buffer
* 2.call writeBufferToPixels * 2.call writeBufferToPixels
...@@ -894,14 +894,14 @@ export default function imageJsTest() { ...@@ -894,14 +894,14 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_023', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WRITEBUFFERTOPIXELS_PROMISE_0100', 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) image.createPixelMap(color, opts)
.then(pixelmap => { .then(pixelmap => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
if (pixelmap == undefined) { if (pixelmap == undefined) {
console.info('TC_023 createPixelMap failed'); console.info('SUB_GRAPHIC_IMAGE_WRITEBUFFERTOPIXELS_PROMISE_0100 createPixelMap failed');
expect(false).assertTrue() expect(false).assertTrue()
done(); done();
} }
...@@ -919,14 +919,14 @@ export default function imageJsTest() { ...@@ -919,14 +919,14 @@ export default function imageJsTest() {
for (var i = 0; i < bufferArr.length; i++) { for (var i = 0; i < bufferArr.length; i++) {
if (bufferArr[i] == 0) { if (bufferArr[i] == 0) {
res = false; res = false;
console.info('TC_023 failed'); console.info('SUB_GRAPHIC_IMAGE_WRITEBUFFERTOPIXELS_PROMISE_0100 failed');
expect(false).assertTrue() expect(false).assertTrue()
done(); done();
break; break;
} }
} }
if (res) { if (res) {
console.info('TC_023 success'); console.info('SUB_GRAPHIC_IMAGE_WRITEBUFFERTOPIXELS_PROMISE_0100 success');
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} }
...@@ -934,14 +934,14 @@ export default function imageJsTest() { ...@@ -934,14 +934,14 @@ export default function imageJsTest() {
}) })
}) })
.catch(error => { .catch(error => {
console.log('TC_023 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_WRITEBUFFERTOPIXELS_PROMISE_0100 error: ' + error);
expect().assertFail(); expect().assertFail();
done(); done();
}) })
}) })
/** /**
* @tc.number : TC_023-1 * @tc.number : SUB_GRAPHIC_IMAGE_WRITEBUFFERTOPIXELS_CALLBACK_0100
* @tc.name : writeBufferToPixels-callback * @tc.name : writeBufferToPixels-callback
* @tc.desc : 1.create PixelMap,buffer * @tc.desc : 1.create PixelMap,buffer
* 2.call writeBufferToPixels * 2.call writeBufferToPixels
...@@ -951,7 +951,7 @@ export default function imageJsTest() { ...@@ -951,7 +951,7 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_023-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WRITEBUFFERTOPIXELS_CALLBACK_0100', 0, async function (done) {
const color = new ArrayBuffer(96); const color = new ArrayBuffer(96);
var bufferArr = new Uint8Array(color); var bufferArr = new Uint8Array(color);
for (var i = 0; i < bufferArr.length; i++) { for (var i = 0; i < bufferArr.length; i++) {
...@@ -962,7 +962,7 @@ export default function imageJsTest() { ...@@ -962,7 +962,7 @@ export default function imageJsTest() {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
if (pixelmap == undefined) { if (pixelmap == undefined) {
expect(false).assertTrue() expect(false).assertTrue()
console.info('TC_023-1 failed'); console.info('SUB_GRAPHIC_IMAGE_WRITEBUFFERTOPIXELS_CALLBACK_0100 failed');
done(); done();
} }
const writeColor = new ArrayBuffer(96); const writeColor = new ArrayBuffer(96);
...@@ -975,7 +975,7 @@ export default function imageJsTest() { ...@@ -975,7 +975,7 @@ export default function imageJsTest() {
if (res) { if (res) {
if (bufferArr[i] == 0) { if (bufferArr[i] == 0) {
res = false; res = false;
console.info('TC_023-1 Success'); console.info('SUB_GRAPHIC_IMAGE_WRITEBUFFERTOPIXELS_CALLBACK_0100 Success');
expect(true).assertTrue() expect(true).assertTrue()
done(); done();
break; break;
...@@ -983,7 +983,7 @@ export default function imageJsTest() { ...@@ -983,7 +983,7 @@ export default function imageJsTest() {
} }
} }
if (res) { if (res) {
console.info('TC_023-1 no change after writeBuffer'); console.info('SUB_GRAPHIC_IMAGE_WRITEBUFFERTOPIXELS_CALLBACK_0100 no change after writeBuffer');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -993,7 +993,7 @@ export default function imageJsTest() { ...@@ -993,7 +993,7 @@ export default function imageJsTest() {
}) })
/** /**
* @tc.number : TC_024 * @tc.number : SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PIXELMAP_PROMISE_0100
* @tc.name : getImageInfo-pixelmap-promise * @tc.name : getImageInfo-pixelmap-promise
* @tc.desc : 1.create PixelMap,ImageInfo * @tc.desc : 1.create PixelMap,ImageInfo
* 2.call getImageInfo * 2.call getImageInfo
...@@ -1003,45 +1003,45 @@ export default function imageJsTest() { ...@@ -1003,45 +1003,45 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_024', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PIXELMAP_PROMISE_0100', 0, async function (done) {
const color = new ArrayBuffer(96); const color = new ArrayBuffer(96);
let opts = { editable: true, pixelFormat: 2, size: { height: 6, width: 8 } } let opts = { editable: true, pixelFormat: 2, size: { height: 6, width: 8 } }
image.createPixelMap(color, opts) image.createPixelMap(color, opts)
.then(pixelmap => { .then(pixelmap => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
if (pixelmap == undefined) { if (pixelmap == undefined) {
console.info('TC_024 createPixelMap failed'); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PIXELMAP_PROMISE_0100 createPixelMap failed');
expect(false).assertTrue() expect(false).assertTrue()
done(); done();
} }
pixelmap.getImageInfo().then(imageInfo => { pixelmap.getImageInfo().then(imageInfo => {
if (imageInfo == undefined) { if (imageInfo == undefined) {
console.info('TC_024 imageInfo is empty'); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PIXELMAP_PROMISE_0100 imageInfo is empty');
expect(false).assertTrue() expect(false).assertTrue()
done(); done();
} }
if (imageInfo.size.height == 4 && imageInfo.size.width == 6) { if (imageInfo.size.height == 4 && imageInfo.size.width == 6) {
console.info('TC_024 success '); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PIXELMAP_PROMISE_0100 success ');
expect(true).assertTrue() expect(true).assertTrue()
done(); done();
} }
done(); done();
}).catch(error => { }).catch(error => {
console.log('TC_024 getimageinfo error: ' + error); console.log('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PIXELMAP_PROMISE_0100 getimageinfo error: ' + error);
expect().assertFail(); expect().assertFail();
done(); done();
}) })
done(); done();
}) })
.catch(error => { .catch(error => {
console.log('TC_024 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PIXELMAP_PROMISE_0100 error: ' + error);
expect().assertFail(); expect().assertFail();
done(); done();
}) })
}) })
/** /**
* @tc.number : TC_024-1 * @tc.number : SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PIXELMAP_CALLBACK_0100
* @tc.name : getImageInfo-pixelmap-callback * @tc.name : getImageInfo-pixelmap-callback
* @tc.desc : 1.create PixelMap,ImageInfo * @tc.desc : 1.create PixelMap,ImageInfo
* 2.call getImageInfo * 2.call getImageInfo
...@@ -1051,24 +1051,24 @@ export default function imageJsTest() { ...@@ -1051,24 +1051,24 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_024-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PIXELMAP_CALLBACK_0100', 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) {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
expect(false).assertTrue() expect(false).assertTrue()
console.info('TC_024-1 create pixelmap fail'); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PIXELMAP_CALLBACK_0100 create pixelmap fail');
done(); done();
} }
pixelmap.getImageInfo((err, imageInfo) => { pixelmap.getImageInfo((err, imageInfo) => {
if (imageInfo == undefined) { if (imageInfo == undefined) {
console.info('TC_024-1 imageInfo is empty'); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PIXELMAP_CALLBACK_0100 imageInfo is empty');
expect(false).assertTrue() expect(false).assertTrue()
done(); done();
} }
if (imageInfo.size.height == 4 && imageInfo.size.width == 6) { if (imageInfo.size.height == 4 && imageInfo.size.width == 6) {
console.info('TC_024-1 imageInfo success'); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PIXELMAP_CALLBACK_0100 imageInfo success');
expect(true).assertTrue() expect(true).assertTrue()
done(); done();
} }
...@@ -1078,7 +1078,7 @@ export default function imageJsTest() { ...@@ -1078,7 +1078,7 @@ export default function imageJsTest() {
}) })
/** /**
* @tc.number : TC_025-1 * @tc.number : SUB_GRAPHIC_IMAGE_GETBYTESNUMBERPERROW_0100
* @tc.name : getBytesNumberPerRow * @tc.name : getBytesNumberPerRow
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.set PixelMap * 2.set PixelMap
...@@ -1089,7 +1089,7 @@ export default function imageJsTest() { ...@@ -1089,7 +1089,7 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_025-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_GETBYTESNUMBERPERROW_0100', 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 } }
const expectNum = 4 * opts.size.width; const expectNum = 4 * opts.size.width;
...@@ -1101,7 +1101,7 @@ export default function imageJsTest() { ...@@ -1101,7 +1101,7 @@ export default function imageJsTest() {
done(); done();
} else { } else {
const num = pixelmap.getBytesNumberPerRow(); const num = pixelmap.getBytesNumberPerRow();
console.info('TC_025-1 num is ' + num); console.info('SUB_GRAPHIC_IMAGE_GETBYTESNUMBERPERROW_0100 num is ' + num);
expect(num == expectNum).assertTrue(); expect(num == expectNum).assertTrue();
if (num == expectNum) { if (num == expectNum) {
console.info('TC_25-1 success'); console.info('TC_25-1 success');
...@@ -1114,7 +1114,7 @@ export default function imageJsTest() { ...@@ -1114,7 +1114,7 @@ export default function imageJsTest() {
}) })
/** /**
* @tc.number : TC_026-1 * @tc.number : SUB_GRAPHIC_IMAGE_GETBYTESNUMBERPERROW_0200
* @tc.name : getPixelBytesNumber * @tc.name : getPixelBytesNumber
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.set Pixel * 2.set Pixel
...@@ -1125,7 +1125,7 @@ export default function imageJsTest() { ...@@ -1125,7 +1125,7 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_026-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_GETBYTESNUMBERPERROW_0200', 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 } }
const expectNum = 4 * opts.size.width * opts.size.height; const expectNum = 4 * opts.size.width * opts.size.height;
...@@ -1133,16 +1133,16 @@ export default function imageJsTest() { ...@@ -1133,16 +1133,16 @@ export default function imageJsTest() {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
if (pixelmap == undefined) { if (pixelmap == undefined) {
expect(false).assertTrue() expect(false).assertTrue()
console.info('TC_026-1 create pixelmap fail'); console.info('SUB_GRAPHIC_IMAGE_GETBYTESNUMBERPERROW_0200 create pixelmap fail');
done(); done();
} else { } else {
const num = pixelmap.getPixelBytesNumber(); const num = pixelmap.getPixelBytesNumber();
console.info('TC_026-1 num is ' + num); console.info('SUB_GRAPHIC_IMAGE_GETBYTESNUMBERPERROW_0200 num is ' + num);
expect(num == expectNum).assertTrue(); expect(num == expectNum).assertTrue();
if (num == expectNum) { if (num == expectNum) {
console.info('TC_026-1 success'); console.info('SUB_GRAPHIC_IMAGE_GETBYTESNUMBERPERROW_0200 success');
} else { } else {
console.info('TC_026-1 fail'); console.info('SUB_GRAPHIC_IMAGE_GETBYTESNUMBERPERROW_0200 fail');
} }
done(); done();
} }
...@@ -1150,7 +1150,7 @@ export default function imageJsTest() { ...@@ -1150,7 +1150,7 @@ export default function imageJsTest() {
}) })
/** /**
* @tc.number : TC_027 * @tc.number : SUB_GRAPHIC_IMAGE_RELEASE_PIXELMAP_PROMISE_0100
* @tc.name : release-pixelmap-promise * @tc.name : release-pixelmap-promise
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.set Pixel * 2.set Pixel
...@@ -1160,34 +1160,34 @@ export default function imageJsTest() { ...@@ -1160,34 +1160,34 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_027', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RELEASE_PIXELMAP_PROMISE_0100', 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).then(pixelmap => { image.createPixelMap(color, opts).then(pixelmap => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
if (pixelmap == undefined) { if (pixelmap == undefined) {
console.info('TC_027 createPixelMap failed'); console.info('SUB_GRAPHIC_IMAGE_RELEASE_PIXELMAP_PROMISE_0100 createPixelMap failed');
expect(false).assertTrue() expect(false).assertTrue()
done(); done();
} }
pixelmap.release().then(() => { pixelmap.release().then(() => {
console.info('TC_027 success'); console.info('SUB_GRAPHIC_IMAGE_RELEASE_PIXELMAP_PROMISE_0100 success');
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
}).catch(error => { }).catch(error => {
console.log('TC_027 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_RELEASE_PIXELMAP_PROMISE_0100 error: ' + error);
expect().assertFail(); expect().assertFail();
done(); done();
}) })
}).catch(error => { }).catch(error => {
console.log('TC_027 createPixelMap failed error: ' + error); console.log('SUB_GRAPHIC_IMAGE_RELEASE_PIXELMAP_PROMISE_0100 createPixelMap failed error: ' + error);
expect().assertFail(); expect().assertFail();
done(); done();
}) })
}) })
/** /**
* @tc.number : TC_027-1 * @tc.number : SUB_GRAPHIC_IMAGE_RELEASE_PIXELMAP_CALLBACK_0100
* @tc.name : release-pixelmap-callback * @tc.name : release-pixelmap-callback
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.set Pixel * 2.set Pixel
...@@ -1197,19 +1197,19 @@ export default function imageJsTest() { ...@@ -1197,19 +1197,19 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_027-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RELEASE_PIXELMAP_CALLBACK_0100', 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) => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
if (pixelmap == undefined) { if (pixelmap == undefined) {
console.info('TC_027-1 createPixelMap failed'); console.info('SUB_GRAPHIC_IMAGE_RELEASE_PIXELMAP_CALLBACK_0100 createPixelMap failed');
expect(false).assertTrue() expect(false).assertTrue()
done(); done();
} }
pixelmap.release(() => { pixelmap.release(() => {
expect(true).assertTrue(); expect(true).assertTrue();
console.log('TC_027-1 success'); console.log('SUB_GRAPHIC_IMAGE_RELEASE_PIXELMAP_CALLBACK_0100 success');
done(); done();
}) })
}) })
...@@ -1218,7 +1218,7 @@ export default function imageJsTest() { ...@@ -1218,7 +1218,7 @@ export default function imageJsTest() {
/** /**
* @tc.number : TC_041 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_URI_0100
* @tc.name : createImageSource(uri)-jpg * @tc.name : createImageSource(uri)-jpg
* @tc.desc : 1.set uri * @tc.desc : 1.set uri
* 2.call createImageSource(uri) * 2.call createImageSource(uri)
...@@ -1227,23 +1227,23 @@ export default function imageJsTest() { ...@@ -1227,23 +1227,23 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('TC_041', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_URI_0100', 0, async function (done) {
try { try {
await getFd('test.jpg'); await getFd('test.jpg');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
expect(imageSourceApi != undefined).assertTrue(); expect(imageSourceApi != undefined).assertTrue();
console.info('TC_041 success'); console.info('SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_URI_0100 success');
fileio.closeSync(fdNumber); fileio.closeSync(fdNumber);
done(); done();
} catch (error) { } catch (error) {
console.info('TC_041 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_URI_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_041-1 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_URI_0200
* @tc.name : createImageSource(uri)-bmp * @tc.name : createImageSource(uri)-bmp
* @tc.desc : 1.seturi * @tc.desc : 1.seturi
* 2.call createImageSource(uri) * 2.call createImageSource(uri)
...@@ -1252,22 +1252,22 @@ export default function imageJsTest() { ...@@ -1252,22 +1252,22 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('TC_041-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_URI_0200', 0, async function (done) {
try { try {
await getFd('test.bmp'); await getFd('test.bmp');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
expect(imageSourceApi != undefined).assertTrue(); expect(imageSourceApi != undefined).assertTrue();
console.info('TC_041-1 success'); console.info('SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_UR_0200 success');
done(); done();
} catch (error) { } catch (error) {
console.info('TC_041-1 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_URI_0200 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_041-2 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_URI_0300
* @tc.name : createImageSource(uri)-gif * @tc.name : createImageSource(uri)-gif
* @tc.desc : 1.seturi * @tc.desc : 1.seturi
* 2.call createImageSource(uri) * 2.call createImageSource(uri)
...@@ -1276,15 +1276,15 @@ export default function imageJsTest() { ...@@ -1276,15 +1276,15 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('TC_041-2', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_URI_0300', 0, async function (done) {
try { try {
await getFd('test.gif'); await getFd('test.gif');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
expect(imageSourceApi != undefined).assertTrue(); expect(imageSourceApi != undefined).assertTrue();
console.info('TC_041-2 success'); console.info('SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_URI_0300 success');
done(); done();
} catch (error) { } catch (error) {
console.info('TC_041-2 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_URI_0300 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -1292,7 +1292,7 @@ export default function imageJsTest() { ...@@ -1292,7 +1292,7 @@ export default function imageJsTest() {
}) })
/** /**
* @tc.number : TC_041-3 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_URI_0400
* @tc.name : createImageSource(uri)-png * @tc.name : createImageSource(uri)-png
* @tc.desc : 1.seturi * @tc.desc : 1.seturi
* 2.call createImageSource(uri) * 2.call createImageSource(uri)
...@@ -1301,15 +1301,15 @@ export default function imageJsTest() { ...@@ -1301,15 +1301,15 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('TC_041-3', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_URI_0400', 0, async function (done) {
try { try {
await getFd('test.png'); await getFd('test.png');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
expect(imageSourceApi != undefined).assertTrue(); expect(imageSourceApi != undefined).assertTrue();
console.info('TC_041-3 success'); console.info('SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_URI_0400 success');
done(); done();
} catch (error) { } catch (error) {
console.info('TC_041-3 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_URI_0400 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -1317,7 +1317,7 @@ export default function imageJsTest() { ...@@ -1317,7 +1317,7 @@ export default function imageJsTest() {
}) })
/** /**
* @tc.number : TC_041-4 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_URI_ERROR_SUFFIXFILE_0100
* @tc.name : createImageSource(uri)-wrong suffix file * @tc.name : createImageSource(uri)-wrong suffix file
* @tc.desc : 1.call createImageSource(uri) * @tc.desc : 1.call createImageSource(uri)
* 2.Incoming wrong suffix file * 2.Incoming wrong suffix file
...@@ -1326,15 +1326,15 @@ export default function imageJsTest() { ...@@ -1326,15 +1326,15 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('TC_041-4', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_URI_ERROR_SUFFIXFILE_0100', 0, async function (done) {
const imageSourceApi = image.createImageSource('file:///data/local/tmp/test.123'); const imageSourceApi = image.createImageSource('file:///data/local/tmp/test.123');
expect(imageSourceApi == undefined).assertTrue(); expect(imageSourceApi == undefined).assertTrue();
console.info('TC_041-4 success'); console.info('SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_URI_ERROR_SUFFIXFILE_0100 success');
done(); done();
}) })
/** /**
* @tc.number : TC_041-5 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_URI_ERROR_URI_0100
* @tc.name : createImageSource(uri)-wrong uri * @tc.name : createImageSource(uri)-wrong uri
* @tc.desc : 1.call createImageSource(uri) * @tc.desc : 1.call createImageSource(uri)
* 2.set wrong uri * 2.set wrong uri
...@@ -1343,21 +1343,21 @@ export default function imageJsTest() { ...@@ -1343,21 +1343,21 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('TC_041-5', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_URI_ERROR_URI_0100', 0, async function (done) {
try { try {
const imageSourceApi = image.createImageSource('file:///multimedia/test.jpg'); const imageSourceApi = image.createImageSource('file:///multimedia/test.jpg');
expect(imageSourceApi == undefined).assertTrue(); expect(imageSourceApi == undefined).assertTrue();
console.info('TC_041-5 success'); console.info('SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_URI_ERROR_URI_0100 success');
done(); done();
} catch (error) { } catch (error) {
console.info('TC_041-5 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_URI_ERROR_URI_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_042 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_0100
* @tc.name : createImageSource(fd) * @tc.name : createImageSource(fd)
* @tc.desc : 1.call createImageSource * @tc.desc : 1.call createImageSource
* 2.set fd * 2.set fd
...@@ -1366,19 +1366,19 @@ export default function imageJsTest() { ...@@ -1366,19 +1366,19 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('TC_042', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_0100', 0, async function (done) {
try { try {
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('SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageInfo((err, imageInfo) => { imageSourceApi.getImageInfo((err, imageInfo) => {
if (err) { if (err) {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('TC_042 err: ' + err); console.info('SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_0100 err: ' + err);
done(); done();
return return
} }
...@@ -1387,7 +1387,7 @@ export default function imageJsTest() { ...@@ -1387,7 +1387,7 @@ export default function imageJsTest() {
fileio.closeSync(fdNumber); fileio.closeSync(fdNumber);
done(); done();
} else { } else {
console.info('TC_042 failed'); console.info('SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_0100 failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -1395,14 +1395,14 @@ export default function imageJsTest() { ...@@ -1395,14 +1395,14 @@ export default function imageJsTest() {
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_042 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_FD_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_042-1 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_0200
* @tc.name : createImageSource(fd) fd<0 * @tc.name : createImageSource(fd) fd<0
* @tc.desc : 1.call createImageSource * @tc.desc : 1.call createImageSource
* 2.set wrong fd * 2.set wrong fd
...@@ -1411,15 +1411,15 @@ export default function imageJsTest() { ...@@ -1411,15 +1411,15 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('TC_042-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_0200', 0, async function (done) {
const imageSourceApi = image.createImageSource(-2); const imageSourceApi = image.createImageSource(-2);
expect(imageSourceApi == undefined).assertTrue(); expect(imageSourceApi == undefined).assertTrue();
console.info('TC_042-1 success'); console.info('SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_0200 success');
done(); done();
}) })
/** /**
* @tc.number : TC_043 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_0300
* @tc.name : createImageSource(data) * @tc.name : createImageSource(data)
* @tc.desc : 1.setdata * @tc.desc : 1.setdata
* 2.createImageSource * 2.createImageSource
...@@ -1428,16 +1428,16 @@ export default function imageJsTest() { ...@@ -1428,16 +1428,16 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('TC_043', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_0300', 0, async function (done) {
const data = testJpg.buffer; const data = testJpg.buffer;
const imageSourceApi = image.createImageSource(data); const imageSourceApi = image.createImageSource(data);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_043 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_0300 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageInfo((err, imageInfo) => { imageSourceApi.getImageInfo((err, imageInfo) => {
console.info('TC_043 imageInfo'); console.info('SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_0300 imageInfo');
expect(imageInfo != undefined).assertTrue(); expect(imageInfo != undefined).assertTrue();
done(); done();
}) })
...@@ -1445,7 +1445,7 @@ export default function imageJsTest() { ...@@ -1445,7 +1445,7 @@ export default function imageJsTest() {
}) })
/** /**
* @tc.number : TC_043-1 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_0400
* @tc.name : createImageSource(data) buffer:0 * @tc.name : createImageSource(data) buffer:0
* @tc.desc : 1.setdata * @tc.desc : 1.setdata
* 2.createImageSource * 2.createImageSource
...@@ -1454,16 +1454,16 @@ export default function imageJsTest() { ...@@ -1454,16 +1454,16 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('TC_043-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_0400', 0, async function (done) {
const data = new ArrayBuffer(0); const data = new ArrayBuffer(0);
const imageSourceApi = image.createImageSource(data); const imageSourceApi = image.createImageSource(data);
expect(imageSourceApi == undefined).assertTrue(); expect(imageSourceApi == undefined).assertTrue();
console.info('TC_043-1 success'); console.info('SUB_GRAPHIC_IMAGE_CREATEIMAGESOURCE_0400 success');
done(); done();
}) })
/** /**
* @tc.number : TC_044 * @tc.number : SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_PROMISE_JPG_0100
* @tc.name : release-imagesource-promise-jpg * @tc.name : release-imagesource-promise-jpg
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call release() * 2.call release()
...@@ -1472,34 +1472,34 @@ export default function imageJsTest() { ...@@ -1472,34 +1472,34 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_044', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_PROMISE_JPG_0100', 0, async function (done) {
try { try {
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('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_PROMISE_JPG_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.release().then(() => { imageSourceApi.release().then(() => {
console.info('TC_044 success'); console.info('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_PROMISE_JPG_0100 success');
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
}).catch(error => { }).catch(error => {
console.info('TC_044 error'); console.info('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_PROMISE_JPG_0100 error');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_044 err:' + error); console.info('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_PROMISE_JPG_0100 err:' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_044-1 * @tc.number : SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_CALLBACK_JPG_0100
* @tc.name : release-imagesource-callback-jpg * @tc.name : release-imagesource-callback-jpg
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call release() * 2.call release()
...@@ -1508,30 +1508,30 @@ export default function imageJsTest() { ...@@ -1508,30 +1508,30 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_044-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_CALLBACK_JPG_0100', 0, async function (done) {
try { try {
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('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_CALLBACK_JPG_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.release(() => { imageSourceApi.release(() => {
console.info('TC_044-1 Success'); console.info('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_CALLBACK_JPG_0100 Success');
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_044-1 err:' + error); console.info('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_CALLBACK_JPG_0100 err:' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_045 * @tc.number : SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0100
* @tc.name : getImageInfo(callback: AsyncCallback<ImageInfo>)-jpg * @tc.name : getImageInfo(callback: AsyncCallback<ImageInfo>)-jpg
* @tc.desc : 1.create imageSource * @tc.desc : 1.create imageSource
* 2.imageSourcecall getImageInfo(ImageInfo) * 2.imageSourcecall getImageInfo(ImageInfo)
...@@ -1541,37 +1541,37 @@ export default function imageJsTest() { ...@@ -1541,37 +1541,37 @@ export default function imageJsTest() {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_045', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0100', 0, async function (done) {
try { try {
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_045 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageInfo((err, imageInfo) => { imageSourceApi.getImageInfo((err, imageInfo) => {
if (err) { if (err) {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('TC_045 err:' + err); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0100 err:' + err);
done(); done();
return return
} }
if (imageInfo != undefined) { if (imageInfo != undefined) {
console.info('TC_045 imageInfo.size.height:' + imageInfo.size.height); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0100 imageInfo.size.height:' + imageInfo.size.height);
console.info('TC_045 imageInfo.size.width:' + imageInfo.size.width); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0100 imageInfo.size.width:' + imageInfo.size.width);
expect(true).assertTrue(); expect(true).assertTrue();
fileio.closeSync(fdNumber); fileio.closeSync(fdNumber);
done(); done();
} else { } else {
console.info('TC_045 failed'); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0100 failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_045 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -1579,7 +1579,7 @@ export default function imageJsTest() { ...@@ -1579,7 +1579,7 @@ export default function imageJsTest() {
/** /**
* @tc.number : TC_045-1 * @tc.number : SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0200
* @tc.name : getImageInfo(callback: AsyncCallback<ImageInfo>)-bmp * @tc.name : getImageInfo(callback: AsyncCallback<ImageInfo>)-bmp
* @tc.desc : 1.create imageSource * @tc.desc : 1.create imageSource
* 2.imageSourcecall getImageInfo(ImageInfo) * 2.imageSourcecall getImageInfo(ImageInfo)
...@@ -1588,31 +1588,31 @@ export default function imageJsTest() { ...@@ -1588,31 +1588,31 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_045-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0200', 0, async function (done) {
try { try {
await getFd('test.bmp'); await getFd('test.bmp');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_045-1 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0200 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageInfo((err, imageInfo) => { imageSourceApi.getImageInfo((err, imageInfo) => {
expect(imageInfo != undefined).assertTrue(); expect(imageInfo != undefined).assertTrue();
console.info('TC_045-1 imageInfo.size.height:' + imageInfo.size.height); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0200 imageInfo.size.height:' + imageInfo.size.height);
console.info('TC_045-1 imageInfo.size.width:' + imageInfo.size.width); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0200 imageInfo.size.width:' + imageInfo.size.width);
done(); done();
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_045-1 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0200 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_045-2 * @tc.number : SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0300
* @tc.name : getImageInfo(callback: AsyncCallback<ImageInfo>)-png * @tc.name : getImageInfo(callback: AsyncCallback<ImageInfo>)-png
* @tc.desc : 1.create imageSource * @tc.desc : 1.create imageSource
* 2.imageSourcecall getImageInfo(ImageInfo) * 2.imageSourcecall getImageInfo(ImageInfo)
...@@ -1621,31 +1621,31 @@ export default function imageJsTest() { ...@@ -1621,31 +1621,31 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_045-2', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0300', 0, async function (done) {
try { try {
await getFd('test.png'); await getFd('test.png');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_045-2 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0300 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageInfo((err, imageInfo) => { imageSourceApi.getImageInfo((err, imageInfo) => {
expect(imageInfo != undefined).assertTrue(); expect(imageInfo != undefined).assertTrue();
console.info('TC_045-2 imageInfo.size.height:' + imageInfo.size.height); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0300 imageInfo.size.height:' + imageInfo.size.height);
console.info('TC_045-2 imageInfo.size.width:' + imageInfo.size.width); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0300 imageInfo.size.width:' + imageInfo.size.width);
done(); done();
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_045-2 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0300 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_045-3 * @tc.number : SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0400
* @tc.name : getImageInfo(callback: AsyncCallback<ImageInfo>)-gif * @tc.name : getImageInfo(callback: AsyncCallback<ImageInfo>)-gif
* @tc.desc : 1.create ImageInfo * @tc.desc : 1.create ImageInfo
* 2.call getImageInfo(index, ImageInfo) * 2.call getImageInfo(index, ImageInfo)
...@@ -1654,44 +1654,44 @@ export default function imageJsTest() { ...@@ -1654,44 +1654,44 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_045-3', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0400', 0, async function (done) {
try { try {
await getFd('test.gif'); await getFd('test.gif');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_045-3 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0400 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageInfo((err, imageInfo) => { imageSourceApi.getImageInfo((err, imageInfo) => {
if (err) { if (err) {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('TC_045-3 error' + err); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0400 error' + err);
done(); done();
return return
} }
if (imageInfo != undefined && imageInfo != null) { if (imageInfo != undefined && imageInfo != null) {
expect(true).assertTrue(); expect(true).assertTrue();
console.info('TC_045-3 imageInfo.size.height:' + imageInfo.size.height); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0400 imageInfo.size.height:' + imageInfo.size.height);
console.info('TC_045-3 imageInfo.size.width:' + imageInfo.size.width); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0400 imageInfo.size.width:' + imageInfo.size.width);
console.info('TC_045-3 success') console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0400 success')
done(); done();
} else { } else {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('TC_045-3 failed') console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0400 failed')
done(); done();
} }
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_045-3 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0400 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_046 * @tc.number : SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0500
* @tc.name : getImageInfo(index: number, callback: AsyncCallback<ImageInfo>)-jpg * @tc.name : getImageInfo(index: number, callback: AsyncCallback<ImageInfo>)-jpg
* @tc.desc : 1.create ImageInfo * @tc.desc : 1.create ImageInfo
* 2.call getImageInfo(index, ImageInfo) * 2.call getImageInfo(index, ImageInfo)
...@@ -1700,31 +1700,31 @@ export default function imageJsTest() { ...@@ -1700,31 +1700,31 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_046', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0500', 0, async function (done) {
try { try {
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('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0500 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageInfo(0, (err, imageInfo) => { imageSourceApi.getImageInfo(0, (err, imageInfo) => {
expect(imageInfo != undefined).assertTrue(); expect(imageInfo != undefined).assertTrue();
console.info('TC_046 imageInfo.size.height:' + imageInfo.size.height); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0500 imageInfo.size.height:' + imageInfo.size.height);
console.info('TC_046 imageInfo.size.width:' + imageInfo.size.width); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0500 imageInfo.size.width:' + imageInfo.size.width);
done(); done();
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_046 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0500 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_046-1 * @tc.number : SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0600
* @tc.name : getImageInfo(index: number, callback: AsyncCallback<ImageInfo>)-bmp * @tc.name : getImageInfo(index: number, callback: AsyncCallback<ImageInfo>)-bmp
* @tc.desc : 1.create ImageInfo * @tc.desc : 1.create ImageInfo
* 2.call getImageInfo(index, ImageInfo) * 2.call getImageInfo(index, ImageInfo)
...@@ -1733,31 +1733,31 @@ export default function imageJsTest() { ...@@ -1733,31 +1733,31 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_046-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0600', 0, async function (done) {
try { try {
await getFd('test.bmp'); await getFd('test.bmp');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_046-1 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0600 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} 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.size.height:' + imageInfo.size.height); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0600 imageInfo.size.height:' + imageInfo.size.height);
console.info('TC_046-1 imageInfo.size.width:' + imageInfo.size.width); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0600 imageInfo.size.width:' + imageInfo.size.width);
done(); done();
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_046-1 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0600 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number: TC_046-2 * @tc.number: SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0700
* @tc.name : getImageInfo(index: number, callback: AsyncCallback<ImageInfo>)-png * @tc.name : getImageInfo(index: number, callback: AsyncCallback<ImageInfo>)-png
* @tc.desc : 1.create ImageInfo * @tc.desc : 1.create ImageInfo
* 2.call getImageInfo(index, ImageInfo) * 2.call getImageInfo(index, ImageInfo)
...@@ -1766,24 +1766,24 @@ export default function imageJsTest() { ...@@ -1766,24 +1766,24 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_046-2', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0700', 0, async function (done) {
try { try {
await getFd('test.png'); await getFd('test.png');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_046-2 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0700 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageInfo(0, (err, imageInfo) => { imageSourceApi.getImageInfo(0, (err, imageInfo) => {
expect(imageInfo != undefined).assertTrue(); expect(imageInfo != undefined).assertTrue();
console.info('TC_046-2 imageInfo.size.height:' + imageInfo.size.height); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0700 imageInfo.size.height:' + imageInfo.size.height);
console.info('TC_046-2 imageInfo.size.width:' + imageInfo.size.width); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0700 imageInfo.size.width:' + imageInfo.size.width);
done(); done();
}) })
} }
} catch { } catch {
console.info('TC_046-2 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0700 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -1791,7 +1791,7 @@ export default function imageJsTest() { ...@@ -1791,7 +1791,7 @@ export default function imageJsTest() {
}) })
/** /**
* @tc.number: TC_046-3 * @tc.number: SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0800
* @tc.name : getImageInfo(index: number, callback: AsyncCallback<ImageInfo>)-gif * @tc.name : getImageInfo(index: number, callback: AsyncCallback<ImageInfo>)-gif
* @tc.desc : 1.create ImageInfo * @tc.desc : 1.create ImageInfo
* 2.call getImageInfo(index, ImageInfo) * 2.call getImageInfo(index, ImageInfo)
...@@ -1800,44 +1800,44 @@ export default function imageJsTest() { ...@@ -1800,44 +1800,44 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_046-3', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0800', 0, async function (done) {
try { try {
await getFd('test.gif'); await getFd('test.gif');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_046-3 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0800 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageInfo(0, (err, imageInfo) => { imageSourceApi.getImageInfo(0, (err, imageInfo) => {
if (err) { if (err) {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('TC_046-3 error' + err); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0800 error' + err);
done(); done();
return return
} }
if (imageInfo != undefined && imageInfo != null) { if (imageInfo != undefined && imageInfo != null) {
expect(true).assertTrue(); expect(true).assertTrue();
console.info('TC_046-3 imageInfo.size.height:' + imageInfo.size.height); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0800 imageInfo.size.height:' + imageInfo.size.height);
console.info('TC_046-3 imageInfo.size.width:' + imageInfo.size.width); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0800 imageInfo.size.width:' + imageInfo.size.width);
console.info('TC_046-3 success') console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0800 success')
done(); done();
} else { } else {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('TC_046-3 failed') console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0800 failed')
done(); done();
} }
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_046-3 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_CALLBACK_0800 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number: TC_046-4 * @tc.number: SUB_GRAPHIC_IMAGE_GETIMAGEINFO_INDEX_CALLBACK_GIF_0100
* @tc.name : getImageInfo(index: number, callback: AsyncCallback<ImageInfo>)-gif(frame:1)-index:1 * @tc.name : getImageInfo(index: number, callback: AsyncCallback<ImageInfo>)-gif(frame:1)-index:1
* @tc.desc : 1.create ImageInfo * @tc.desc : 1.create ImageInfo
* 2.call getImageInfo(index, ImageInfo) * 2.call getImageInfo(index, ImageInfo)
...@@ -1846,12 +1846,12 @@ export default function imageJsTest() { ...@@ -1846,12 +1846,12 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_046-4', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_INDEX_CALLBACK_GIF_0100', 0, async function (done) {
try { try {
await getFd('test.gif'); await getFd('test.gif');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_046-4 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_INDEX_CALLBACK_GIF_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -1866,14 +1866,14 @@ export default function imageJsTest() { ...@@ -1866,14 +1866,14 @@ export default function imageJsTest() {
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_046-4 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_INDEX_CALLBACK_GIF_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number: TC_046-5 * @tc.number: SUB_GRAPHIC_IMAGE_GETIMAGEINFO_INDEX_CALLBACK_GIF_0200
* @tc.name : getImageInfo(index: number, callback: AsyncCallback<ImageInfo>)-gif-index:-1 * @tc.name : getImageInfo(index: number, callback: AsyncCallback<ImageInfo>)-gif-index:-1
* @tc.desc : 1.create ImageInfo * @tc.desc : 1.create ImageInfo
* 2.call getImageInfo(index, ImageInfo) * 2.call getImageInfo(index, ImageInfo)
...@@ -1882,12 +1882,12 @@ export default function imageJsTest() { ...@@ -1882,12 +1882,12 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_046-5', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_INDEX_CALLBACK_GIF_0200', 0, async function (done) {
try { try {
await getFd('test.gif'); await getFd('test.gif');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_046-5 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_INDEX_CALLBACK_GIF_0200 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -1897,14 +1897,14 @@ export default function imageJsTest() { ...@@ -1897,14 +1897,14 @@ export default function imageJsTest() {
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_046-5 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_INDEX_CALLBACK_GIF_0200 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_047 * @tc.number : SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PROMISE_0100
* @tc.name : getImageInfo(index?: number): Promise<ImageInfo>-jpg * @tc.name : getImageInfo(index?: number): Promise<ImageInfo>-jpg
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call getImageInfo(index) * 2.call getImageInfo(index)
...@@ -1913,37 +1913,37 @@ export default function imageJsTest() { ...@@ -1913,37 +1913,37 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_047', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PROMISE_0100', 0, async function (done) {
try { try {
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_047 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PROMISE_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageInfo(0) imageSourceApi.getImageInfo(0)
.then(imageInfo => { .then(imageInfo => {
expect(imageInfo != undefined).assertTrue(); expect(imageInfo != undefined).assertTrue();
console.info('TC_047 imageInfo'); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PROMISE_0100 imageInfo');
console.info('imageInfo.size.height:' + imageInfo.size.height); console.info('imageInfo.size.height:' + imageInfo.size.height);
console.info('imageInfo.size.width:' + imageInfo.size.width); console.info('imageInfo.size.width:' + imageInfo.size.width);
done(); done();
}).catch(error => { }).catch(error => {
console.log('TC_047 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PROMISE_0100 error: ' + error);
expect().assertFail(); expect().assertFail();
done(); done();
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_047 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PROMISE_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_047-1 * @tc.number : SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PROMISE_0200
* @tc.name : getImageInfo(index?: number): Promise<ImageInfo>-bmp * @tc.name : getImageInfo(index?: number): Promise<ImageInfo>-bmp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call getImageInfo(index) * 2.call getImageInfo(index)
...@@ -1952,37 +1952,37 @@ export default function imageJsTest() { ...@@ -1952,37 +1952,37 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_047-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PROMISE_0200', 0, async function (done) {
try { try {
await getFd('test.bmp'); await getFd('test.bmp');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_047-1 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PROMISE_0200 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageInfo(0) imageSourceApi.getImageInfo(0)
.then(imageInfo => { .then(imageInfo => {
expect(imageInfo != undefined).assertTrue(); expect(imageInfo != undefined).assertTrue();
console.info('TC_047-1 imageInfo'); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PROMISE_0200 imageInfo');
console.info('imageInfo.size.height:' + imageInfo.size.height); console.info('imageInfo.size.height:' + imageInfo.size.height);
console.info('imageInfo.size.width:' + imageInfo.size.width); console.info('imageInfo.size.width:' + imageInfo.size.width);
done(); done();
}).catch(error => { }).catch(error => {
console.log('TC_047-1 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PROMISE_0200 error: ' + error);
expect().assertFail(); expect().assertFail();
done(); done();
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_047-1 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PROMISE_0200 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_047-2 * @tc.number : SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PROMISE_0300
* @tc.name : getImageInfo(index?: number): Promise<ImageInfo>-png * @tc.name : getImageInfo(index?: number): Promise<ImageInfo>-png
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call getImageInfo(index) * 2.call getImageInfo(index)
...@@ -1991,37 +1991,37 @@ export default function imageJsTest() { ...@@ -1991,37 +1991,37 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_047-2', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PROMISE_0300', 0, async function (done) {
try { try {
await getFd('test.png'); await getFd('test.png');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_047-2 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PROMISE_0300 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageInfo(0) imageSourceApi.getImageInfo(0)
.then(imageInfo => { .then(imageInfo => {
expect(imageInfo != undefined).assertTrue(); expect(imageInfo != undefined).assertTrue();
console.info('TC_047-2 imageInfo'); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PROMISE_0300 imageInfo');
console.info('imageInfo.size.height:' + imageInfo.size.height); console.info('imageInfo.size.height:' + imageInfo.size.height);
console.info('imageInfo.size.width:' + imageInfo.size.width); console.info('imageInfo.size.width:' + imageInfo.size.width);
done(); done();
}).catch(error => { }).catch(error => {
console.log('TC_047-2 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PROMISE_0300 error: ' + error);
expect().assertFail(); expect().assertFail();
done(); done();
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_047-2 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PROMISE_0300 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_047-3 * @tc.number : SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PROMISE_0400
* @tc.name : getImageInfo(index?: number): Promise<ImageInfo>-gif * @tc.name : getImageInfo(index?: number): Promise<ImageInfo>-gif
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call getImageInfo(index) * 2.call getImageInfo(index)
...@@ -2030,12 +2030,12 @@ export default function imageJsTest() { ...@@ -2030,12 +2030,12 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_047-3', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PROMISE_0400', 0, async function (done) {
try { try {
await getFd('test.gif'); await getFd('test.gif');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_047-3 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PROMISE_0400 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -2043,29 +2043,29 @@ export default function imageJsTest() { ...@@ -2043,29 +2043,29 @@ export default function imageJsTest() {
.then(imageInfo => { .then(imageInfo => {
if (imageInfo != undefined && imageInfo != null) { if (imageInfo != undefined && imageInfo != null) {
expect(true).assertTrue(); expect(true).assertTrue();
console.info('TC_047-3 imageInfo.size.height:' + imageInfo.size.height); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PROMISE_0400 imageInfo.size.height:' + imageInfo.size.height);
console.info('TC_047-3 imageInfo.size.width:' + imageInfo.size.width); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PROMISE_0400 imageInfo.size.width:' + imageInfo.size.width);
done(); done();
} else { } else {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('TC_047-3 failed'); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PROMISE_0400 failed');
done(); done();
} }
}).catch(error => { }).catch(error => {
console.log('TC_047-3 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PROMISE_0400 error: ' + error);
expect().assertFail(); expect().assertFail();
done(); done();
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_047-3 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_PROMISE_0400 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number: TC_047-4 * @tc.number: SUB_GRAPHIC_IMAGE_GETIMAGEINFO_INDEX_PROMISE_GIF_0100
* @tc.name : getImageInfo(index?: number): Promise<ImageInfo>-gif(frame:1)-index:1 * @tc.name : getImageInfo(index?: number): Promise<ImageInfo>-gif(frame:1)-index:1
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call getImageInfo(index=1) * 2.call getImageInfo(index=1)
...@@ -2074,35 +2074,35 @@ export default function imageJsTest() { ...@@ -2074,35 +2074,35 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_047-4', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_INDEX_PROMISE_GIF_0100', 0, async function (done) {
try { try {
await getFd('test.gif'); await getFd('test.gif');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_047-4 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_INDEX_PROMISE_GIF_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageInfo(1) imageSourceApi.getImageInfo(1)
.then(() => { .then(() => {
console.log('TC_047-4 failed'); console.log('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_INDEX_PROMISE_GIF_0100 failed');
expect().assertFail(); expect().assertFail();
done(); done();
}).catch(error => { }).catch(error => {
console.log('TC_047-4 success'); console.log('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_INDEX_PROMISE_GIF_0100 success');
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_047-4 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_INDEX_PROMISE_GIF_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_047-5 * @tc.number : SUB_GRAPHIC_IMAGE_GETIMAGEINFO_INDEX_PROMISE_GIF_0200
* @tc.name : getImageInfo(index?: number): Promise<ImageInfo>-gif-index:-1 * @tc.name : getImageInfo(index?: number): Promise<ImageInfo>-gif-index:-1
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call getImageInfo(index=-1) * 2.call getImageInfo(index=-1)
...@@ -2111,35 +2111,35 @@ export default function imageJsTest() { ...@@ -2111,35 +2111,35 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_047-5', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_INDEX_PROMISE_GIF_0200', 0, async function (done) {
try { try {
await getFd('test.gif'); await getFd('test.gif');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_047-5 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_INDEX_PROMISE_GIF_0200 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageInfo(-1) imageSourceApi.getImageInfo(-1)
.then(() => { .then(() => {
console.log('TC_047-5 failed'); console.log('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_INDEX_PROMISE_GIF_0200 failed');
expect().assertFail(); expect().assertFail();
done(); done();
}).catch(error => { }).catch(error => {
console.log('TC_047-5 success'); console.log('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_INDEX_PROMISE_GIF_0200 success');
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_047-5 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_GETIMAGEINFO_INDEX_PROMISE_GIF_0200 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_050-14 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_JPG_0100
* @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
...@@ -2149,35 +2149,35 @@ export default function imageJsTest() { ...@@ -2149,35 +2149,35 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_050-14', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_JPG_0100', 0, async function (done) {
try { try {
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_050-14 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_JPG_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.createPixelMap().then(pixelmap => { imageSourceApi.createPixelMap().then(pixelmap => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_050-14 success '); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_JPG_0100 success ');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
}).catch(error => { }).catch(error => {
console.log('TC_050-14 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_JPG_0100 error: ' + error);
expect().assertFail(); expect().assertFail();
done(); done();
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_050-14 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_JPG_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_050-15 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_JPG_0100
* @tc.name : createPixelMap-callback-jpg * @tc.name : createPixelMap-callback-jpg
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -2187,31 +2187,31 @@ export default function imageJsTest() { ...@@ -2187,31 +2187,31 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_050-15', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_JPG_0100', 0, async function (done) {
try { try {
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_050-15 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_JPG_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.createPixelMap((err, pixelmap) => { imageSourceApi.createPixelMap((err, pixelmap) => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_050-15 success '); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_JPG_0100 success ');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_050-15 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_JPG_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_053 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_0100
* @tc.name : createIncrementalSource-updateData-png * @tc.name : createIncrementalSource-updateData-png
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.update data * 2.update data
...@@ -2220,38 +2220,38 @@ export default function imageJsTest() { ...@@ -2220,38 +2220,38 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_053', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_0100', 0, async function (done) {
try { try {
let testimagebuffer = testPng; let testimagebuffer = testPng;
console.info('TC_053 0003 ' + testimagebuffer.length); console.info('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_0100 0003 ' + testimagebuffer.length);
let bufferSize = testimagebuffer.length; let bufferSize = testimagebuffer.length;
let offset = 0; let offset = 0;
const incSouce = image.createIncrementalSource(new ArrayBuffer(1)); const incSouce = image.createIncrementalSource(new ArrayBuffer(1));
let ret; let ret;
let isFinished = false; let isFinished = false;
while (offset < testimagebuffer.length) { while (offset < testimagebuffer.length) {
console.info('TC_053 0006 ' + testimagebuffer.length); console.info('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_0100 0006 ' + testimagebuffer.length);
var oneStep = testimagebuffer.slice(offset, offset + bufferSize); var oneStep = testimagebuffer.slice(offset, offset + bufferSize);
console.info('TC_053 0007 ' + oneStep.length); console.info('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_0100 0007 ' + oneStep.length);
if (oneStep.length < bufferSize) { if (oneStep.length < bufferSize) {
isFinished = true; isFinished = true;
} }
ret = await incSouce.updateData(oneStep, isFinished, 0, oneStep.length); ret = await incSouce.updateData(oneStep, isFinished, 0, oneStep.length);
if (!ret) { if (!ret) {
console.info('TC_053 updateData failed'); console.info('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_0100 updateData failed');
expect(ret).assertTrue(); expect(ret).assertTrue();
break; break;
} }
offset = offset + oneStep.length; offset = offset + oneStep.length;
console.info('TC_053 0011 ' + offset); console.info('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_0100 0011 ' + offset);
} }
if (ret) { if (ret) {
console.info('TC_053 updateData success '); console.info('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_0100 updateData success ');
let decodingOptions = { let decodingOptions = {
sampleSize: 1 sampleSize: 1
}; };
incSouce.createPixelMap(decodingOptions, (err, pixelmap) => { incSouce.createPixelMap(decodingOptions, (err, pixelmap) => {
console.info('TC_053 0014' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_0100 0014' + pixelmap);
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
}) })
...@@ -2259,12 +2259,12 @@ export default function imageJsTest() { ...@@ -2259,12 +2259,12 @@ export default function imageJsTest() {
done(); done();
} }
} catch (error) { } catch (error) {
console.info('TC_053 updateData failed ' + error); console.info('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_0100 updateData failed ' + error);
} }
}) })
/** /**
* @tc.number : TC_053-1 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_0200
* @tc.name : createIncrementalSource-updateData-jpg * @tc.name : createIncrementalSource-updateData-jpg
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.update data * 2.update data
...@@ -2273,33 +2273,33 @@ export default function imageJsTest() { ...@@ -2273,33 +2273,33 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_053-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_0200', 0, async function (done) {
try { try {
let testimagebuffer = testJpg; let testimagebuffer = testJpg;
console.info('TC_053-1 0003 ' + testimagebuffer.length); console.info('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_0200 0003 ' + testimagebuffer.length);
let bufferSize = testimagebuffer.length; let bufferSize = testimagebuffer.length;
let offset = 0; let offset = 0;
const incSouce = image.createIncrementalSource(new ArrayBuffer(1)); const incSouce = image.createIncrementalSource(new ArrayBuffer(1));
let isFinished = false; let isFinished = false;
let ret; let ret;
while (offset < testimagebuffer.length) { while (offset < testimagebuffer.length) {
console.info('TC_053-1 0006 ' + testimagebuffer.length); console.info('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_0200 0006 ' + testimagebuffer.length);
var oneStep = testimagebuffer.slice(offset, offset + bufferSize); var oneStep = testimagebuffer.slice(offset, offset + bufferSize);
console.info('TC_053-1 0007 ' + oneStep.length); console.info('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_0200 0007 ' + oneStep.length);
if (oneStep.length < bufferSize) { if (oneStep.length < bufferSize) {
isFinished = true; isFinished = true;
} }
ret = await incSouce.updateData(oneStep, isFinished, 0, oneStep.length); ret = await incSouce.updateData(oneStep, isFinished, 0, oneStep.length);
if (!ret) { if (!ret) {
console.info('TC_053-1 updateData failed'); console.info('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_0200 updateData failed');
expect(ret).assertTrue(); expect(ret).assertTrue();
break; break;
} }
offset = offset + oneStep.length; offset = offset + oneStep.length;
console.info('TC_053-1 0011 ' + offset); console.info('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_0200 0011 ' + offset);
} }
if (ret) { if (ret) {
console.info('TC_053-1 updateData success '); console.info('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_0200 updateData success ');
let decodingOptions = { let decodingOptions = {
sampleSize: 1 sampleSize: 1
}; };
...@@ -2311,12 +2311,12 @@ export default function imageJsTest() { ...@@ -2311,12 +2311,12 @@ export default function imageJsTest() {
done(); done();
} }
} catch (error) { } catch (error) {
console.info('TC_053-1 updateData failed ' + error); console.info('SUB_GRAPHIC_IMAGE_CREATEINCREMENTALSOURCE_UPDATEDATA_0200 updateData failed ' + error);
} }
}) })
/** /**
* @tc.number : TC_064 * @tc.number : SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_PROMISE_0100
* @tc.name : release ImageSource - promise - png * @tc.name : release ImageSource - promise - png
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call release() * 2.call release()
...@@ -2325,34 +2325,34 @@ export default function imageJsTest() { ...@@ -2325,34 +2325,34 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_064', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_PROMISE_0100', 0, async function (done) {
try { try {
await getFd('test.png'); await getFd('test.png');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_064 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_PROMISE_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.release().then(() => { imageSourceApi.release().then(() => {
console.info('TC_064 success'); console.info('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_PROMISE_0100 success');
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
}).catch(error => { }).catch(error => {
console.log('TC_064 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_PROMISE_0100 error: ' + error);
expect().assertFail(); expect().assertFail();
done(); done();
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_064 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_PROMISE_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_064-1 * @tc.number : SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_CALLBACK_0100
* @tc.name : release ImageSource - callback - png * @tc.name : release ImageSource - callback - png
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call release() * 2.call release()
...@@ -2361,37 +2361,37 @@ export default function imageJsTest() { ...@@ -2361,37 +2361,37 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_064-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_CALLBACK_0100', 0, async function (done) {
try { try {
await getFd('test.png'); await getFd('test.png');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_064-1 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_CALLBACK_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.release(async (err) => { imageSourceApi.release(async (err) => {
if (err) { if (err) {
console.info('TC_064-1 err:' + err); console.info('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_CALLBACK_0100 err:' + err);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
return return
} }
console.info('TC_064-1 Success'); console.info('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_CALLBACK_0100 Success');
expect(true).assertTrue(); expect(true).assertTrue();
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_064-1 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_CALLBACK_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_065 * @tc.number : SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_PROMISE_0200
* @tc.name : release ImageSource - promise - bmp * @tc.name : release ImageSource - promise - bmp
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call release() * 2.call release()
...@@ -2400,34 +2400,34 @@ export default function imageJsTest() { ...@@ -2400,34 +2400,34 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_065', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_PROMISE_0200', 0, async function (done) {
try { try {
await getFd('test.bmp'); await getFd('test.bmp');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_065 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_PROMISE_0200 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.release().then(() => { imageSourceApi.release().then(() => {
console.info('TC_065 success'); console.info('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_PROMISE_0200 success');
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
}).catch(error => { }).catch(error => {
console.log('TC_065 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_PROMISE_0200 error: ' + error);
expect().assertFail(); expect().assertFail();
done(); done();
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_065 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_PROMISE_0200 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_065-1 * @tc.number : SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_CALLBACK_0200
* @tc.name : release ImageSource - callback - bmp * @tc.name : release ImageSource - callback - bmp
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create SourceStream * 2.create SourceStream
...@@ -2436,30 +2436,30 @@ export default function imageJsTest() { ...@@ -2436,30 +2436,30 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_065-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_CALLBACK_0200', 0, async function (done) {
try { try {
await getFd('test.bmp'); await getFd('test.bmp');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_065-1 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_CALLBACK_0200 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.release(async () => { imageSourceApi.release(async () => {
console.info('TC_065-1 Success'); console.info('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_CALLBACK_0200 Success');
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_065-1 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_CALLBACK_0200 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_066 * @tc.number : SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_PROMISE_0300
* @tc.name : release ImageSource - promise - gif * @tc.name : release ImageSource - promise - gif
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call release() * 2.call release()
...@@ -2468,34 +2468,34 @@ export default function imageJsTest() { ...@@ -2468,34 +2468,34 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_066', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_PROMISE_0300', 0, async function (done) {
try { try {
await getFd('test.gif'); await getFd('test.gif');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_066 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_PROMISE_0300 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.release().then(() => { imageSourceApi.release().then(() => {
console.info('TC_066 success'); console.info('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_PROMISE_0300 success');
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
}).catch(error => { }).catch(error => {
console.log('TC_066 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_PROMISE_0300 error: ' + error);
expect().assertFail(); expect().assertFail();
done(); done();
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_066 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_PROMISE_0300 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_066-1 * @tc.number : SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_CALLBACK_0300
* @tc.name : release ImageSource - callback - gif * @tc.name : release ImageSource - callback - gif
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call release() * 2.call release()
...@@ -2504,30 +2504,30 @@ export default function imageJsTest() { ...@@ -2504,30 +2504,30 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_066-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_CALLBACK_0300', 0, async function (done) {
try { try {
await getFd('test.gif'); await getFd('test.gif');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_066-1 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_CALLBACK_0300 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.release(() => { imageSourceApi.release(() => {
console.info('TC_066-1 Success'); console.info('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_CALLBACK_0300 Success');
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_066-1 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_RELEASE_IMAGESOURCE_CALLBACK_0300 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_067-14 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0800
* @tc.name : createPixelMap-promise-gif * @tc.name : createPixelMap-promise-gif
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -2537,36 +2537,36 @@ export default function imageJsTest() { ...@@ -2537,36 +2537,36 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_067-14', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0800', 0, async function (done) {
try { try {
await getFd('moving_test.gif'); await getFd('moving_test.gif');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_067-14 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0800 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.createPixelMap().then(pixelmap => { imageSourceApi.createPixelMap().then(pixelmap => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_067-14 success '); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0800 success ');
expect(pixelmap !== undefined).assertTrue(); expect(pixelmap !== undefined).assertTrue();
done(); done();
}).catch(error => { }).catch(error => {
console.log('TC_067-14 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0800 error: ' + error);
expect().assertFail(); expect().assertFail();
done(); done();
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_067-14 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0800 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_067-15 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_1200
* @tc.name : createPixelMap-pcallback-gif * @tc.name : createPixelMap-callback-gif
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
* 3.create PixelMap * 3.create PixelMap
...@@ -2575,31 +2575,31 @@ export default function imageJsTest() { ...@@ -2575,31 +2575,31 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_067-15', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_1200', 0, async function (done) {
try { try {
await getFd('moving_test.gif'); await getFd('moving_test.gif');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_067-15 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_1200 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.createPixelMap((err, pixelmap) => { imageSourceApi.createPixelMap((err, pixelmap) => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_067-15 success '); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_1200 success ');
expect(pixelmap !== undefined).assertTrue(); expect(pixelmap !== undefined).assertTrue();
done(); done();
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_067-15 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_1200 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_068-14 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0900
* @tc.name : createPixelMap-promise-bmp * @tc.name : createPixelMap-promise-bmp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -2609,35 +2609,35 @@ export default function imageJsTest() { ...@@ -2609,35 +2609,35 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068-14', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0900', 0, async function (done) {
try { try {
await getFd('test.bmp'); await getFd('test.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('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0900 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.createPixelMap().then(pixelmap => { imageSourceApi.createPixelMap().then(pixelmap => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_068-14 success '); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0900 success ');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
}).catch(error => { }).catch(error => {
console.log('TC_068-14 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0900 error: ' + error);
expect().assertFail(); expect().assertFail();
done(); done();
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_068-14 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_0900 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_068-15 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_1300
* @tc.name : createPixelMap-callback-bmp * @tc.name : createPixelMap-callback-bmp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -2647,31 +2647,31 @@ export default function imageJsTest() { ...@@ -2647,31 +2647,31 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068-15', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_1300', 0, async function (done) {
try { try {
await getFd('test.bmp'); await getFd('test.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('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_1300 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.createPixelMap((err, pixelmap) => { imageSourceApi.createPixelMap((err, pixelmap) => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_068-15 success '); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_1300 success ');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_068-15 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_1300 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_163-14 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_1000
* @tc.name : createPixelMap-promise-png * @tc.name : createPixelMap-promise-png
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -2681,35 +2681,35 @@ export default function imageJsTest() { ...@@ -2681,35 +2681,35 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163-14', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_1000', 0, async function (done) {
try { try {
await getFd('test.png'); await getFd('test.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('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_1000 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.createPixelMap().then(pixelmap => { imageSourceApi.createPixelMap().then(pixelmap => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_163-14 success'); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_1000 success');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
}).catch(error => { }).catch(error => {
console.log('TC_163-14 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_1000 error: ' + error);
expect().assertFail(); expect().assertFail();
done(); done();
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_163-14 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_1000 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_163-15 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_1400
* @tc.name : createPixelMap-callback-png * @tc.name : createPixelMap-callback-png
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -2719,31 +2719,31 @@ export default function imageJsTest() { ...@@ -2719,31 +2719,31 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163-15', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_1400', 0, async function (done) {
try { try {
await getFd('test.png'); await getFd('test.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('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_1400 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.createPixelMap((err, pixelmap) => { imageSourceApi.createPixelMap((err, pixelmap) => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_163-15 success'); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_1400 success');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_163-15 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_1400 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_164 * @tc.number : SUB_GRAPHIC_IMAGE_IMAGESOURCE_SUPPORTEDFORMATS_0100
* @tc.name : imagesource supportedFormats * @tc.name : imagesource supportedFormats
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call supportedFormats * 2.call supportedFormats
...@@ -2751,29 +2751,29 @@ export default function imageJsTest() { ...@@ -2751,29 +2751,29 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('TC_164', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_IMAGESOURCE_SUPPORTEDFORMATS_0100', 0, async function (done) {
try { try {
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_164 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_IMAGESOURCE_SUPPORTEDFORMATS_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
expect(imageSourceApi.supportedFormats != undefined).assertTrue(); expect(imageSourceApi.supportedFormats != undefined).assertTrue();
console.info(imageSourceApi.supportedFormats); console.info(imageSourceApi.supportedFormats);
console.info('TC_164 success '); console.info('SUB_GRAPHIC_IMAGE_IMAGESOURCE_SUPPORTEDFORMATS_0100 success ');
done(); done();
} }
} catch (error) { } catch (error) {
console.info('TC_164 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_IMAGESOURCE_SUPPORTEDFORMATS_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_166 * @tc.number : SUB_GRAPHIC_IMAGE_IMAGEPACKER_SUPPORTEDFORMATS_0100
* @tc.name : imagepacker supportedFormats * @tc.name : imagepacker supportedFormats
* @tc.desc : 1.create imagepacker * @tc.desc : 1.create imagepacker
* 2.call supportedFormats * 2.call supportedFormats
...@@ -2781,22 +2781,22 @@ export default function imageJsTest() { ...@@ -2781,22 +2781,22 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('TC_166', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_IMAGEPACKER_SUPPORTEDFORMATS_0100', 0, async function (done) {
const imagePackerApi = image.createImagePacker(); const imagePackerApi = image.createImagePacker();
if (imagePackerApi == undefined) { if (imagePackerApi == undefined) {
console.info('TC_166 create image packer failed'); console.info('SUB_GRAPHIC_IMAGE_IMAGEPACKER_SUPPORTEDFORMATS_0100 create image packer failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
expect(imagePackerApi.supportedFormats != undefined).assertTrue(); expect(imagePackerApi.supportedFormats != undefined).assertTrue();
console.info(imagePackerApi.supportedFormats); console.info(imagePackerApi.supportedFormats);
console.info('TC_166 success '); console.info('SUB_GRAPHIC_IMAGE_IMAGEPACKER_SUPPORTEDFORMATS_0100 success ');
done(); done();
} }
}) })
/** /**
* @tc.number : TC_168 * @tc.number : SUB_GRAPHIC_IMAGE_ISEDITABLE_0100
* @tc.name : isEditable * @tc.name : isEditable
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* 2.call isEditable * 2.call isEditable
...@@ -2805,24 +2805,24 @@ export default function imageJsTest() { ...@@ -2805,24 +2805,24 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_168', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_ISEDITABLE_0100', 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, (error, pixelmap) => { image.createPixelMap(Color, opts, (error, pixelmap) => {
if (pixelmap == undefined) { if (pixelmap == undefined) {
console.info('TC_168 create pixelmap failed'); console.info('SUB_GRAPHIC_IMAGE_ISEDITABLE_0100 create pixelmap failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
expect(pixelmap.isEditable == true).assertTrue(); expect(pixelmap.isEditable == true).assertTrue();
console.info('TC_168 success '); console.info('SUB_GRAPHIC_IMAGE_ISEDITABLE_0100 success ');
done(); done();
} }
}) })
}) })
/** /**
* @tc.number : editable_001 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_EDITABLE_0100
* @tc.name : create pixelmap-callback (editable: true, pixelFormat: ARGB_8888, * @tc.name : create pixelmap-callback (editable: true, pixelFormat: ARGB_8888,
* size: { height: 4, width: 6 },bytes = buffer) * size: { height: 4, width: 6 },bytes = buffer)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
...@@ -2833,22 +2833,22 @@ export default function imageJsTest() { ...@@ -2833,22 +2833,22 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('editable_001', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_EDITABLE_0100', 0, async function (done) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
let edit = true; let edit = true;
let opts = { editable: true, pixelFormat: 1, size: { height: 4, width: 6 } } let opts = { editable: true, pixelFormat: 1, size: { height: 4, width: 6 } }
image.createPixelMap(Color, opts, (err, pixelmap) => { image.createPixelMap(Color, opts, (err, pixelmap) => {
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
console.info('editable_001 editable: ' + pixelmap.isEditable); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_EDITABLE_0100 editable: ' + pixelmap.isEditable);
expect(pixelmap.isEditable == opts.editable).assertTrue(); expect(pixelmap.isEditable == opts.editable).assertTrue();
console.info('editable_001 edit: ' + edit); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_EDITABLE_0100 edit: ' + edit);
expect(pixelmap.isEditable == edit).assertTrue(); expect(pixelmap.isEditable == edit).assertTrue();
done(); done();
}) })
}) })
/** /**
* @tc.number : editable_002 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_EDITABLE_0200
* @tc.name : create pixelmap-callback (editable: false, pixelFormat: ARGB_8888, * @tc.name : create pixelmap-callback (editable: false, pixelFormat: ARGB_8888,
* size: { height: 4, width: 6 },bytes = buffer) * size: { height: 4, width: 6 },bytes = buffer)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
...@@ -2859,22 +2859,22 @@ export default function imageJsTest() { ...@@ -2859,22 +2859,22 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('editable_002', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_EDITABLE_0200', 0, async function (done) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
let edit = false; let edit = false;
let opts = { editable: false, pixelFormat: 1, size: { height: 4, width: 6 } } let opts = { editable: false, pixelFormat: 1, size: { height: 4, width: 6 } }
image.createPixelMap(Color, opts, (err, pixelmap) => { image.createPixelMap(Color, opts, (err, pixelmap) => {
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
console.info('editable_002 editable: ' + pixelmap.isEditable); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_EDITABLE_0200 editable: ' + pixelmap.isEditable);
expect(pixelmap.isEditable == opts.editable).assertTrue(); expect(pixelmap.isEditable == opts.editable).assertTrue();
console.info('editable_002 edit: ' + edit); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_CALLBACK_EDITABLE_0200 edit: ' + edit);
expect(pixelmap.isEditable == edit).assertTrue(); expect(pixelmap.isEditable == edit).assertTrue();
done(); done();
}) })
}) })
/** /**
* @tc.number : editable_003 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_EDITABLE_0100
* @tc.name : create pixelmap-promise (editable: true, pixelFormat: RGB_565, * @tc.name : create pixelmap-promise (editable: true, pixelFormat: RGB_565,
* size: { height: 4, width: 6 }, bytes = buffer) * size: { height: 4, width: 6 }, bytes = buffer)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
...@@ -2885,27 +2885,27 @@ export default function imageJsTest() { ...@@ -2885,27 +2885,27 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('editable_003', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_EDITABLE_0100', 0, async function (done) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
let edit = true; let edit = true;
let opts = { editable: true, pixelFormat: 2, size: { height: 4, width: 6 } } let opts = { editable: true, pixelFormat: 2, size: { height: 4, width: 6 } }
image.createPixelMap(Color, opts) image.createPixelMap(Color, opts)
.then(pixelmap => { .then(pixelmap => {
console.info('editable_003 editable: ' + pixelmap.isEditable); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_EDITABLE_0100 editable: ' + pixelmap.isEditable);
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
expect(pixelmap.isEditable == opts.editable).assertTrue(); expect(pixelmap.isEditable == opts.editable).assertTrue();
expect(pixelmap.isEditable == edit).assertTrue(); expect(pixelmap.isEditable == edit).assertTrue();
done(); done();
}) })
.catch(error => { .catch(error => {
console.log('editable_003 err' + error); console.log('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_EDITABLE_0100 err' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
}) })
}) })
/** /**
* @tc.number : editable_004 * @tc.number : SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_EDITABLE_0200
* @tc.name : create pixelmap-promise (editable: false, pixelFormat: RGB_565, * @tc.name : create pixelmap-promise (editable: false, pixelFormat: RGB_565,
* size: { height: 4, width: 6 }, bytes = buffer) * size: { height: 4, width: 6 }, bytes = buffer)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
...@@ -2916,20 +2916,20 @@ export default function imageJsTest() { ...@@ -2916,20 +2916,20 @@ export default function imageJsTest() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('editable_004', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_EDITABLE_0200', 0, async function (done) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
let edit = false; let edit = false;
let opts = { editable: false, pixelFormat: 2, size: { height: 4, width: 6 } } let opts = { editable: false, pixelFormat: 2, size: { height: 4, width: 6 } }
image.createPixelMap(Color, opts) image.createPixelMap(Color, opts)
.then(pixelmap => { .then(pixelmap => {
console.info('editable_004 editable: ' + pixelmap.isEditable); console.info('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_EDITABLE_0200 editable: ' + pixelmap.isEditable);
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
expect(pixelmap.isEditable == opts.editable).assertTrue(); expect(pixelmap.isEditable == opts.editable).assertTrue();
expect(pixelmap.isEditable == edit).assertTrue(); expect(pixelmap.isEditable == edit).assertTrue();
done(); done();
}) })
.catch(error => { .catch(error => {
console.log('editable_004 err' + error); console.log('SUB_GRAPHIC_IMAGE_CREATEPIXELMAP_PROMISE_EDITABLE_0200 err' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
}) })
......
...@@ -112,7 +112,7 @@ describe('imageColorSpace', function () { ...@@ -112,7 +112,7 @@ describe('imageColorSpace', function () {
} }
/** /**
* @tc.number : decodeP3_001 * @tc.number : SUB_GRAPHIC_IMAGE_COLORSPACE_DECODE_0100
* @tc.name : Decode * @tc.name : Decode
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.create pixelmap * 2.create pixelmap
...@@ -120,8 +120,8 @@ describe('imageColorSpace', function () { ...@@ -120,8 +120,8 @@ describe('imageColorSpace', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('decodeP3_001', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_COLORSPACE_DECODE_0100', 0, async function (done) {
let logger = loger('decodeP3_001') let logger = loger('SUB_GRAPHIC_IMAGE_COLORSPACE_DECODE_0100')
try { try {
let imageSource = genPicSource(); let imageSource = genPicSource();
logger.log("ImageSource " + (imageSource != undefined)); logger.log("ImageSource " + (imageSource != undefined));
...@@ -141,7 +141,7 @@ describe('imageColorSpace', function () { ...@@ -141,7 +141,7 @@ describe('imageColorSpace', function () {
}) })
/** /**
* @tc.number : decodeP3_002 * @tc.number : SUB_GRAPHIC_IMAGE_COLORSPACE_DECODE_CALLBACK_0100
* @tc.name : Decode -callback * @tc.name : Decode -callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.create pixelmap * 2.create pixelmap
...@@ -149,8 +149,8 @@ describe('imageColorSpace', function () { ...@@ -149,8 +149,8 @@ describe('imageColorSpace', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('decodeP3_002', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_COLORSPACE_DECODE_CALLBACK_0100', 0, async function (done) {
let logger = loger('decodeP3_002') let logger = loger('SUB_GRAPHIC_IMAGE_COLORSPACE_DECODE_CALLBACK_0100')
try { try {
let imageSource = genPicSource(); let imageSource = genPicSource();
logger.log("ImageSource " + (imageSource != undefined)); logger.log("ImageSource " + (imageSource != undefined));
...@@ -170,7 +170,7 @@ describe('imageColorSpace', function () { ...@@ -170,7 +170,7 @@ describe('imageColorSpace', function () {
}) })
/** /**
* @tc.number : encodeP3_001 * @tc.number : SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_CALLBACK_0100
* @tc.name : Encode -callback * @tc.name : Encode -callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.createImagePacker * 2.createImagePacker
...@@ -179,9 +179,9 @@ describe('imageColorSpace', function () { ...@@ -179,9 +179,9 @@ describe('imageColorSpace', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('encodeP3_001', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_CALLBACK_0100', 0, async function (done) {
let logger = loger('encodeP3_001') let logger = loger('SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_CALLBACK_0100')
let testNum = 'encodeP3_001' let testNum = 'SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_CALLBACK_0100'
try { try {
let imageSource = genPicSource(); let imageSource = genPicSource();
logger.log("ImageSource " + (imageSource != undefined)); logger.log("ImageSource " + (imageSource != undefined));
...@@ -217,7 +217,7 @@ describe('imageColorSpace', function () { ...@@ -217,7 +217,7 @@ describe('imageColorSpace', function () {
}) })
/** /**
* @tc.number : encodeP3_002 * @tc.number : SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_PROMISE_0100
* @tc.name : Encode -promise * @tc.name : Encode -promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.createImagePacker * 2.createImagePacker
...@@ -226,9 +226,9 @@ describe('imageColorSpace', function () { ...@@ -226,9 +226,9 @@ describe('imageColorSpace', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('encodeP3_002', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_PROMISE_0100', 0, async function (done) {
let logger = loger('encodeP3_002') let logger = loger('SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_PROMISE_0100')
let testNum = 'encodeP3_002' let testNum = 'SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_PROMISE_0100'
try { try {
let imageSource = genPicSource(); let imageSource = genPicSource();
logger.log("ImageSource " + (imageSource != undefined)); logger.log("ImageSource " + (imageSource != undefined));
...@@ -254,7 +254,7 @@ describe('imageColorSpace', function () { ...@@ -254,7 +254,7 @@ describe('imageColorSpace', function () {
done(); done();
}).catch(error => { }).catch(error => {
console.log('encodeP3_002 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_PROMISE_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
}) })
...@@ -268,7 +268,7 @@ describe('imageColorSpace', function () { ...@@ -268,7 +268,7 @@ describe('imageColorSpace', function () {
}) })
/** /**
* @tc.number : encodeP3_003 * @tc.number : SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_CALLBACK_0200
* @tc.name : Encode -callback- * @tc.name : Encode -callback-
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.createImagePacker * 2.createImagePacker
...@@ -277,13 +277,13 @@ describe('imageColorSpace', function () { ...@@ -277,13 +277,13 @@ describe('imageColorSpace', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('encodeP3_003', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_CALLBACK_0200', 0, async function (done) {
let packOpts = { format:["image/gif"], quality:90 } let packOpts = { format:["image/gif"], quality:90 }
packingCbFail(done, 'encodeP3_003', packOpts) packingCbFail(done, 'SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_CALLBACK_0200', packOpts)
}) })
/** /**
* @tc.number : encodeP3_004 * @tc.number : SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_CALLBACK_ERROR_FORMAT_0100
* @tc.name : Encode -callback-wrong format * @tc.name : Encode -callback-wrong format
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.createImagePacker * 2.createImagePacker
...@@ -292,13 +292,13 @@ describe('imageColorSpace', function () { ...@@ -292,13 +292,13 @@ describe('imageColorSpace', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('encodeP3_004', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_CALLBACK_ERROR_FORMAT_0100', 0, async function (done) {
let packOpts = { format:["image/jpeg"], quality:200 } let packOpts = { format:["image/jpeg"], quality:200 }
packingCbFail(done, 'encodeP3_004', packOpts) packingCbFail(done, 'SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_CALLBACK_ERROR_FORMAT_0100', packOpts)
}) })
/** /**
* @tc.number : encodeP3_005 * @tc.number : SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_CALLBACK_NO_0100
* @tc.name : Encode -callback-no quality * @tc.name : Encode -callback-no quality
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.createImagePacker * 2.createImagePacker
...@@ -307,13 +307,13 @@ describe('imageColorSpace', function () { ...@@ -307,13 +307,13 @@ describe('imageColorSpace', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('encodeP3_005', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_CALLBACK_NO_0100', 0, async function (done) {
let packOpts = { format:["image/jpeg"] } let packOpts = { format:["image/jpeg"] }
packingCbFail(done, 'encodeP3_005', packOpts) packingCbFail(done, 'SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_CALLBACK_NO_0100', packOpts)
}) })
/** /**
* @tc.number : encodeP3_006 * @tc.number : SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_CALLBACK_NO_0200
* @tc.name : Encode -callback-no format * @tc.name : Encode -callback-no format
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.createImagePacker * 2.createImagePacker
...@@ -322,13 +322,13 @@ describe('imageColorSpace', function () { ...@@ -322,13 +322,13 @@ describe('imageColorSpace', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('encodeP3_006', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_CALLBACK_NO_0200', 0, async function (done) {
let packOpts = { quality:50 } let packOpts = { quality:50 }
packingCbFail(done, 'encodeP3_006', packOpts) packingCbFail(done, 'SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_CALLBACK_NO_0200', packOpts)
}) })
/** /**
* @tc.number : encodeP3_007 * @tc.number : SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_PROMISE_0200
* @tc.name : Encode -promise * @tc.name : Encode -promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.createImagePacker * 2.createImagePacker
...@@ -337,13 +337,13 @@ describe('imageColorSpace', function () { ...@@ -337,13 +337,13 @@ describe('imageColorSpace', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('encodeP3_007', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_PROMISE_0200', 0, async function (done) {
let packOpts = { format:["image/gif"], quality:90 } let packOpts = { format:["image/gif"], quality:90 }
packingPromiseFail(done, 'encodeP3_007', packOpts) packingPromiseFail(done, 'SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_PROMISE_0200', packOpts)
}) })
/** /**
* @tc.number : encodeP3_008 * @tc.number : SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_PROMISE_0300
* @tc.name : Encode -promise * @tc.name : Encode -promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.createImagePacker * 2.createImagePacker
...@@ -352,13 +352,13 @@ describe('imageColorSpace', function () { ...@@ -352,13 +352,13 @@ describe('imageColorSpace', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('encodeP3_008', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_PROMISE_0300', 0, async function (done) {
let packOpts = { format:["image/jpeg"], quality:101 } let packOpts = { format:["image/jpeg"], quality:101 }
packingPromiseFail(done, 'encodeP3_008', packOpts) packingPromiseFail(done, 'SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_PROMISE_0300', packOpts)
}) })
/** /**
* @tc.number : encodeP3_009 * @tc.number : SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_PROMISE_NO_0100
* @tc.name : Encode -promise -no quality * @tc.name : Encode -promise -no quality
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.createImagePacker * 2.createImagePacker
...@@ -367,13 +367,13 @@ describe('imageColorSpace', function () { ...@@ -367,13 +367,13 @@ describe('imageColorSpace', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('encodeP3_009', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_PROMISE_NO_0100', 0, async function (done) {
let packOpts = { format:["image/jpeg"] } let packOpts = { format:["image/jpeg"] }
packingPromiseFail(done, 'encodeP3_009', packOpts) packingPromiseFail(done, 'SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_PROMISE_NO_0100', packOpts)
}) })
/** /**
* @tc.number : encodeP3_010 * @tc.number : SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_PROMISE_NO_0200
* @tc.name : Encode -promise -no format * @tc.name : Encode -promise -no format
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.createImagePacker * 2.createImagePacker
...@@ -382,9 +382,9 @@ describe('imageColorSpace', function () { ...@@ -382,9 +382,9 @@ describe('imageColorSpace', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('encodeP3_010', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_PROMISE_NO_0200', 0, async function (done) {
let packOpts = { quality:100 } let packOpts = { quality:100 }
packingPromiseFail(done, 'encodeP3_010', packOpts) packingPromiseFail(done, 'SUB_GRAPHIC_IMAGE_COLORSPACE_ENCODE_PROMISE_NO_0200', packOpts)
}) })
}) })
......
...@@ -171,7 +171,7 @@ describe('ImageCreator', function () { ...@@ -171,7 +171,7 @@ describe('ImageCreator', function () {
} }
/** /**
* @tc.number : Creator_001 * @tc.number : SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_0100
* @tc.name : createImageCreator * @tc.name : createImageCreator
* @tc.desc : 1.set width,height,format,capacity * @tc.desc : 1.set width,height,format,capacity
* 2.create ImageCreator * 2.create ImageCreator
...@@ -180,11 +180,11 @@ describe('ImageCreator', function () { ...@@ -180,11 +180,11 @@ describe('ImageCreator', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Creator_001', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_0100', 0, async function (done) {
var creator = image.createImageCreator(WIDTH, HEIGHT, FORMAT, CAPACITY); var creator = image.createImageCreator(WIDTH, HEIGHT, FORMAT, CAPACITY);
if (creator == undefined) { if (creator == undefined) {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('creator_001 undefined') console.info('SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_0100 undefined')
done(); done();
} else { } else {
expect(creator.size.width == WIDTH).assertTrue(); expect(creator.size.width == WIDTH).assertTrue();
...@@ -196,7 +196,7 @@ describe('ImageCreator', function () { ...@@ -196,7 +196,7 @@ describe('ImageCreator', function () {
}) })
/** /**
* @tc.number : Creator_001-1 * @tc.number : SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_0200
* @tc.name : createImageCreator * @tc.name : createImageCreator
* @tc.desc : 1.set width,height,format,capacity * @tc.desc : 1.set width,height,format,capacity
* 2.create ImageCreator * 2.create ImageCreator
...@@ -205,12 +205,12 @@ describe('ImageCreator', function () { ...@@ -205,12 +205,12 @@ describe('ImageCreator', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Creator_001-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_0200', 0, async function (done) {
createCreator(done, 'Creator_001-1', WIDTH, HEIGHT, FORMAT, 'hd!'); createCreator(done, 'SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_0200', WIDTH, HEIGHT, FORMAT, 'hd!');
}) })
/** /**
* @tc.number : Creator_001-2 * @tc.number : SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_0300
* @tc.name : createImageCreator * @tc.name : createImageCreator
* @tc.desc : 1.set width,height,format,capacity * @tc.desc : 1.set width,height,format,capacity
* 2.create ImageCreator * 2.create ImageCreator
...@@ -219,12 +219,12 @@ describe('ImageCreator', function () { ...@@ -219,12 +219,12 @@ describe('ImageCreator', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Creator_001-2', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_0300', 0, async function (done) {
createCreator(done, 'Creator_001-2', WIDTH, HEIGHT, null, CAPACITY); createCreator(done, 'SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_0300', WIDTH, HEIGHT, null, CAPACITY);
}) })
/** /**
* @tc.number : Creator_001-3 * @tc.number : SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_0400
* @tc.name : createImageCreator * @tc.name : createImageCreator
* @tc.desc : 1.set width,height,format,capacity * @tc.desc : 1.set width,height,format,capacity
* 2.create ImageCreator * 2.create ImageCreator
...@@ -233,12 +233,12 @@ describe('ImageCreator', function () { ...@@ -233,12 +233,12 @@ describe('ImageCreator', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Creator_001-3', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_0400', 0, async function (done) {
createCreator(done, 'Creator_001-3', WIDTH, null, FORMAT, CAPACITY); createCreator(done, 'SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_0400', WIDTH, null, FORMAT, CAPACITY);
}) })
/** /**
* @tc.number : Creator_001-4 * @tc.number : SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_0500
* @tc.name : createImageCreator * @tc.name : createImageCreator
* @tc.desc : 1.set width,height,format,capacity * @tc.desc : 1.set width,height,format,capacity
* 2.create ImageCreator * 2.create ImageCreator
...@@ -247,12 +247,12 @@ describe('ImageCreator', function () { ...@@ -247,12 +247,12 @@ describe('ImageCreator', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Creator_001-4', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_0500', 0, async function (done) {
createCreator(done, 'Creator_001-4', null, HEIGHT, FORMAT, CAPACITY); createCreator(done, 'SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_0500', null, HEIGHT, FORMAT, CAPACITY);
}) })
/** /**
* @tc.number : Creator_001-5 * @tc.number : SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_0600
* @tc.name : createImageCreator * @tc.name : createImageCreator
* @tc.desc : 1.set width,height,format,capacity * @tc.desc : 1.set width,height,format,capacity
* 2.create ImageCreator * 2.create ImageCreator
...@@ -261,12 +261,12 @@ describe('ImageCreator', function () { ...@@ -261,12 +261,12 @@ describe('ImageCreator', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Creator_001-5', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_0600', 0, async function (done) {
createCreator(done, 'Creator_001-5', WIDTH, HEIGHT, FORMAT, null); createCreator(done, 'SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_0600', WIDTH, HEIGHT, FORMAT, null);
}) })
/** /**
* @tc.number : Creator_001-6 * @tc.number : SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_0700
* @tc.name : createImageCreator * @tc.name : createImageCreator
* @tc.desc : 1.set width,height,format,capacity * @tc.desc : 1.set width,height,format,capacity
* 2.create ImageCreator * 2.create ImageCreator
...@@ -275,12 +275,12 @@ describe('ImageCreator', function () { ...@@ -275,12 +275,12 @@ describe('ImageCreator', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Creator_001-6', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_0700', 0, async function (done) {
createCreator(done, 'Creator_001-6', false, HEIGHT, FORMAT, CAPACITY); createCreator(done, 'SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_0700', false, HEIGHT, FORMAT, CAPACITY);
}) })
/** /**
* @tc.number : Creator_001-7 * @tc.number : SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_0800
* @tc.name : createImageCreator * @tc.name : createImageCreator
* @tc.desc : 1.set width,height,format,capacity * @tc.desc : 1.set width,height,format,capacity
* 2.create ImageCreator * 2.create ImageCreator
...@@ -289,12 +289,12 @@ describe('ImageCreator', function () { ...@@ -289,12 +289,12 @@ describe('ImageCreator', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Creator_001-7', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_0800', 0, async function (done) {
createCreator(done, 'Creator_001-7', { a: 10 }, HEIGHT, FORMAT, CAPACITY); createCreator(done, 'SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_0800', { a: 10 }, HEIGHT, FORMAT, CAPACITY);
}) })
/** /**
* @tc.number : Creator_001-8 * @tc.number : SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_0900
* @tc.name : createImageCreator * @tc.name : createImageCreator
* @tc.desc : 1.set width,height,format,capacity * @tc.desc : 1.set width,height,format,capacity
* 2.create ImageCreator * 2.create ImageCreator
...@@ -303,12 +303,12 @@ describe('ImageCreator', function () { ...@@ -303,12 +303,12 @@ describe('ImageCreator', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Creator_001-8', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_0900', 0, async function (done) {
createCreator(done, 'Creator_001-8', WIDTH, false, FORMAT, CAPACITY); createCreator(done, 'SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_0900', WIDTH, false, FORMAT, CAPACITY);
}) })
/** /**
* @tc.number : Creator_001-9 * @tc.number : SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_1000
* @tc.name : createImageCreator * @tc.name : createImageCreator
* @tc.desc : 1.set width,height,format,capacity * @tc.desc : 1.set width,height,format,capacity
* 2.create ImageCreator * 2.create ImageCreator
...@@ -317,13 +317,13 @@ describe('ImageCreator', function () { ...@@ -317,13 +317,13 @@ describe('ImageCreator', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Creator_001-9', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_1000', 0, async function (done) {
createCreator(done, 'Creator_001-9', WIDTH, HEIGHT, 'form.', CAPACITY); createCreator(done, 'SUB_GRAPHIC_IMAGE_CREATOR_CREATEIMAGECREATOR_1000', WIDTH, HEIGHT, 'form.', CAPACITY);
}) })
/** /**
* @tc.number : Creator_002 * @tc.number : SUB_GRAPHIC_IMAGE_CREATOR_RELEASE_PROMISE_0100
* @tc.name : release-promise * @tc.name : release-promise
* @tc.desc : 1.create ImageCreator * @tc.desc : 1.create ImageCreator
* 2.call release * 2.call release
...@@ -332,11 +332,11 @@ describe('ImageCreator', function () { ...@@ -332,11 +332,11 @@ describe('ImageCreator', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Creator_002', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATOR_RELEASE_PROMISE_0100', 0, async function (done) {
var creator = image.createImageCreator(WIDTH, HEIGHT, FORMAT, CAPACITY); var creator = image.createImageCreator(WIDTH, HEIGHT, FORMAT, CAPACITY);
if (creator != undefined) { if (creator != undefined) {
creator.release().then(() => { creator.release().then(() => {
console.info('Creator_002 release '); console.info('SUB_GRAPHIC_IMAGE_CREATOR_RELEASE_PROMISE_0100 release ');
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
}).catch(error => { }).catch(error => {
...@@ -345,13 +345,13 @@ describe('ImageCreator', function () { ...@@ -345,13 +345,13 @@ describe('ImageCreator', function () {
}) })
} else { } else {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('Creator_002 finished'); console.info('SUB_GRAPHIC_IMAGE_CREATOR_RELEASE_PROMISE_0100 finished');
done() done()
} }
}) })
/** /**
* @tc.number : Creator_003 * @tc.number : SUB_GRAPHIC_IMAGE_CREATOR_RELEASE_CALLBACK_0100
* @tc.name : release-callback * @tc.name : release-callback
* @tc.desc : 1.create ImageCreator * @tc.desc : 1.create ImageCreator
* 2.call release * 2.call release
...@@ -360,29 +360,29 @@ describe('ImageCreator', function () { ...@@ -360,29 +360,29 @@ describe('ImageCreator', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Creator_003', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATOR_RELEASE_CALLBACK_0100', 0, async function (done) {
var creator = image.createImageCreator(WIDTH, HEIGHT, FORMAT, CAPACITY); var creator = image.createImageCreator(WIDTH, HEIGHT, FORMAT, CAPACITY);
if (creator != undefined) { if (creator != undefined) {
creator.release((err) => { creator.release((err) => {
if (err) { if (err) {
console.info('Creator_003 release call back' + err); console.info('SUB_GRAPHIC_IMAGE_CREATOR_RELEASE_CALLBACK_0100 release call back' + err);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
return; return;
} }
console.info('Creator_003 release call back'); console.info('SUB_GRAPHIC_IMAGE_CREATOR_RELEASE_CALLBACK_0100 release call back');
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
}); });
} else { } else {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('Creator_003 finished'); console.info('SUB_GRAPHIC_IMAGE_CREATOR_RELEASE_CALLBACK_0100 finished');
done() done()
} }
}) })
/** /**
* @tc.number : Creator_004 * @tc.number : SUB_GRAPHIC_IMAGE_CREATOR_DEQUEUEIMAGE_PROMISE_0100
* @tc.name : dequeueImage-promise * @tc.name : dequeueImage-promise
* @tc.desc : 1.create ImageCreator * @tc.desc : 1.create ImageCreator
* 2.call dequeueImage * 2.call dequeueImage
...@@ -391,27 +391,27 @@ describe('ImageCreator', function () { ...@@ -391,27 +391,27 @@ describe('ImageCreator', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Creator_004', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATOR_DEQUEUEIMAGE_PROMISE_0100', 0, async function (done) {
var creator = image.createImageCreator(WIDTH, HEIGHT, FORMAT, CAPACITY); var creator = image.createImageCreator(WIDTH, HEIGHT, FORMAT, CAPACITY);
if (creator != undefined) { if (creator != undefined) {
creator.dequeueImage().then(img => { creator.dequeueImage().then(img => {
console.info('Creator_004 dequeueImage Success'); console.info('SUB_GRAPHIC_IMAGE_CREATOR_DEQUEUEIMAGE_PROMISE_0100 dequeueImage Success');
expect(img != undefined).assertTrue(); expect(img != undefined).assertTrue();
done(); done();
}).catch(error => { }).catch(error => {
console.log('Creator_004 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_CREATOR_DEQUEUEIMAGE_PROMISE_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
}) })
} else { } else {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('Creator_004 finished'); console.info('SUB_GRAPHIC_IMAGE_CREATOR_DEQUEUEIMAGE_PROMISE_0100 finished');
done(); done();
} }
}) })
/** /**
* @tc.number : Creator_005 * @tc.number : SUB_GRAPHIC_IMAGE_CREATOR_DEQUEUEIMAGE_CALLBACK_0100
* @tc.name : dequeueImage-callback * @tc.name : dequeueImage-callback
* @tc.desc : 1.create ImageCreator * @tc.desc : 1.create ImageCreator
* 2.call dequeueImage * 2.call dequeueImage
...@@ -420,29 +420,29 @@ describe('ImageCreator', function () { ...@@ -420,29 +420,29 @@ describe('ImageCreator', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Creator_005', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATOR_DEQUEUEIMAGE_CALLBACK_0100', 0, async function (done) {
var creator = image.createImageCreator(WIDTH, HEIGHT, FORMAT, CAPACITY); var creator = image.createImageCreator(WIDTH, HEIGHT, FORMAT, CAPACITY);
if (creator != undefined) { if (creator != undefined) {
creator.dequeueImage((err, img) => { creator.dequeueImage((err, img) => {
if (err) { if (err) {
console.info('Creator_005 err:' + err); console.info('SUB_GRAPHIC_IMAGE_CREATOR_DEQUEUEIMAGE_CALLBACK_0100 err:' + err);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
return; return;
} }
console.info('Creator_005 dequeueImage call back Success'); console.info('SUB_GRAPHIC_IMAGE_CREATOR_DEQUEUEIMAGE_CALLBACK_0100 dequeueImage call back Success');
expect(img != undefined).assertTrue(); expect(img != undefined).assertTrue();
done(); done();
}); });
} else { } else {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('Creator_005 finished'); console.info('SUB_GRAPHIC_IMAGE_CREATOR_DEQUEUEIMAGE_CALLBACK_0100 finished');
done() done()
} }
}) })
/** /**
* @tc.number : Creator_006 * @tc.number : SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_PROMISE_0200
* @tc.name : queueImage-promise * @tc.name : queueImage-promise
* @tc.desc : 1.create ImageCreator * @tc.desc : 1.create ImageCreator
* 2.call dequeueImage * 2.call dequeueImage
...@@ -452,7 +452,7 @@ describe('ImageCreator', function () { ...@@ -452,7 +452,7 @@ describe('ImageCreator', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Creator_006', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_PROMISE_0200', 0, async function (done) {
var creator = image.createImageCreator(WIDTH, HEIGHT, FORMAT, CAPACITY); var creator = image.createImageCreator(WIDTH, HEIGHT, FORMAT, CAPACITY);
if (creator != undefined) { if (creator != undefined) {
creator.dequeueImage().then(img => { creator.dequeueImage().then(img => {
...@@ -480,12 +480,12 @@ describe('ImageCreator', function () { ...@@ -480,12 +480,12 @@ describe('ImageCreator', function () {
console.info("this is img " + img); console.info("this is img " + img);
creator.queueImage(img).then(() => { creator.queueImage(img).then(() => {
console.info('Creator_006 queueImage Success'); console.info('SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_PROMISE_0200 queueImage Success');
var dummy = creator.test; var dummy = creator.test;
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
}).catch(error => { }).catch(error => {
console.info('Creator_006 queueImage error: ' + error); console.info('SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_PROMISE_0200 queueImage error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
}) })
...@@ -493,13 +493,13 @@ describe('ImageCreator', function () { ...@@ -493,13 +493,13 @@ describe('ImageCreator', function () {
}) })
} else { } else {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('Creator_006 createImageCreator failed'); console.info('SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_PROMISE_0200 createImageCreator failed');
done() done()
} }
}) })
/** /**
* @tc.number : Creator_006-1 * @tc.number : SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_PROMISE_0300
* @tc.name : queueImage-promise-1 * @tc.name : queueImage-promise-1
* @tc.desc : 1.create ImageCreator * @tc.desc : 1.create ImageCreator
* 2.call queueImage * 2.call queueImage
...@@ -507,12 +507,12 @@ describe('ImageCreator', function () { ...@@ -507,12 +507,12 @@ describe('ImageCreator', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Creator_006-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_PROMISE_0300', 0, async function (done) {
queueImageError(done, 'Creator_006-1', 1); queueImageError(done, 'SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_PROMISE_0300', 1);
}) })
/** /**
* @tc.number : Creator_006-2 * @tc.number : SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_PROMISE_0400
* @tc.name : queueImage-promise-null * @tc.name : queueImage-promise-null
* @tc.desc : 1.create ImageCreator * @tc.desc : 1.create ImageCreator
* 2.call queueImage * 2.call queueImage
...@@ -520,12 +520,12 @@ describe('ImageCreator', function () { ...@@ -520,12 +520,12 @@ describe('ImageCreator', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Creator_006-2', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_PROMISE_0400', 0, async function (done) {
queueImageError(done, 'Creator_006-2', null); queueImageError(done, 'SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_PROMISE_0400', null);
}) })
/** /**
* @tc.number : Creator_006-3 * @tc.number : SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_PROMISE_0500
* @tc.name : queueImage-promise-'a' * @tc.name : queueImage-promise-'a'
* @tc.desc : 1.create ImageCreator * @tc.desc : 1.create ImageCreator
* 2.call queueImage * 2.call queueImage
...@@ -533,12 +533,12 @@ describe('ImageCreator', function () { ...@@ -533,12 +533,12 @@ describe('ImageCreator', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Creator_006-3', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_PROMISE_0500', 0, async function (done) {
queueImageError(done, 'Creator_006-3', 'a'); queueImageError(done, 'SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_PROMISE_0500', 'a');
}) })
/** /**
* @tc.number : Creator_006-4 * @tc.number : SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_PROMISE_0600
* @tc.name : on-{a : 1} * @tc.name : on-{a : 1}
* @tc.desc : 1.create ImageCreator * @tc.desc : 1.create ImageCreator
* 2.call queueImage * 2.call queueImage
...@@ -546,12 +546,12 @@ describe('ImageCreator', function () { ...@@ -546,12 +546,12 @@ describe('ImageCreator', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Creator_006-4', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_PROMISE_0600', 0, async function (done) {
queueImageError(done, 'Creator_006-4', { a: 1 }); queueImageError(done, 'SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_PROMISE_0600', { a: 1 });
}) })
/** /**
* @tc.number : Creator_007 * @tc.number : SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_CALLBACK_0200
* @tc.name : queueImage-callback * @tc.name : queueImage-callback
* @tc.desc : 1.create ImageCreator * @tc.desc : 1.create ImageCreator
* 2.call dequeueImage * 2.call dequeueImage
...@@ -561,12 +561,12 @@ describe('ImageCreator', function () { ...@@ -561,12 +561,12 @@ describe('ImageCreator', function () {
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Creator_007', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_CALLBACK_0200', 0, async function (done) {
var creator = image.createImageCreator(WIDTH, HEIGHT, FORMAT, CAPACITY); var creator = image.createImageCreator(WIDTH, HEIGHT, FORMAT, CAPACITY);
if (creator != undefined) { if (creator != undefined) {
creator.dequeueImage((err, img) => { creator.dequeueImage((err, img) => {
if (err || img == undefined) { if (err || img == undefined) {
console.log('Creator_007 dequeueImage error:' + err); console.log('SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_CALLBACK_0200 dequeueImage error:' + err);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
return; return;
...@@ -575,7 +575,7 @@ describe('ImageCreator', function () { ...@@ -575,7 +575,7 @@ describe('ImageCreator', function () {
img.getComponent(JPEG, (err, component) => { img.getComponent(JPEG, (err, component) => {
if (err) { if (err) {
expect(false).assertTrue(); expect(false).assertTrue();
console.log('Creator_007 getComponent error:' + err); console.log('SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_CALLBACK_0200 getComponent error:' + err);
done(); done();
return; return;
} }
...@@ -592,11 +592,11 @@ describe('ImageCreator', function () { ...@@ -592,11 +592,11 @@ describe('ImageCreator', function () {
console.info("this is img " + img); console.info("this is img " + img);
creator.queueImage(img, (err) => { creator.queueImage(img, (err) => {
if (err) { if (err) {
console.info('Creator_007 queueImage err: ' + err); console.info('SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_CALLBACK_0200 queueImage err: ' + err);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
console.info('Creator_007 queueImage Success'); console.info('SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_CALLBACK_0200 queueImage Success');
var dummy = creator.test; var dummy = creator.test;
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
...@@ -605,13 +605,13 @@ describe('ImageCreator', function () { ...@@ -605,13 +605,13 @@ describe('ImageCreator', function () {
}) })
} else { } else {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('Creator_007 createImageCreator failed'); console.info('SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_CALLBACK_0200 createImageCreator failed');
done(); done();
} }
}) })
/** /**
* @tc.number : Creator_007-1 * @tc.number : SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_CALLBACK_0300
* @tc.name : queueImage-callback * @tc.name : queueImage-callback
* @tc.desc : 1.create ImageCreator * @tc.desc : 1.create ImageCreator
* 2.call dequeueImage * 2.call dequeueImage
...@@ -621,12 +621,12 @@ describe('ImageCreator', function () { ...@@ -621,12 +621,12 @@ describe('ImageCreator', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Creator_007-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_CALLBACK_0300', 0, async function (done) {
queueImageCbError(done, 'Creator_007-1', 1); queueImageCbError(done, 'SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_CALLBACK_0300', 1);
}) })
/** /**
* @tc.number : Creator_007-2 * @tc.number : SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_CALLBACK_0400
* @tc.name : queueImage-callback * @tc.name : queueImage-callback
* @tc.desc : 1.create ImageCreator * @tc.desc : 1.create ImageCreator
* 2.call dequeueImage * 2.call dequeueImage
...@@ -636,12 +636,12 @@ describe('ImageCreator', function () { ...@@ -636,12 +636,12 @@ describe('ImageCreator', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Creator_007-2', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_CALLBACK_0400', 0, async function (done) {
queueImageCbError(done, 'Creator_007-2', null); queueImageCbError(done, 'SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_CALLBACK_0400', null);
}) })
/** /**
* @tc.number : Creator_007-3 * @tc.number : SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_CALLBACK_0500
* @tc.name : queueImage-callback * @tc.name : queueImage-callback
* @tc.desc : 1.create ImageCreator * @tc.desc : 1.create ImageCreator
* 2.call dequeueImage * 2.call dequeueImage
...@@ -651,12 +651,12 @@ describe('ImageCreator', function () { ...@@ -651,12 +651,12 @@ describe('ImageCreator', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Creator_007-3', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_CALLBACK_0500', 0, async function (done) {
queueImageCbError(done, 'Creator_007-3', 'a'); queueImageCbError(done, 'SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_CALLBACK_0500', 'a');
}) })
/** /**
* @tc.number : Creator_007-4 * @tc.number : SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_CALLBACK_0600
* @tc.name : queueImage-callback * @tc.name : queueImage-callback
* @tc.desc : 1.create ImageCreator * @tc.desc : 1.create ImageCreator
* 2.call dequeueImage * 2.call dequeueImage
...@@ -666,12 +666,12 @@ describe('ImageCreator', function () { ...@@ -666,12 +666,12 @@ describe('ImageCreator', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Creator_007-4', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_CALLBACK_0600', 0, async function (done) {
queueImageCbError(done, 'Creator_007-4', { a: 1 }); queueImageCbError(done, 'SUB_GRAPHIC_IMAGE_CREATOR_QUEUEIMAGE_CALLBACK_0600', { a: 1 });
}) })
/** /**
* @tc.number : Creator_008 * @tc.number : SUB_GRAPHIC_IMAGE_CREATOR_ON_0100
* @tc.name : on * @tc.name : on
* @tc.desc : 1.create ImageCreator * @tc.desc : 1.create ImageCreator
* 2.call on * 2.call on
...@@ -680,7 +680,7 @@ describe('ImageCreator', function () { ...@@ -680,7 +680,7 @@ describe('ImageCreator', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Creator_008', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATOR_ON_0100', 0, async function (done) {
var creator = image.createImageCreator(WIDTH, HEIGHT, FORMAT, CAPACITY) var creator = image.createImageCreator(WIDTH, HEIGHT, FORMAT, CAPACITY)
expect(creator != undefined).assertTrue(); expect(creator != undefined).assertTrue();
if (creator == undefined) { if (creator == undefined) {
...@@ -689,25 +689,25 @@ describe('ImageCreator', function () { ...@@ -689,25 +689,25 @@ describe('ImageCreator', function () {
} }
creator.on('imageRelease', (err) => { creator.on('imageRelease', (err) => {
if (err) { if (err) {
console.info('Creator_008 on release faild' + err); console.info('SUB_GRAPHIC_IMAGE_CREATOR_ON_0100 on release faild' + err);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
return; return;
} }
console.info('Creator_008 on call back IN'); console.info('SUB_GRAPHIC_IMAGE_CREATOR_ON_0100 on call back IN');
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
}) })
creator.dequeueImage((err, img) => { creator.dequeueImage((err, img) => {
if (err || img == undefined) { if (err || img == undefined) {
console.info('Creator_008 dequeueImage fail: ' + err); console.info('SUB_GRAPHIC_IMAGE_CREATOR_ON_0100 dequeueImage fail: ' + err);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
return; return;
} }
img.getComponent(JPEG, (err, component) => { img.getComponent(JPEG, (err, component) => {
if (err || component == undefined) { if (err || component == undefined) {
console.info('Creator_008 getComponent err:' + err); console.info('SUB_GRAPHIC_IMAGE_CREATOR_ON_0100 getComponent err:' + err);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
return; return;
...@@ -723,12 +723,12 @@ describe('ImageCreator', function () { ...@@ -723,12 +723,12 @@ describe('ImageCreator', function () {
} }
creator.queueImage(img, (err) => { creator.queueImage(img, (err) => {
if (err) { if (err) {
console.info('Creator_008 queueImage failerr: ' + err); console.info('SUB_GRAPHIC_IMAGE_CREATOR_ON_0100 queueImage failerr: ' + err);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
return; return;
} }
console.info('Creator_008 queueImage Success'); console.info('SUB_GRAPHIC_IMAGE_CREATOR_ON_0100 queueImage Success');
expect(true).assertTrue(); expect(true).assertTrue();
var dummy = creator.test; var dummy = creator.test;
}) })
...@@ -737,7 +737,7 @@ describe('ImageCreator', function () { ...@@ -737,7 +737,7 @@ describe('ImageCreator', function () {
}) })
/** /**
* @tc.number : Creator_008-1 * @tc.number : SUB_GRAPHIC_IMAGE_CREATOR_ON_0200
* @tc.name : on-1 * @tc.name : on-1
* @tc.desc : 1.create ImageCreator * @tc.desc : 1.create ImageCreator
* 2.call on * 2.call on
...@@ -745,12 +745,12 @@ describe('ImageCreator', function () { ...@@ -745,12 +745,12 @@ describe('ImageCreator', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Creator_008-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATOR_ON_0200', 0, async function (done) {
onErr(done, 'Creator_008-1', 1); onErr(done, 'SUB_GRAPHIC_IMAGE_CREATOR_ON_0200', 1);
}) })
/** /**
* @tc.number : Creator_008-2 * @tc.number : SUB_GRAPHIC_IMAGE_CREATOR_ON_0300
* @tc.name : on-null * @tc.name : on-null
* @tc.desc : 1.create ImageCreator * @tc.desc : 1.create ImageCreator
* 2.call on * 2.call on
...@@ -758,12 +758,12 @@ describe('ImageCreator', function () { ...@@ -758,12 +758,12 @@ describe('ImageCreator', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Creator_008-2', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATOR_ON_0300', 0, async function (done) {
onErr(done, 'Creator_008-2', null); onErr(done, 'SUB_GRAPHIC_IMAGE_CREATOR_ON_0300', null);
}) })
/** /**
* @tc.number : Creator_008-3 * @tc.number : SUB_GRAPHIC_IMAGE_CREATOR_ON_0400
* @tc.name : on-{a : 1} * @tc.name : on-{a : 1}
* @tc.desc : 1.create ImageCreator * @tc.desc : 1.create ImageCreator
* 2.call on * 2.call on
...@@ -771,12 +771,12 @@ describe('ImageCreator', function () { ...@@ -771,12 +771,12 @@ describe('ImageCreator', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Creator_008-3', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATOR_ON_0400', 0, async function (done) {
onErr(done, 'Creator_008-3', { a: 1 }); onErr(done, 'SUB_GRAPHIC_IMAGE_CREATOR_ON_0400', { a: 1 });
}) })
/** /**
* @tc.number : Creator_008-4 * @tc.number : SUB_GRAPHIC_IMAGE_CREATOR_ON_0500
* @tc.name : on-'a' * @tc.name : on-'a'
* @tc.desc : 1.create ImageCreator * @tc.desc : 1.create ImageCreator
* 2.call on * 2.call on
...@@ -784,7 +784,7 @@ describe('ImageCreator', function () { ...@@ -784,7 +784,7 @@ describe('ImageCreator', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Creator_008-4', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_CREATOR_ON_0500', 0, async function (done) {
onErr(done, 'Creator_008-4', 'a'); onErr(done, 'SUB_GRAPHIC_IMAGE_CREATOR_ON_0500', 'a');
}) })
}) })
\ No newline at end of file
...@@ -66,7 +66,7 @@ export default function imageDecodeOptions() { ...@@ -66,7 +66,7 @@ export default function imageDecodeOptions() {
/** /**
* @tc.number : TC_050 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_JPG_0100
* @tc.name : createPixelMap(decodingOptions)-pixelformat:RGBA_8888-jpg * @tc.name : createPixelMap(decodingOptions)-pixelformat:RGBA_8888-jpg
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -76,12 +76,12 @@ export default function imageDecodeOptions() { ...@@ -76,12 +76,12 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_050', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_JPG_0100', 0, async function (done) {
try { try {
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_050 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_JPG_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -96,26 +96,26 @@ export default function imageDecodeOptions() { ...@@ -96,26 +96,26 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_050 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_JPG_0100 createPixelMap error ' + JSON.stringify(err));
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_050 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_JPG_0100 success ');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
} }
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_050 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_JPG_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_050-1 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_JPG_0200
* @tc.name : createPixelMap(decodingOptions)-pixelformat:RGB_565-jpg * @tc.name : createPixelMap(decodingOptions)-pixelformat:RGB_565-jpg
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -125,12 +125,12 @@ export default function imageDecodeOptions() { ...@@ -125,12 +125,12 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_050-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_JPG_0200', 0, async function (done) {
try { try {
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_050-1 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_JPG_0200 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -145,26 +145,26 @@ export default function imageDecodeOptions() { ...@@ -145,26 +145,26 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_050-1 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_JPG_0200 createPixelMap error ' + JSON.stringify(err));
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_050-1 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_JPG_0200 success ');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
} }
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_050-1 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_JPG_0200 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_050-2 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_JPG_0300
* @tc.name : createPixelMap(decodingOptions)-pixelformat:unknown-jpg * @tc.name : createPixelMap(decodingOptions)-pixelformat:unknown-jpg
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -174,12 +174,12 @@ export default function imageDecodeOptions() { ...@@ -174,12 +174,12 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_050-2', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_JPG_0300', 0, async function (done) {
try { try {
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_050-2 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_JPG_0300 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -194,26 +194,26 @@ export default function imageDecodeOptions() { ...@@ -194,26 +194,26 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_050-2 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_JPG_0300 createPixelMap error ' + JSON.stringify(err));
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_050-2 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_JPG_0300 success ');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
} }
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_050-2 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_JPG_0300 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_050-3 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0100
* @tc.name : createPixelMap(decodingOptions: index 1})-jpg * @tc.name : createPixelMap(decodingOptions: index 1})-jpg
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -223,12 +223,12 @@ export default function imageDecodeOptions() { ...@@ -223,12 +223,12 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_050-3', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0100', 0, async function (done) {
try { try {
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_050-3 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -243,26 +243,26 @@ export default function imageDecodeOptions() { ...@@ -243,26 +243,26 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_050-3 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0100 success ');
console.info('TC_050-3 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0100 createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_050-3 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0100 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_050-3 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_050-4 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0200
* @tc.name : createPixelMap(decodingOptions:index -1})-jpg * @tc.name : createPixelMap(decodingOptions:index -1})-jpg
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -272,12 +272,12 @@ export default function imageDecodeOptions() { ...@@ -272,12 +272,12 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_050-4', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0200', 0, async function (done) {
try { try {
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_050-4 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0200 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -292,26 +292,26 @@ export default function imageDecodeOptions() { ...@@ -292,26 +292,26 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_050-4 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0200 success ');
console.info('TC_050-4 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0200 createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_050-4 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0200 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_050-4 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0200 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_050-5 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_SAMPLESIZE_0100
* @tc.name : createPixelMap(decodingOptions:sampleSize -1})-jpg * @tc.name : createPixelMap(decodingOptions:sampleSize -1})-jpg
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -321,12 +321,12 @@ export default function imageDecodeOptions() { ...@@ -321,12 +321,12 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_050-5', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_SAMPLESIZE_0100', 0, async function (done) {
try { try {
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_050-5 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_SAMPLESIZE_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -341,26 +341,26 @@ export default function imageDecodeOptions() { ...@@ -341,26 +341,26 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_050-5 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_SAMPLESIZE_0100 success ');
console.info('TC_050-5 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_SAMPLESIZE_0100 createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_050-5 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_SAMPLESIZE_0100 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_050-5 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_SAMPLESIZE_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_050-6 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0100
* @tc.name : createPixelMap(decodingOptions:rotate -10})-jpg * @tc.name : createPixelMap(decodingOptions:rotate -10})-jpg
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -370,12 +370,12 @@ export default function imageDecodeOptions() { ...@@ -370,12 +370,12 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_050-6', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0100', 0, async function (done) {
try { try {
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_050-6 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -390,26 +390,26 @@ export default function imageDecodeOptions() { ...@@ -390,26 +390,26 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_050-6 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0100 success ');
console.info('TC_050-6 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0100 createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_050-6 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0100 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_050-6 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_050-7 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_UNSUPPORTED_PIXELFORMAT_0100
* @tc.name : createPixelMap(decodingOptions:unsupported pixelformat)-jpg * @tc.name : createPixelMap(decodingOptions:unsupported pixelformat)-jpg
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -419,12 +419,12 @@ export default function imageDecodeOptions() { ...@@ -419,12 +419,12 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_050-7', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_UNSUPPORTED_PIXELFORMAT_0100', 0, async function (done) {
try { try {
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_050-7 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_UNSUPPORTED_PIXELFORMAT_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -439,26 +439,26 @@ export default function imageDecodeOptions() { ...@@ -439,26 +439,26 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_050-7 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_UNSUPPORTED_PIXELFORMAT_0100 success ');
console.info('TC_050-7 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_UNSUPPORTED_PIXELFORMAT_0100 createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_050-7 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_UNSUPPORTED_PIXELFORMAT_0100 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_050-7 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_UNSUPPORTED_PIXELFORMAT_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_050-8 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_EDITABLE_FALSE_0100
* @tc.name : createPixelMap(decodingOptions:editable false})-jpg * @tc.name : createPixelMap(decodingOptions:editable false})-jpg
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -468,12 +468,12 @@ export default function imageDecodeOptions() { ...@@ -468,12 +468,12 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_050-8', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_EDITABLE_FALSE_0100', 0, async function (done) {
try { try {
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_050-8 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_EDITABLE_FALSE_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -488,26 +488,26 @@ export default function imageDecodeOptions() { ...@@ -488,26 +488,26 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_050-8 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_EDITABLE_FALSE_0100 createPixelMap error ' + JSON.stringify(err));
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_050-8 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_EDITABLE_FALSE_0100 success ');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
} }
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_050-8 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_EDITABLE_FALSE_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_050-9 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0100
* @tc.name : createPixelMap(decodingOptions:desiredSize>imagesize)-jpg * @tc.name : createPixelMap(decodingOptions:desiredSize>imagesize)-jpg
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -517,12 +517,12 @@ export default function imageDecodeOptions() { ...@@ -517,12 +517,12 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_050-9', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0100', 0, async function (done) {
try { try {
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_050-9 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -537,26 +537,26 @@ export default function imageDecodeOptions() { ...@@ -537,26 +537,26 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_050-9 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0100 createPixelMap error ' + JSON.stringify(err));
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_050-9 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0100 success ');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
} }
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_050-9 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_050-10 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0200
* @tc.name : createPixelMap(decodingOptions:desiredRegion>imagesize)-jpg * @tc.name : createPixelMap(decodingOptions:desiredRegion>imagesize)-jpg
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -566,12 +566,12 @@ export default function imageDecodeOptions() { ...@@ -566,12 +566,12 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_050-10', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0200', 0, async function (done) {
try { try {
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_050-10 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0200 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -586,7 +586,7 @@ export default function imageDecodeOptions() { ...@@ -586,7 +586,7 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_050-10 createPixelMap err ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0200 createPixelMap err ' + JSON.stringify(err));
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -594,25 +594,25 @@ export default function imageDecodeOptions() { ...@@ -594,25 +594,25 @@ export default function imageDecodeOptions() {
pixelmap.getImageInfo().then((imageInfo) => { pixelmap.getImageInfo().then((imageInfo) => {
expect(imageInfo.size.height == 2).assertTrue(); expect(imageInfo.size.height == 2).assertTrue();
expect(imageInfo.size.width == 1).assertTrue(); expect(imageInfo.size.width == 1).assertTrue();
console.info('TC_050-10 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0200 success ');
console.info("imageInfo height :" + imageInfo.size.height ); console.info("imageInfo height :" + imageInfo.size.height );
console.info("imageInfo width : " + imageInfo.size.width); console.info("imageInfo width : " + imageInfo.size.width);
done(); done();
}).catch((err) => { }).catch((err) => {
console.info('TC_050-10 getimageInfo err ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0200 getimageInfo err ' + JSON.stringify(err));
}) })
} }
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_050-10 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0200 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_050-11 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0100
* @tc.name : createPixelMapdecodingOptions:x -1 y -1)-jpg * @tc.name : createPixelMapdecodingOptions:x -1 y -1)-jpg
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -622,12 +622,12 @@ export default function imageDecodeOptions() { ...@@ -622,12 +622,12 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_050-11', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0100', 0, async function (done) {
try { try {
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_050-11 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -642,26 +642,26 @@ export default function imageDecodeOptions() { ...@@ -642,26 +642,26 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_050-11 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0100 success ');
console.info('TC_050-11 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0100 createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_050-11 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0100 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_050-11 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_050-12 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0200
* @tc.name : createPixelMap(decodingOptions:x > image.height y > image.width)-jpg * @tc.name : createPixelMap(decodingOptions:x > image.height y > image.width)-jpg
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -671,12 +671,12 @@ export default function imageDecodeOptions() { ...@@ -671,12 +671,12 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_050-12', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0200', 0, async function (done) {
try { try {
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_050-12 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0200 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -691,26 +691,26 @@ export default function imageDecodeOptions() { ...@@ -691,26 +691,26 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_050-12 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0200 success ');
console.info('TC_050-12 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0200 createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_050-12 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0200 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_050-12 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0200 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_050-13 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0200
* @tc.name : createPixelMap(decodingOptions:rotate>360)-jpg * @tc.name : createPixelMap(decodingOptions:rotate>360)-jpg
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -720,12 +720,12 @@ export default function imageDecodeOptions() { ...@@ -720,12 +720,12 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_050-13', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0200', 0, async function (done) {
try { try {
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_050-13 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0200 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -740,26 +740,26 @@ export default function imageDecodeOptions() { ...@@ -740,26 +740,26 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_050-13 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0200 success ');
console.info('TC_050-13 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0200 createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_050-13 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0200 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_050-13 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0200 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_050-14 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PROMISE_0100
* @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
...@@ -769,35 +769,35 @@ export default function imageDecodeOptions() { ...@@ -769,35 +769,35 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_050-14', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PROMISE_0100', 0, async function (done) {
try { try {
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_050-14 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PROMISE_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.createPixelMap().then(pixelmap => { imageSourceApi.createPixelMap().then(pixelmap => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_050-14 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PROMISE_0100 success ');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
}).catch(error => { }).catch(error => {
console.log('TC_050-14 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PROMISE_0100 error: ' + error);
expect().assertFail(); expect().assertFail();
done(); done();
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_050-14 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PROMISE_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_050-15 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_CALLBACK_0100
* @tc.name : createPixelMap-callback-jpg * @tc.name : createPixelMap-callback-jpg
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -807,31 +807,31 @@ export default function imageDecodeOptions() { ...@@ -807,31 +807,31 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_050-15', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_CALLBACK_0100', 0, async function (done) {
try { try {
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_050-15 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_CALLBACK_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.createPixelMap((err, pixelmap) => { imageSourceApi.createPixelMap((err, pixelmap) => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_050-15 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_CALLBACK_0100 success ');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
}) })
} }
} catch (error) { } catch (error) {
console.info('TC_050-15 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_CALLBACK_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_067 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0100
* @tc.name : createPixelMap(decodingOptions)-pixelformat:RGBA_8888-gif * @tc.name : createPixelMap(decodingOptions)-pixelformat:RGBA_8888-gif
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -841,11 +841,11 @@ export default function imageDecodeOptions() { ...@@ -841,11 +841,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_067', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0100', 0, async function (done) {
await getFd('moving_test.gif'); await getFd('moving_test.gif');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_067 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -860,12 +860,12 @@ export default function imageDecodeOptions() { ...@@ -860,12 +860,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_067 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0100 createPixelMap error ' + JSON.stringify(err));
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_067 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0100 success ');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
} }
...@@ -874,7 +874,7 @@ export default function imageDecodeOptions() { ...@@ -874,7 +874,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_067-1 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0200
* @tc.name : createPixelMap(decodingOptions)-pixelformat:RGBA_565-gif * @tc.name : createPixelMap(decodingOptions)-pixelformat:RGBA_565-gif
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -884,11 +884,11 @@ export default function imageDecodeOptions() { ...@@ -884,11 +884,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_067-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0200', 0, async function (done) {
await getFd('moving_test.gif'); await getFd('moving_test.gif');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_067-1 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0200 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -903,12 +903,12 @@ export default function imageDecodeOptions() { ...@@ -903,12 +903,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_067-1 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0200 createPixelMap error ' + JSON.stringify(err));
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_067-1 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0200 success ');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
} }
...@@ -917,7 +917,7 @@ export default function imageDecodeOptions() { ...@@ -917,7 +917,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_067-2 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0300
* @tc.name : createPixelMap(decodingOptions)-pixelformat:unkonwn-gif * @tc.name : createPixelMap(decodingOptions)-pixelformat:unkonwn-gif
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -927,11 +927,11 @@ export default function imageDecodeOptions() { ...@@ -927,11 +927,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_067-2', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0300', 0, async function (done) {
await getFd('moving_test.gif'); await getFd('moving_test.gif');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_067-2 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0300 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -946,12 +946,12 @@ export default function imageDecodeOptions() { ...@@ -946,12 +946,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_067-2 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0300 createPixelMap error ' + JSON.stringify(err));
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_067-2 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0300 success ');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
} }
...@@ -960,7 +960,7 @@ export default function imageDecodeOptions() { ...@@ -960,7 +960,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_067-3 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0300
* @tc.name : createPixelMap(decodingOptions:index 1})-gif * @tc.name : createPixelMap(decodingOptions:index 1})-gif
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -970,11 +970,11 @@ export default function imageDecodeOptions() { ...@@ -970,11 +970,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_067-3', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0300', 0, async function (done) {
await getFd('moving_test.gif'); await getFd('moving_test.gif');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_067-3 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0300 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -989,12 +989,12 @@ export default function imageDecodeOptions() { ...@@ -989,12 +989,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_067-3 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0300 createPixelMap error ' + JSON.stringify(err));
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_067-3 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0300 success ');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
} }
...@@ -1003,7 +1003,7 @@ export default function imageDecodeOptions() { ...@@ -1003,7 +1003,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_067-4 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0400
* @tc.name : createPixelMap(decodingOptions:index -1})-gif * @tc.name : createPixelMap(decodingOptions:index -1})-gif
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -1013,11 +1013,11 @@ export default function imageDecodeOptions() { ...@@ -1013,11 +1013,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_067-4', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0400', 0, async function (done) {
await getFd('moving_test.gif'); await getFd('moving_test.gif');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_067-4 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0400 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -1032,12 +1032,12 @@ export default function imageDecodeOptions() { ...@@ -1032,12 +1032,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_067-4 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0400 success ');
console.info('TC_067-4 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0400 createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_067-4 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0400 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -1046,7 +1046,7 @@ export default function imageDecodeOptions() { ...@@ -1046,7 +1046,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_067-5 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_SAMPLESIZE_0200
* @tc.name : createPixelMap(decodingOptions:sampleSize -1})-gif * @tc.name : createPixelMap(decodingOptions:sampleSize -1})-gif
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -1056,11 +1056,11 @@ export default function imageDecodeOptions() { ...@@ -1056,11 +1056,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_067-5', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_SAMPLESIZE_0200', 0, async function (done) {
await getFd('moving_test.gif'); await getFd('moving_test.gif');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_067-5 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_SAMPLESIZE_0200 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -1075,12 +1075,12 @@ export default function imageDecodeOptions() { ...@@ -1075,12 +1075,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_067-5 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_SAMPLESIZE_0200 success ');
console.info('TC_067-5 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_SAMPLESIZE_0200 createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_067-5 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_SAMPLESIZE_0200 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -1089,7 +1089,7 @@ export default function imageDecodeOptions() { ...@@ -1089,7 +1089,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_067-6 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0300
* @tc.name : createPixelMap(decodingOptions:rotate -10})-gif * @tc.name : createPixelMap(decodingOptions:rotate -10})-gif
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -1099,11 +1099,11 @@ export default function imageDecodeOptions() { ...@@ -1099,11 +1099,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_067-6', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0300', 0, async function (done) {
await getFd('moving_test.gif'); await getFd('moving_test.gif');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_067-6 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0300 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -1118,12 +1118,12 @@ export default function imageDecodeOptions() { ...@@ -1118,12 +1118,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_067-6 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0300 success ');
console.info('TC_067-6 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0300 createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_067-6 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0300 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -1132,7 +1132,7 @@ export default function imageDecodeOptions() { ...@@ -1132,7 +1132,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_067-7 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_UNSUPPORTED_PIXELFORMAT_0200
* @tc.name : createPixelMap(decodingOptions:unsupported pixelformat)-gif * @tc.name : createPixelMap(decodingOptions:unsupported pixelformat)-gif
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -1142,11 +1142,11 @@ export default function imageDecodeOptions() { ...@@ -1142,11 +1142,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_067-7', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_UNSUPPORTED_PIXELFORMAT_0200', 0, async function (done) {
await getFd('moving_test.gif'); await getFd('moving_test.gif');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_067-7 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_UNSUPPORTED_PIXELFORMAT_0200 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -1161,12 +1161,12 @@ export default function imageDecodeOptions() { ...@@ -1161,12 +1161,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_067-7 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_UNSUPPORTED_PIXELFORMAT_0200 success ');
console.info('TC_067-7 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_UNSUPPORTED_PIXELFORMAT_0200 createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_067-7 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_UNSUPPORTED_PIXELFORMAT_0200 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -1175,7 +1175,7 @@ export default function imageDecodeOptions() { ...@@ -1175,7 +1175,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_067-8 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_EDITABLE_FALSE_0200
* @tc.name : createPixelMap(decodingOptions:editable false})-gif * @tc.name : createPixelMap(decodingOptions:editable false})-gif
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -1185,11 +1185,11 @@ export default function imageDecodeOptions() { ...@@ -1185,11 +1185,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_067-8', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_EDITABLE_FALSE_0200', 0, async function (done) {
await getFd('moving_test.gif'); await getFd('moving_test.gif');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_067-8 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_EDITABLE_FALSE_0200 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -1204,12 +1204,12 @@ export default function imageDecodeOptions() { ...@@ -1204,12 +1204,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_067-8 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_EDITABLE_FALSE_0200 createPixelMap error ' + JSON.stringify(err));
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_067-8 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_EDITABLE_FALSE_0200 success ');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
} }
...@@ -1218,7 +1218,7 @@ export default function imageDecodeOptions() { ...@@ -1218,7 +1218,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_067-9 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0300
* @tc.name : createPixelMap(decodingOptions:desiredSize>imagesize)-gif * @tc.name : createPixelMap(decodingOptions:desiredSize>imagesize)-gif
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -1228,11 +1228,11 @@ export default function imageDecodeOptions() { ...@@ -1228,11 +1228,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_067-9', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0300', 0, async function (done) {
await getFd('moving_test.gif'); await getFd('moving_test.gif');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_067-9 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0300 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -1247,12 +1247,12 @@ export default function imageDecodeOptions() { ...@@ -1247,12 +1247,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_067-9 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0300 createPixelMap error ' + JSON.stringify(err));
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_067-9 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0300 success ');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
} }
...@@ -1261,7 +1261,7 @@ export default function imageDecodeOptions() { ...@@ -1261,7 +1261,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_067-10 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0400
* @tc.name : createPixelMap(decodingOptions:desiredRegion>imagesize)-gif * @tc.name : createPixelMap(decodingOptions:desiredRegion>imagesize)-gif
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -1271,11 +1271,11 @@ export default function imageDecodeOptions() { ...@@ -1271,11 +1271,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_067-10', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0400', 0, async function (done) {
await getFd('moving_test.gif'); await getFd('moving_test.gif');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info(' TC_067-10 create image source failed'); console.info(' SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0400 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -1290,7 +1290,7 @@ export default function imageDecodeOptions() { ...@@ -1290,7 +1290,7 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_067-10 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0400 createPixelMap error ' + JSON.stringify(err));
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -1298,12 +1298,12 @@ export default function imageDecodeOptions() { ...@@ -1298,12 +1298,12 @@ export default function imageDecodeOptions() {
pixelmap.getImageInfo().then((imageInfo) => { pixelmap.getImageInfo().then((imageInfo) => {
expect(imageInfo.size.height == 2).assertTrue(); expect(imageInfo.size.height == 2).assertTrue();
expect(imageInfo.size.width == 1).assertTrue(); expect(imageInfo.size.width == 1).assertTrue();
console.info('TC_067-10 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0400 success ');
console.info("imageInfo height :" + imageInfo.size.height); console.info("imageInfo height :" + imageInfo.size.height);
console.info("imageInfo width : " + imageInfo.size.width); console.info("imageInfo width : " + imageInfo.size.width);
done(); done();
}).catch((err) => { }).catch((err) => {
console.info('TC_067-10 getimageInfo err ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0400 getimageInfo err ' + JSON.stringify(err));
}) })
} }
}) })
...@@ -1311,7 +1311,7 @@ export default function imageDecodeOptions() { ...@@ -1311,7 +1311,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_067-11 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0300
* @tc.name : createPixelMapdecodingOptions:x -1 y -1)-gif * @tc.name : createPixelMapdecodingOptions:x -1 y -1)-gif
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -1321,11 +1321,11 @@ export default function imageDecodeOptions() { ...@@ -1321,11 +1321,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_067-11', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0300', 0, async function (done) {
await getFd('moving_test.gif'); await getFd('moving_test.gif');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_067-11 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0300 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -1340,12 +1340,12 @@ export default function imageDecodeOptions() { ...@@ -1340,12 +1340,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_067-11 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0300 success ');
console.info('TC_067-11createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0300createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_067-11 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0300 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -1354,7 +1354,7 @@ export default function imageDecodeOptions() { ...@@ -1354,7 +1354,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_067-12 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0400
* @tc.name : createPixelMap(decodingOptions:x > image.height y > image.width)-gif * @tc.name : createPixelMap(decodingOptions:x > image.height y > image.width)-gif
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -1364,11 +1364,11 @@ export default function imageDecodeOptions() { ...@@ -1364,11 +1364,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_067-12', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0400', 0, async function (done) {
await getFd('moving_test.gif'); await getFd('moving_test.gif');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_067-12 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0400 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -1383,12 +1383,12 @@ export default function imageDecodeOptions() { ...@@ -1383,12 +1383,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_067-12 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0400 success ');
console.info('TC_067-12 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0400 createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_067-12 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0400 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -1397,7 +1397,7 @@ export default function imageDecodeOptions() { ...@@ -1397,7 +1397,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_067-13 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0400
* @tc.name : createPixelMap(decodingOptions:rotate>360)-gif * @tc.name : createPixelMap(decodingOptions:rotate>360)-gif
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -1407,11 +1407,11 @@ export default function imageDecodeOptions() { ...@@ -1407,11 +1407,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_067-13', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0400', 0, async function (done) {
await getFd('moving_test.gif'); await getFd('moving_test.gif');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_067-13 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0400 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -1426,12 +1426,12 @@ export default function imageDecodeOptions() { ...@@ -1426,12 +1426,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_067-13 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0400 success ');
console.info('TC_067-13 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0400 createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_067-13 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0400 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -1440,7 +1440,7 @@ export default function imageDecodeOptions() { ...@@ -1440,7 +1440,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_067-14 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PROMISE_0200
* @tc.name : createPixelMap-promise-gif * @tc.name : createPixelMap-promise-gif
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -1450,21 +1450,21 @@ export default function imageDecodeOptions() { ...@@ -1450,21 +1450,21 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_067-14', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PROMISE_0200', 0, async function (done) {
await getFd('moving_test.gif'); await getFd('moving_test.gif');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_067-14 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PROMISE_0200 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.createPixelMap().then(pixelmap => { imageSourceApi.createPixelMap().then(pixelmap => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_067-14 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PROMISE_0200 success ');
expect(pixelmap !== undefined).assertTrue(); expect(pixelmap !== undefined).assertTrue();
done(); done();
}).catch(error => { }).catch(error => {
console.log('TC_067-14 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PROMISE_0200 error: ' + error);
expect().assertFail(); expect().assertFail();
done(); done();
}) })
...@@ -1472,8 +1472,8 @@ export default function imageDecodeOptions() { ...@@ -1472,8 +1472,8 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_067-15 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_CALLBACK_0200
* @tc.name : createPixelMap-pcallback-gif * @tc.name : createPixelMap-callback-gif
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
* 3.create PixelMap * 3.create PixelMap
...@@ -1482,17 +1482,17 @@ export default function imageDecodeOptions() { ...@@ -1482,17 +1482,17 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_067-15', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_CALLBACK_0200', 0, async function (done) {
await getFd('moving_test.gif'); await getFd('moving_test.gif');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_067-15 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_CALLBACK_0200 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.createPixelMap((err, pixelmap) => { imageSourceApi.createPixelMap((err, pixelmap) => {
console.info('TC_067-15 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_CALLBACK_0200 success ');
expect(pixelmap !== undefined).assertTrue(); expect(pixelmap !== undefined).assertTrue();
done(); done();
}) })
...@@ -1500,7 +1500,7 @@ export default function imageDecodeOptions() { ...@@ -1500,7 +1500,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_068 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0400
* @tc.name : createPixelMap(decodingOptions)-pixelformat:RGBA_8888-bmp * @tc.name : createPixelMap(decodingOptions)-pixelformat:RGBA_8888-bmp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -1510,11 +1510,11 @@ export default function imageDecodeOptions() { ...@@ -1510,11 +1510,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0400', 0, async function (done) {
await getFd('test.bmp'); await getFd('test.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('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0400 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -1529,12 +1529,12 @@ export default function imageDecodeOptions() { ...@@ -1529,12 +1529,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_068 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0400 createPixelMap error ' + JSON.stringify(err));
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_068 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0400 success ');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
} }
...@@ -1543,7 +1543,7 @@ export default function imageDecodeOptions() { ...@@ -1543,7 +1543,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_068-1 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0500
* @tc.name : createPixelMap(decodingOptions)-pixelformat:RGB_565-bmp * @tc.name : createPixelMap(decodingOptions)-pixelformat:RGB_565-bmp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -1553,11 +1553,11 @@ export default function imageDecodeOptions() { ...@@ -1553,11 +1553,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0500', 0, async function (done) {
await getFd('test.bmp'); await getFd('test.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('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0500 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -1572,12 +1572,12 @@ export default function imageDecodeOptions() { ...@@ -1572,12 +1572,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_068-1 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0500 createPixelMap error ' + JSON.stringify(err));
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_068-1 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0500 success ');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
} }
...@@ -1586,7 +1586,7 @@ export default function imageDecodeOptions() { ...@@ -1586,7 +1586,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_068-2 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0600
* @tc.name : createPixelMap(decodingOptions)-pixelformat:unkonwn-bmp * @tc.name : createPixelMap(decodingOptions)-pixelformat:unkonwn-bmp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -1596,11 +1596,11 @@ export default function imageDecodeOptions() { ...@@ -1596,11 +1596,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068-2', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0600', 0, async function (done) {
await getFd('test.bmp'); await getFd('test.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('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0600 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -1615,12 +1615,12 @@ export default function imageDecodeOptions() { ...@@ -1615,12 +1615,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_068-2 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0600 createPixelMap error ' + JSON.stringify(err));
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_068-2 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0600 success ');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
} }
...@@ -1629,7 +1629,7 @@ export default function imageDecodeOptions() { ...@@ -1629,7 +1629,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_068-3 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0500
* @tc.name : createPixelMap(decodingOptions: index 1})-bmp * @tc.name : createPixelMap(decodingOptions: index 1})-bmp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -1639,11 +1639,11 @@ export default function imageDecodeOptions() { ...@@ -1639,11 +1639,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068-3', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0500', 0, async function (done) {
await getFd('test.bmp'); await getFd('test.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('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0500 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -1658,12 +1658,12 @@ export default function imageDecodeOptions() { ...@@ -1658,12 +1658,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_068-3 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0500 success ');
console.info('TC_068-3 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0500 createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_068-3 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0500 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -1672,7 +1672,7 @@ export default function imageDecodeOptions() { ...@@ -1672,7 +1672,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_068-4 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0600
* @tc.name : createPixelMap(decodingOptions:index -1})-bmp * @tc.name : createPixelMap(decodingOptions:index -1})-bmp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -1682,11 +1682,11 @@ export default function imageDecodeOptions() { ...@@ -1682,11 +1682,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068-4', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0600', 0, async function (done) {
await getFd('test.bmp'); await getFd('test.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('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0600 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -1701,12 +1701,12 @@ export default function imageDecodeOptions() { ...@@ -1701,12 +1701,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_068-4 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0600 success ');
console.info('TC_068-4 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0600 createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_068-4 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0600 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -1715,7 +1715,7 @@ export default function imageDecodeOptions() { ...@@ -1715,7 +1715,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_068-5 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_SAMPLESIZE_0300
* @tc.name : createPixelMap(decodingOptions:sampleSize -1})-bmp * @tc.name : createPixelMap(decodingOptions:sampleSize -1})-bmp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -1725,11 +1725,11 @@ export default function imageDecodeOptions() { ...@@ -1725,11 +1725,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068-5', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_SAMPLESIZE_0300', 0, async function (done) {
await getFd('test.bmp'); await getFd('test.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('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_SAMPLESIZE_0300 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -1744,12 +1744,12 @@ export default function imageDecodeOptions() { ...@@ -1744,12 +1744,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_068-5 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_SAMPLESIZE_0300 success ');
console.info('TC_068-5 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_SAMPLESIZE_0300 createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_068-5 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_SAMPLESIZE_0300 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -1758,7 +1758,7 @@ export default function imageDecodeOptions() { ...@@ -1758,7 +1758,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_068-6 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0500
* @tc.name : createPixelMap(decodingOptions:rotate -10})-bmp * @tc.name : createPixelMap(decodingOptions:rotate -10})-bmp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -1768,11 +1768,11 @@ export default function imageDecodeOptions() { ...@@ -1768,11 +1768,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068-6', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0500', 0, async function (done) {
await getFd('test.bmp'); await getFd('test.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('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0500 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -1787,12 +1787,12 @@ export default function imageDecodeOptions() { ...@@ -1787,12 +1787,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_068-6 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0500 success ');
console.info('TC_068-6 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0500 createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_068-6 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0500 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -1801,7 +1801,7 @@ export default function imageDecodeOptions() { ...@@ -1801,7 +1801,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_068-7 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_UNSUPPORTED_PIXELFORMAT_0300
* @tc.name : createPixelMap(decodingOptions:unsupported pixelformat)-bmp * @tc.name : createPixelMap(decodingOptions:unsupported pixelformat)-bmp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -1811,11 +1811,11 @@ export default function imageDecodeOptions() { ...@@ -1811,11 +1811,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068-7', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_UNSUPPORTED_PIXELFORMAT_0300', 0, async function (done) {
await getFd('test.bmp'); await getFd('test.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('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_UNSUPPORTED_PIXELFORMAT_0300 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -1830,12 +1830,12 @@ export default function imageDecodeOptions() { ...@@ -1830,12 +1830,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_068-7 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_UNSUPPORTED_PIXELFORMAT_0300 success ');
console.info('TC_068-7 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_UNSUPPORTED_PIXELFORMAT_0300 createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_068-7 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_UNSUPPORTED_PIXELFORMAT_0300 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -1844,7 +1844,7 @@ export default function imageDecodeOptions() { ...@@ -1844,7 +1844,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_068-8 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_EDITABLE_FALSE_0300
* @tc.name : createPixelMap(decodingOptions:editable false})-bmp * @tc.name : createPixelMap(decodingOptions:editable false})-bmp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -1854,11 +1854,11 @@ export default function imageDecodeOptions() { ...@@ -1854,11 +1854,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068-8', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_EDITABLE_FALSE_0300', 0, async function (done) {
await getFd('test.bmp'); await getFd('test.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('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_EDITABLE_FALSE_0300 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -1873,12 +1873,12 @@ export default function imageDecodeOptions() { ...@@ -1873,12 +1873,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_068-8 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_EDITABLE_FALSE_0300 createPixelMap error ' + JSON.stringify(err));
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_068-8 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_EDITABLE_FALSE_0300 success ');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
} }
...@@ -1887,7 +1887,7 @@ export default function imageDecodeOptions() { ...@@ -1887,7 +1887,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_068-9 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0500
* @tc.name : createPixelMap(decodingOptions:desiredSize>imagesize)-bmp * @tc.name : createPixelMap(decodingOptions:desiredSize>imagesize)-bmp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -1897,11 +1897,11 @@ export default function imageDecodeOptions() { ...@@ -1897,11 +1897,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068-9', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0500', 0, async function (done) {
await getFd('test.bmp'); await getFd('test.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('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0500 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -1916,12 +1916,12 @@ export default function imageDecodeOptions() { ...@@ -1916,12 +1916,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_068-9 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0500 createPixelMap error ' + JSON.stringify(err));
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_068-9 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0500 success ');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
} }
...@@ -1930,7 +1930,7 @@ export default function imageDecodeOptions() { ...@@ -1930,7 +1930,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_068-10 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0600
* @tc.name : createPixelMap(decodingOptions:desiredRegion>imagesize)-bmp * @tc.name : createPixelMap(decodingOptions:desiredRegion>imagesize)-bmp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -1940,11 +1940,11 @@ export default function imageDecodeOptions() { ...@@ -1940,11 +1940,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068-10', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0600', 0, async function (done) {
await getFd('test.bmp'); await getFd('test.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(' SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0600 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -1960,7 +1960,7 @@ export default function imageDecodeOptions() { ...@@ -1960,7 +1960,7 @@ export default function imageDecodeOptions() {
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_068-10 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0600 createPixelMap error ' + JSON.stringify(err));
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -1968,12 +1968,12 @@ export default function imageDecodeOptions() { ...@@ -1968,12 +1968,12 @@ export default function imageDecodeOptions() {
pixelmap.getImageInfo().then((imageInfo) => { pixelmap.getImageInfo().then((imageInfo) => {
expect(imageInfo.size.height == 2).assertTrue(); expect(imageInfo.size.height == 2).assertTrue();
expect(imageInfo.size.width == 1).assertTrue(); expect(imageInfo.size.width == 1).assertTrue();
console.info('TC_068-10 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0600 success ');
console.info("imageInfo height :" + imageInfo.size.height); console.info("imageInfo height :" + imageInfo.size.height);
console.info("imageInfo width : " + imageInfo.size.width); console.info("imageInfo width : " + imageInfo.size.width);
done(); done();
}).catch((err) => { }).catch((err) => {
console.info('TC_068-10 getimageInfo err ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0600 getimageInfo err ' + JSON.stringify(err));
}) })
} }
}) })
...@@ -1981,7 +1981,7 @@ export default function imageDecodeOptions() { ...@@ -1981,7 +1981,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_068-11 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0500
* @tc.name : createPixelMapdecodingOptions:x -1 y -1)-bmp * @tc.name : createPixelMapdecodingOptions:x -1 y -1)-bmp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -1991,11 +1991,11 @@ export default function imageDecodeOptions() { ...@@ -1991,11 +1991,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068-11', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0500', 0, async function (done) {
await getFd('test.bmp'); await getFd('test.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('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0500 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -2010,12 +2010,12 @@ export default function imageDecodeOptions() { ...@@ -2010,12 +2010,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_068-11 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0500 success ');
console.info('TC_068-11 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0500 createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_068-11 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0500 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -2024,7 +2024,7 @@ export default function imageDecodeOptions() { ...@@ -2024,7 +2024,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_068-12 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0600
* @tc.name : createPixelMap(decodingOptions:x > image.height y > image.width)-bmp * @tc.name : createPixelMap(decodingOptions:x > image.height y > image.width)-bmp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -2034,11 +2034,11 @@ export default function imageDecodeOptions() { ...@@ -2034,11 +2034,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068-12', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0600', 0, async function (done) {
await getFd('test.bmp'); await getFd('test.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('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0600 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -2053,12 +2053,12 @@ export default function imageDecodeOptions() { ...@@ -2053,12 +2053,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_068-12 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0600 success ');
console.info('TC_068-12 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0600 createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_068-12 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0600 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -2067,8 +2067,8 @@ export default function imageDecodeOptions() { ...@@ -2067,8 +2067,8 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_068-13 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0600
* @tc.name : createPixelMap(decodingOptions:rotate>360)-jpg * @tc.name : createPixelMap(decodingOptions:rotate>360)-bmp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
* 3.create PixelMap * 3.create PixelMap
...@@ -2077,11 +2077,11 @@ export default function imageDecodeOptions() { ...@@ -2077,11 +2077,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_068-13', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0600', 0, async function (done) {
await getFd('test.bmp'); await getFd('test.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('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0600 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -2096,12 +2096,12 @@ export default function imageDecodeOptions() { ...@@ -2096,12 +2096,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_068-13 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0600 success ');
console.info('TC_068-13 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0600 createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_068-13 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0600 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -2110,7 +2110,7 @@ export default function imageDecodeOptions() { ...@@ -2110,7 +2110,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_163 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0700
* @tc.name : createPixelMap(decodingOptions)-pixelformat:RGBA_8888-png * @tc.name : createPixelMap(decodingOptions)-pixelformat:RGBA_8888-png
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -2120,11 +2120,11 @@ export default function imageDecodeOptions() { ...@@ -2120,11 +2120,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0700', 0, async function (done) {
await getFd('test.png'); await getFd('test.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('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0700 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -2139,12 +2139,12 @@ export default function imageDecodeOptions() { ...@@ -2139,12 +2139,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_163 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0700 createPixelMap error ' + JSON.stringify(err));
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_163 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0700 success ');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
} }
...@@ -2153,7 +2153,7 @@ export default function imageDecodeOptions() { ...@@ -2153,7 +2153,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_163-1 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0800
* @tc.name : createPixelMap(decodingOptions)-pixelformat:RGB_565-png * @tc.name : createPixelMap(decodingOptions)-pixelformat:RGB_565-png
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -2163,11 +2163,11 @@ export default function imageDecodeOptions() { ...@@ -2163,11 +2163,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0800', 0, async function (done) {
await getFd('test.png'); await getFd('test.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('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0800 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -2182,12 +2182,12 @@ export default function imageDecodeOptions() { ...@@ -2182,12 +2182,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_163-1 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0800 createPixelMap error ' + JSON.stringify(err));
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_163-1 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0800 success ');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
} }
...@@ -2196,7 +2196,7 @@ export default function imageDecodeOptions() { ...@@ -2196,7 +2196,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_163-2 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0900
* @tc.name : createPixelMap(decodingOptions)-pixelformat:unkonwn-png * @tc.name : createPixelMap(decodingOptions)-pixelformat:unkonwn-png
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -2206,11 +2206,11 @@ export default function imageDecodeOptions() { ...@@ -2206,11 +2206,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163-2', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0900', 0, async function (done) {
await getFd('test.png'); await getFd('test.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('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0900 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -2225,12 +2225,12 @@ export default function imageDecodeOptions() { ...@@ -2225,12 +2225,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_163-2 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0900 createPixelMap error ' + JSON.stringify(err));
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_163-2 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_PIXELFORMAT_0900 success ');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
} }
...@@ -2239,7 +2239,7 @@ export default function imageDecodeOptions() { ...@@ -2239,7 +2239,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_163-3 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0700
* @tc.name : createPixelMap(decodingOptions: index 1})-png * @tc.name : createPixelMap(decodingOptions: index 1})-png
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -2249,11 +2249,11 @@ export default function imageDecodeOptions() { ...@@ -2249,11 +2249,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163-3', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0700', 0, async function (done) {
await getFd('test.png'); await getFd('test.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('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0700 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -2268,12 +2268,12 @@ export default function imageDecodeOptions() { ...@@ -2268,12 +2268,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_163-3 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0700 success ');
console.info('TC_163-3 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0700 createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_163-3 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0700 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -2282,7 +2282,7 @@ export default function imageDecodeOptions() { ...@@ -2282,7 +2282,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_163-4 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0800
* @tc.name : createPixelMap(decodingOptions:index -1})-png * @tc.name : createPixelMap(decodingOptions:index -1})-png
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set decodingOptions * 2.set decodingOptions
...@@ -2293,11 +2293,11 @@ export default function imageDecodeOptions() { ...@@ -2293,11 +2293,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163-4', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0800', 0, async function (done) {
await getFd('test.png'); await getFd('test.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('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0800 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -2312,12 +2312,12 @@ export default function imageDecodeOptions() { ...@@ -2312,12 +2312,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_163-4 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0800 success ');
console.info('TC_163-4 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0800 createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_163-4 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_INDEX_0800 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -2326,7 +2326,7 @@ export default function imageDecodeOptions() { ...@@ -2326,7 +2326,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_163-5 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_SAMPLESIZE_0400
* @tc.name : createPixelMap(decodingOptions:sampleSize -1})-png * @tc.name : createPixelMap(decodingOptions:sampleSize -1})-png
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set decodingOptions * 2.set decodingOptions
...@@ -2337,11 +2337,11 @@ export default function imageDecodeOptions() { ...@@ -2337,11 +2337,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163-5', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_SAMPLESIZE_0400', 0, async function (done) {
await getFd('test.png'); await getFd('test.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('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_SAMPLESIZE_0400 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -2356,12 +2356,12 @@ export default function imageDecodeOptions() { ...@@ -2356,12 +2356,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_163-5 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_SAMPLESIZE_0400 success ');
console.info('TC_163-5 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_SAMPLESIZE_0400 createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_163-5 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_SAMPLESIZE_0400 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -2370,7 +2370,7 @@ export default function imageDecodeOptions() { ...@@ -2370,7 +2370,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_163-6 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0700
* @tc.name : createPixelMap(decodingOptions:rotate -10})-png * @tc.name : createPixelMap(decodingOptions:rotate -10})-png
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set decodingOptions * 2.set decodingOptions
...@@ -2381,11 +2381,11 @@ export default function imageDecodeOptions() { ...@@ -2381,11 +2381,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163-6', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0700', 0, async function (done) {
await getFd('test.png'); await getFd('test.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('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0700 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -2400,12 +2400,12 @@ export default function imageDecodeOptions() { ...@@ -2400,12 +2400,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_163-6 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0700 success ');
console.info('TC_163-6 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0700 createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_163-6 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0700 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -2414,7 +2414,7 @@ export default function imageDecodeOptions() { ...@@ -2414,7 +2414,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_163-7 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_UNSUPPORTED_PIXELFORMAT_0400
* @tc.name : createPixelMap(decodingOptions:unsupported pixelformat)-png * @tc.name : createPixelMap(decodingOptions:unsupported pixelformat)-png
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set decodingOptions * 2.set decodingOptions
...@@ -2425,11 +2425,11 @@ export default function imageDecodeOptions() { ...@@ -2425,11 +2425,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163-7', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_UNSUPPORTED_PIXELFORMAT_0400', 0, async function (done) {
await getFd('test.png'); await getFd('test.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('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_UNSUPPORTED_PIXELFORMAT_0400 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -2444,12 +2444,12 @@ export default function imageDecodeOptions() { ...@@ -2444,12 +2444,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_163-7 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_UNSUPPORTED_PIXELFORMAT_0400 success ');
console.info('TC_163-7 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_UNSUPPORTED_PIXELFORMAT_0400 createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_163-7 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_UNSUPPORTED_PIXELFORMAT_0400 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -2458,7 +2458,7 @@ export default function imageDecodeOptions() { ...@@ -2458,7 +2458,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_163-8 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_EDITABLE_FALSE_0400
* @tc.name : createPixelMap(decodingOptions:editable false})-png * @tc.name : createPixelMap(decodingOptions:editable false})-png
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set decodingOptions * 2.set decodingOptions
...@@ -2469,11 +2469,11 @@ export default function imageDecodeOptions() { ...@@ -2469,11 +2469,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163-8', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_EDITABLE_FALSE_0400', 0, async function (done) {
await getFd('test.png'); await getFd('test.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('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_EDITABLE_FALSE_0400 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -2488,12 +2488,12 @@ export default function imageDecodeOptions() { ...@@ -2488,12 +2488,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_163-8 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_EDITABLE_FALSE_0400 createPixelMap error ' + JSON.stringify(err));
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_163-8 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_EDITABLE_FALSE_0400 success ');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
} }
...@@ -2502,7 +2502,7 @@ export default function imageDecodeOptions() { ...@@ -2502,7 +2502,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_163-9 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0700
* @tc.name : createPixelMap(decodingOptions:desiredSize>imagesize)-png * @tc.name : createPixelMap(decodingOptions:desiredSize>imagesize)-png
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set decodingOptions * 2.set decodingOptions
...@@ -2513,11 +2513,11 @@ export default function imageDecodeOptions() { ...@@ -2513,11 +2513,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163-9', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0700', 0, async function (done) {
await getFd('test.png'); await getFd('test.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('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0700 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -2532,12 +2532,12 @@ export default function imageDecodeOptions() { ...@@ -2532,12 +2532,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_163-9 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0700 createPixelMap error ' + JSON.stringify(err));
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
console.info('TC_163-9 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0700 success ');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
done(); done();
} }
...@@ -2546,7 +2546,7 @@ export default function imageDecodeOptions() { ...@@ -2546,7 +2546,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_163-10 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0800
* @tc.name : createPixelMap(decodingOptions:desiredRegion>imagesize)-png * @tc.name : createPixelMap(decodingOptions:desiredRegion>imagesize)-png
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set decodingOptions * 2.set decodingOptions
...@@ -2557,11 +2557,11 @@ export default function imageDecodeOptions() { ...@@ -2557,11 +2557,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163-10', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0800', 0, async function (done) {
await getFd('test.png'); await getFd('test.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(' SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0800 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -2576,7 +2576,7 @@ export default function imageDecodeOptions() { ...@@ -2576,7 +2576,7 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_163-10 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0800 createPixelMap error ' + JSON.stringify(err));
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -2584,12 +2584,12 @@ export default function imageDecodeOptions() { ...@@ -2584,12 +2584,12 @@ export default function imageDecodeOptions() {
pixelmap.getImageInfo().then((imageInfo) => { pixelmap.getImageInfo().then((imageInfo) => {
expect(imageInfo.size.height == 2).assertTrue(); expect(imageInfo.size.height == 2).assertTrue();
expect(imageInfo.size.width == 1).assertTrue(); expect(imageInfo.size.width == 1).assertTrue();
console.info('TC_163-10 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0800 success ');
console.info("imageInfo height :" + imageInfo.size.height); console.info("imageInfo height :" + imageInfo.size.height);
console.info("imageInfo width : " + imageInfo.size.width); console.info("imageInfo width : " + imageInfo.size.width);
done(); done();
}).catch((err) => { }).catch((err) => {
console.info('TC_163-10 getimageInfo err ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_DESIRED_0800 getimageInfo err ' + JSON.stringify(err));
}) })
} }
}) })
...@@ -2597,7 +2597,7 @@ export default function imageDecodeOptions() { ...@@ -2597,7 +2597,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_163-11 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0700
* @tc.name : createPixelMapdecodingOptions:x -1 y -1)-png * @tc.name : createPixelMapdecodingOptions:x -1 y -1)-png
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set decodingOptions * 2.set decodingOptions
...@@ -2608,11 +2608,11 @@ export default function imageDecodeOptions() { ...@@ -2608,11 +2608,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163-11', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0700', 0, async function (done) {
await getFd('test.png'); await getFd('test.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('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0700 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -2627,12 +2627,12 @@ export default function imageDecodeOptions() { ...@@ -2627,12 +2627,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_163-11 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0700 success ');
console.info('TC_163-11 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0700 createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_163-11 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0700 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -2641,7 +2641,7 @@ export default function imageDecodeOptions() { ...@@ -2641,7 +2641,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_163-12 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0800
* @tc.name : createPixelMap(decodingOptions:x > image.height y > image.width)-png * @tc.name : createPixelMap(decodingOptions:x > image.height y > image.width)-png
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set decodingOptions * 2.set decodingOptions
...@@ -2652,11 +2652,11 @@ export default function imageDecodeOptions() { ...@@ -2652,11 +2652,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163-12', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0800', 0, async function (done) {
await getFd('test.png'); await getFd('test.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('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0800 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -2671,12 +2671,12 @@ export default function imageDecodeOptions() { ...@@ -2671,12 +2671,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_163-12 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0800 success ');
console.info('TC_163-12 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0800 createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_163-12 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_XY_0800 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -2685,7 +2685,7 @@ export default function imageDecodeOptions() { ...@@ -2685,7 +2685,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_163-13 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0800
* @tc.name : createPixelMap(decodingOptions:rotate>360)-png * @tc.name : createPixelMap(decodingOptions:rotate>360)-png
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -2695,11 +2695,11 @@ export default function imageDecodeOptions() { ...@@ -2695,11 +2695,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_163-13', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0800', 0, async function (done) {
await getFd('test.png'); await getFd('test.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('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0800 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -2714,12 +2714,12 @@ export default function imageDecodeOptions() { ...@@ -2714,12 +2714,12 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_163-13 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0800 success ');
console.info('TC_163-13 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0800 createPixelMap error ' + JSON.stringify(err));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
console.info('TC_163-13 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0800 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -2728,7 +2728,7 @@ export default function imageDecodeOptions() { ...@@ -2728,7 +2728,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_167 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_UNSUPPORTED_IMAGE_FORMAT_0100
* @tc.name : createPixelMap-unsupported image format * @tc.name : createPixelMap-unsupported image format
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -2738,7 +2738,7 @@ export default function imageDecodeOptions() { ...@@ -2738,7 +2738,7 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_167', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_UNSUPPORTED_IMAGE_FORMAT_0100', 0, async function (done) {
await getFd('test.tiff'); await getFd('test.tiff');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
let decodingOptions = { let decodingOptions = {
...@@ -2753,12 +2753,12 @@ export default function imageDecodeOptions() { ...@@ -2753,12 +2753,12 @@ export default function imageDecodeOptions() {
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
if (err) { if (err) {
console.info('TC_167 success '); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_UNSUPPORTED_IMAGE_FORMAT_0100 success ');
console.info('TC_167 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_UNSUPPORTED_IMAGE_FORMAT_0100 createPixelMap error ' + JSON.stringify(err));
expect(pixelmap == undefined).assertTrue(); expect(pixelmap == undefined).assertTrue();
done(); done();
} else { } else {
console.info('TC_167 fail ' + pixelmap); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_UNSUPPORTED_IMAGE_FORMAT_0100 fail ' + pixelmap);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -2767,7 +2767,7 @@ export default function imageDecodeOptions() { ...@@ -2767,7 +2767,7 @@ export default function imageDecodeOptions() {
}) })
/** /**
* @tc.number : TC_169 * @tc.number : SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0900
* @tc.name : Decode the image to generate a bitmap * @tc.name : Decode the image to generate a bitmap
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.create pixelmap * 2.create pixelmap
...@@ -2777,11 +2777,11 @@ export default function imageDecodeOptions() { ...@@ -2777,11 +2777,11 @@ export default function imageDecodeOptions() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_169', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0900', 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_169 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0900 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -2796,24 +2796,24 @@ export default function imageDecodeOptions() { ...@@ -2796,24 +2796,24 @@ export default function imageDecodeOptions() {
}; };
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (err) { if (err) {
console.info('TC_169 createPixelMap error ' + JSON.stringify(err)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0900 createPixelMap error ' + JSON.stringify(err));
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
globalpixelmap = pixelmap; globalpixelmap = pixelmap;
pixelmap.getImageInfo((error, imageInfo) => { pixelmap.getImageInfo((error, imageInfo) => {
if (error) { if (error) {
console.info('TC_169 getimageInfo err ' + JSON.stringify(error)); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0900 getimageInfo err ' + JSON.stringify(error));
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
if (imageInfo != undefined) { if (imageInfo != undefined) {
console.info('TC_169 success'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0900 success');
expect(imageInfo.size.height == 2).assertTrue(); expect(imageInfo.size.height == 2).assertTrue();
expect(imageInfo.size.width == 1).assertTrue(); expect(imageInfo.size.width == 1).assertTrue();
done(); done();
} else { } else {
console.info('TC_169 imageInfo is empty'); console.info('SUB_GRAPHIC_IMAGE_DECODEOPTIONS_CREATEPIXELMAP_ROTATE_0900 imageInfo is empty');
expect(false).assertTrue() expect(false).assertTrue()
done(); done();
} }
......
...@@ -62,7 +62,7 @@ describe('imageExif', function () { ...@@ -62,7 +62,7 @@ describe('imageExif', function () {
}) })
/** /**
* @tc.number : TC_171 * @tc.number : SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0100
* @tc.name : getImageProperty(BitsPerSample)-promise * @tc.name : getImageProperty(BitsPerSample)-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set property * 2.set property
...@@ -72,22 +72,22 @@ describe('imageExif', function () { ...@@ -72,22 +72,22 @@ describe('imageExif', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_171', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0100', 0, async function (done) {
await getFd('test_exif1.jpg'); await getFd('test_exif1.jpg');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_171 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageProperty("BitsPerSample") imageSourceApi.getImageProperty("BitsPerSample")
.then(data => { .then(data => {
console.info('TC_171 BitsPerSample ' + data); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0100 BitsPerSample ' + data);
expect(data != undefined && data != '').assertTrue(); expect(data != undefined && data != '').assertTrue();
done(); done();
}) })
.catch(error => { .catch(error => {
console.log('TC_171 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0100 error: ' + error);
expect(false).assertFail(); expect(false).assertFail();
done(); done();
}) })
...@@ -95,7 +95,7 @@ describe('imageExif', function () { ...@@ -95,7 +95,7 @@ describe('imageExif', function () {
}) })
/** /**
* @tc.number : TC_171-1 * @tc.number : SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0200
* @tc.name : getImageProperty(Orientation)-promise * @tc.name : getImageProperty(Orientation)-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set property * 2.set property
...@@ -105,22 +105,22 @@ describe('imageExif', function () { ...@@ -105,22 +105,22 @@ describe('imageExif', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_171-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0200', 0, async function (done) {
await getFd('test_exif.jpg'); await getFd('test_exif.jpg');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_171-1 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0200 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageProperty("Orientation") imageSourceApi.getImageProperty("Orientation")
.then(data => { .then(data => {
console.info('TC_171-1 Orientation ' + data); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0200 Orientation ' + data);
expect(data != undefined && data != '').assertTrue(); expect(data != undefined && data != '').assertTrue();
done(); done();
}) })
.catch(error => { .catch(error => {
console.log('TC_171-1 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0200 error: ' + error);
expect(false).assertFail(); expect(false).assertFail();
done(); done();
}) })
...@@ -128,7 +128,7 @@ describe('imageExif', function () { ...@@ -128,7 +128,7 @@ describe('imageExif', function () {
}) })
/** /**
* @tc.number : TC_171-2 * @tc.number : SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0300
* @tc.name : getImageProperty(ImageLength)-promise * @tc.name : getImageProperty(ImageLength)-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set property * 2.set property
...@@ -138,22 +138,22 @@ describe('imageExif', function () { ...@@ -138,22 +138,22 @@ describe('imageExif', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_171-2', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0300', 0, async function (done) {
await getFd('test_exif.jpg'); await getFd('test_exif.jpg');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_171-2 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0300 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageProperty("ImageLength") imageSourceApi.getImageProperty("ImageLength")
.then(data => { .then(data => {
console.info('TC_171-2 ImageLength ' + data); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0300 ImageLength ' + data);
expect(data != undefined && data != '').assertTrue(); expect(data != undefined && data != '').assertTrue();
done(); done();
}) })
.catch(error => { .catch(error => {
console.log('TC_171-2 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0300 error: ' + error);
expect(false).assertFail(); expect(false).assertFail();
done(); done();
}) })
...@@ -161,7 +161,7 @@ describe('imageExif', function () { ...@@ -161,7 +161,7 @@ describe('imageExif', function () {
}) })
/** /**
* @tc.number : TC_171-3 * @tc.number : SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0400
* @tc.name : getImageProperty(ImageWidth)-promise * @tc.name : getImageProperty(ImageWidth)-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set property * 2.set property
...@@ -171,22 +171,22 @@ describe('imageExif', function () { ...@@ -171,22 +171,22 @@ describe('imageExif', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_171-3', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0400', 0, async function (done) {
await getFd('test_exif.jpg'); await getFd('test_exif.jpg');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_171-3 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0400 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageProperty("ImageWidth") imageSourceApi.getImageProperty("ImageWidth")
.then(data => { .then(data => {
console.info('TC_171-3 ImageWidth ' + data); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0400 ImageWidth ' + data);
expect(data != undefined && data != '').assertTrue(); expect(data != undefined && data != '').assertTrue();
done(); done();
}) })
.catch(error => { .catch(error => {
console.log('TC_171-3 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0400 error: ' + error);
expect(false).assertFail(); expect(false).assertFail();
done(); done();
}) })
...@@ -194,7 +194,7 @@ describe('imageExif', function () { ...@@ -194,7 +194,7 @@ describe('imageExif', function () {
}) })
/** /**
* @tc.number : TC_171-4 * @tc.number : SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0500
* @tc.name : getImageProperty(GPSLatitude)-promise * @tc.name : getImageProperty(GPSLatitude)-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set property * 2.set property
...@@ -204,22 +204,22 @@ describe('imageExif', function () { ...@@ -204,22 +204,22 @@ describe('imageExif', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_171-4', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0500', 0, async function (done) {
await getFd('test_exif.jpg'); await getFd('test_exif.jpg');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_171-4 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0500 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageProperty("GPSLatitude") imageSourceApi.getImageProperty("GPSLatitude")
.then(data => { .then(data => {
console.info('TC_171-4 GPSLatitude ' + data); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0500 GPSLatitude ' + data);
expect(data != undefined && data != '').assertTrue(); expect(data != undefined && data != '').assertTrue();
done(); done();
}) })
.catch(error => { .catch(error => {
console.log('TC_171-4 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0500 error: ' + error);
expect(false).assertFail(); expect(false).assertFail();
done(); done();
}) })
...@@ -227,7 +227,7 @@ describe('imageExif', function () { ...@@ -227,7 +227,7 @@ describe('imageExif', function () {
}) })
/** /**
* @tc.number : TC_171-5 * @tc.number : SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0600
* @tc.name : getImageProperty(GPSLongitude)-promise * @tc.name : getImageProperty(GPSLongitude)-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set property * 2.set property
...@@ -237,22 +237,22 @@ describe('imageExif', function () { ...@@ -237,22 +237,22 @@ describe('imageExif', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_171-5', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0600', 0, async function (done) {
await getFd('test_exif.jpg'); await getFd('test_exif.jpg');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_171-5 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0600 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageProperty("GPSLongitude") imageSourceApi.getImageProperty("GPSLongitude")
.then(data => { .then(data => {
console.info('TC_171-5 GPSLongitude ' + data); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0600 GPSLongitude ' + data);
expect(data != undefined && data != '').assertTrue(); expect(data != undefined && data != '').assertTrue();
done(); done();
}) })
.catch(error => { .catch(error => {
console.log('TC_171-5 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0600 error: ' + error);
expect(false).assertFail(); expect(false).assertFail();
done(); done();
}) })
...@@ -260,7 +260,7 @@ describe('imageExif', function () { ...@@ -260,7 +260,7 @@ describe('imageExif', function () {
}) })
/** /**
* @tc.number : TC_171-6 * @tc.number : SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0700
* @tc.name : getImageProperty(GPSLatitudeRef)-promise * @tc.name : getImageProperty(GPSLatitudeRef)-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set property * 2.set property
...@@ -270,22 +270,22 @@ describe('imageExif', function () { ...@@ -270,22 +270,22 @@ describe('imageExif', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_171-6', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0700', 0, async function (done) {
await getFd('test_exif.jpg'); await getFd('test_exif.jpg');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_171-6 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0700 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageProperty("GPSLatitudeRef") imageSourceApi.getImageProperty("GPSLatitudeRef")
.then(data => { .then(data => {
console.info('TC_171-6 GPSLatitudeRef ' + data); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0700 GPSLatitudeRef ' + data);
expect(data != undefined && data != '').assertTrue(); expect(data != undefined && data != '').assertTrue();
done(); done();
}) })
.catch(error => { .catch(error => {
console.log('TC_171-6 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0700 error: ' + error);
expect(false).assertFail(); expect(false).assertFail();
done(); done();
}) })
...@@ -293,7 +293,7 @@ describe('imageExif', function () { ...@@ -293,7 +293,7 @@ describe('imageExif', function () {
}) })
/** /**
* @tc.number : TC_171-7 * @tc.number : SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0800
* @tc.name : getImageProperty(GPSLongitudeRef)-promise * @tc.name : getImageProperty(GPSLongitudeRef)-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set property * 2.set property
...@@ -303,22 +303,22 @@ describe('imageExif', function () { ...@@ -303,22 +303,22 @@ describe('imageExif', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_171-7', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0800', 0, async function (done) {
await getFd('test_exif.jpg'); await getFd('test_exif.jpg');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_171-7 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0800 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageProperty("GPSLongitudeRef") imageSourceApi.getImageProperty("GPSLongitudeRef")
.then(data => { .then(data => {
console.info('TC_171-7 GPSLongitudeRef ' + data); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0800 GPSLongitudeRef ' + data);
expect(data != undefined && data != '').assertTrue(); expect(data != undefined && data != '').assertTrue();
done(); done();
}) })
.catch(error => { .catch(error => {
console.log('TC_171-7 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROMISE_0800 error: ' + error);
expect(false).assertFail(); expect(false).assertFail();
done(); done();
}) })
...@@ -326,7 +326,7 @@ describe('imageExif', function () { ...@@ -326,7 +326,7 @@ describe('imageExif', function () {
}) })
/** /**
* @tc.number : TC_171-8 * @tc.number : SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_DATETIMEORIGINAL_0100
* @tc.name : getImageProperty(DateTimeOriginal) * @tc.name : getImageProperty(DateTimeOriginal)
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set property * 2.set property
...@@ -336,22 +336,22 @@ describe('imageExif', function () { ...@@ -336,22 +336,22 @@ describe('imageExif', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_171-8', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_DATETIMEORIGINAL_0100', 0, async function (done) {
await getFd('test_exif.jpg'); await getFd('test_exif.jpg');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_171-8 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_DATETIMEORIGINAL_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageProperty("DateTimeOriginal") imageSourceApi.getImageProperty("DateTimeOriginal")
.then(data => { .then(data => {
console.info('TC_171-8 DateTimeOriginal ' + data); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_DATETIMEORIGINAL_0100 DateTimeOriginal ' + data);
expect(data != undefined && data != '').assertTrue(); expect(data != undefined && data != '').assertTrue();
done(); done();
}) })
.catch(error => { .catch(error => {
console.log('TC_171-8 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_DATETIMEORIGINAL_0100 error: ' + error);
expect(false).assertFail(); expect(false).assertFail();
done(); done();
}) })
...@@ -359,7 +359,7 @@ describe('imageExif', function () { ...@@ -359,7 +359,7 @@ describe('imageExif', function () {
}) })
/** /**
* @tc.number : TC_172 * @tc.number : SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0100
* @tc.name : getImageProperty(BitsPerSample)-callback * @tc.name : getImageProperty(BitsPerSample)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call getImageProperty(BitsPerSample) * 2.call getImageProperty(BitsPerSample)
...@@ -368,21 +368,21 @@ describe('imageExif', function () { ...@@ -368,21 +368,21 @@ describe('imageExif', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_172', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0100', 0, async function (done) {
await getFd('test_exif1.jpg'); await getFd('test_exif1.jpg');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_172 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageProperty("BitsPerSample", (error, data) => { imageSourceApi.getImageProperty("BitsPerSample", (error, data) => {
if (error) { if (error) {
console.info('TC_172 getImageProperty BitsPerSample error'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0100 getImageProperty BitsPerSample error');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
console.info('TC_172 BitsPerSample ' + data); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0100 BitsPerSample ' + data);
expect(data != undefined && data != '').assertTrue(); expect(data != undefined && data != '').assertTrue();
done(); done();
} }
...@@ -391,7 +391,7 @@ describe('imageExif', function () { ...@@ -391,7 +391,7 @@ describe('imageExif', function () {
}) })
/** /**
* @tc.number : TC_172-1 * @tc.number : SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0200
* @tc.name : getImageProperty(Orientation)-callback * @tc.name : getImageProperty(Orientation)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call getImageProperty(Orientation) * 2.call getImageProperty(Orientation)
...@@ -400,21 +400,21 @@ describe('imageExif', function () { ...@@ -400,21 +400,21 @@ describe('imageExif', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_172-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0200', 0, async function (done) {
await getFd('test_exif.jpg'); await getFd('test_exif.jpg');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_172-1 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0200 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageProperty("Orientation", (error, data) => { imageSourceApi.getImageProperty("Orientation", (error, data) => {
if (error) { if (error) {
console.info('TC_172-1 getImageProperty Orientation error'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0200 getImageProperty Orientation error');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
console.info('TC_172-1 Orientation ' + data); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0200 Orientation ' + data);
expect(data != undefined && data != '').assertTrue(); expect(data != undefined && data != '').assertTrue();
done(); done();
} }
...@@ -423,7 +423,7 @@ describe('imageExif', function () { ...@@ -423,7 +423,7 @@ describe('imageExif', function () {
}) })
/** /**
* @tc.number : TC_172-2 * @tc.number : SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0300
* @tc.name : getImageProperty(ImageLength)-callback * @tc.name : getImageProperty(ImageLength)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call getImageProperty(ImageLength) * 2.call getImageProperty(ImageLength)
...@@ -432,21 +432,21 @@ describe('imageExif', function () { ...@@ -432,21 +432,21 @@ describe('imageExif', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_172-2', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0300', 0, async function (done) {
await getFd('test_exif.jpg'); await getFd('test_exif.jpg');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_172-2 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0300 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageProperty("ImageLength", (error, data) => { imageSourceApi.getImageProperty("ImageLength", (error, data) => {
if (error) { if (error) {
console.info('TC_172-2 getImageProperty ImageLength error'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0300 getImageProperty ImageLength error');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
console.info('TC_172-2 ImageLength ' + data); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0300 ImageLength ' + data);
expect(data != undefined && data != '').assertTrue(); expect(data != undefined && data != '').assertTrue();
done(); done();
} }
...@@ -455,7 +455,7 @@ describe('imageExif', function () { ...@@ -455,7 +455,7 @@ describe('imageExif', function () {
}) })
/** /**
* @tc.number : TC_172-3 * @tc.number : SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0400
* @tc.name : getImageProperty(ImageWidth)-callback * @tc.name : getImageProperty(ImageWidth)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call getImageProperty(ImageWidth) * 2.call getImageProperty(ImageWidth)
...@@ -464,21 +464,21 @@ describe('imageExif', function () { ...@@ -464,21 +464,21 @@ describe('imageExif', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_172-3', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0400', 0, async function (done) {
await getFd('test_exif.jpg'); await getFd('test_exif.jpg');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_172-3 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0400 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageProperty("ImageWidth", (error, data) => { imageSourceApi.getImageProperty("ImageWidth", (error, data) => {
if (error) { if (error) {
console.info('TC_172-3 getImageProperty ImageWidth error'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0400 getImageProperty ImageWidth error');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
console.info('TC_172-3 ImageWidth ' + data); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0400 ImageWidth ' + data);
expect(data != undefined && data != '').assertTrue(); expect(data != undefined && data != '').assertTrue();
done(); done();
} }
...@@ -487,7 +487,7 @@ describe('imageExif', function () { ...@@ -487,7 +487,7 @@ describe('imageExif', function () {
}) })
/** /**
* @tc.number : TC_172-4 * @tc.number : SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0500
* @tc.name : getImageProperty(GPSLatitude)-callback * @tc.name : getImageProperty(GPSLatitude)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call getImageProperty(GPSLatitude) * 2.call getImageProperty(GPSLatitude)
...@@ -496,21 +496,21 @@ describe('imageExif', function () { ...@@ -496,21 +496,21 @@ describe('imageExif', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_172-4', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0500', 0, async function (done) {
await getFd('test_exif.jpg'); await getFd('test_exif.jpg');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_172-4 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0500 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageProperty("GPSLatitude", (error, data) => { imageSourceApi.getImageProperty("GPSLatitude", (error, data) => {
if (error) { if (error) {
console.info('TC_172-4 getImageProperty GPSLatitude error'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0500 getImageProperty GPSLatitude error');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
console.info('TC_172-4 GPSLatitude ' + data); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0500 GPSLatitude ' + data);
expect(data != undefined && data != '').assertTrue(); expect(data != undefined && data != '').assertTrue();
done(); done();
} }
...@@ -519,7 +519,7 @@ describe('imageExif', function () { ...@@ -519,7 +519,7 @@ describe('imageExif', function () {
}) })
/** /**
* @tc.number : TC_172-5 * @tc.number : SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0600
* @tc.name : getImageProperty(GPSLongitude)-callback * @tc.name : getImageProperty(GPSLongitude)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call getImageProperty(GPSLongitude) * 2.call getImageProperty(GPSLongitude)
...@@ -528,21 +528,21 @@ describe('imageExif', function () { ...@@ -528,21 +528,21 @@ describe('imageExif', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_172-5', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0600', 0, async function (done) {
await getFd('test_exif.jpg'); await getFd('test_exif.jpg');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_172-5 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0600 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageProperty("GPSLongitude", (error, data) => { imageSourceApi.getImageProperty("GPSLongitude", (error, data) => {
if (error) { if (error) {
console.info('TC_172-5 getImageProperty GPSLongitude error'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0600 getImageProperty GPSLongitude error');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
console.info('TC_172-5 GPSLongitude ' + data); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0600 GPSLongitude ' + data);
expect(data != undefined && data != '').assertTrue(); expect(data != undefined && data != '').assertTrue();
done(); done();
} }
...@@ -551,7 +551,7 @@ describe('imageExif', function () { ...@@ -551,7 +551,7 @@ describe('imageExif', function () {
}) })
/** /**
* @tc.number : TC_172-6 * @tc.number : SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0700
* @tc.name : getImageProperty(GPSLatitudeRef)-callback * @tc.name : getImageProperty(GPSLatitudeRef)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call getImageProperty(GPSLatitudeRef) * 2.call getImageProperty(GPSLatitudeRef)
...@@ -560,21 +560,21 @@ describe('imageExif', function () { ...@@ -560,21 +560,21 @@ describe('imageExif', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_172-6', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0700', 0, async function (done) {
await getFd('test_exif.jpg'); await getFd('test_exif.jpg');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_172-6 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0700 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageProperty("GPSLatitudeRef", (error, data) => { imageSourceApi.getImageProperty("GPSLatitudeRef", (error, data) => {
if (error) { if (error) {
console.info('TC_172-6 getImageProperty GPSLatitudeRef error'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0700 getImageProperty GPSLatitudeRef error');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
console.info('TC_172-6 GPSLatitudeRef ' + data); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0700 GPSLatitudeRef ' + data);
expect(data != undefined && data != '').assertTrue(); expect(data != undefined && data != '').assertTrue();
done(); done();
} }
...@@ -583,7 +583,7 @@ describe('imageExif', function () { ...@@ -583,7 +583,7 @@ describe('imageExif', function () {
}) })
/** /**
* @tc.number : TC_172-7 * @tc.number : SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0800
* @tc.name : getImageProperty(GPSLongitudeRef)-callback * @tc.name : getImageProperty(GPSLongitudeRef)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call getImageProperty(GPSLongitudeRef) * 2.call getImageProperty(GPSLongitudeRef)
...@@ -592,21 +592,21 @@ describe('imageExif', function () { ...@@ -592,21 +592,21 @@ describe('imageExif', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_172-7', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0800', 0, async function (done) {
await getFd('test_exif.jpg'); await getFd('test_exif.jpg');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_172-7 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0800 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageProperty("GPSLongitudeRef", (error, data) => { imageSourceApi.getImageProperty("GPSLongitudeRef", (error, data) => {
if (error) { if (error) {
console.info('TC_172-7 getImageProperty GPSLongitudeRef error'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0800 getImageProperty GPSLongitudeRef error');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
console.info('TC_172-7 GPSLongitudeRef ' + data); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0800 GPSLongitudeRef ' + data);
expect(data != undefined && data != '').assertTrue(); expect(data != undefined && data != '').assertTrue();
done(); done();
} }
...@@ -615,7 +615,7 @@ describe('imageExif', function () { ...@@ -615,7 +615,7 @@ describe('imageExif', function () {
}) })
/** /**
* @tc.number : TC_172-8 * @tc.number : SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0900
* @tc.name : getImageProperty(DateTimeOriginal)-callback * @tc.name : getImageProperty(DateTimeOriginal)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call getImageProperty(DateTimeOriginal) * 2.call getImageProperty(DateTimeOriginal)
...@@ -624,21 +624,21 @@ describe('imageExif', function () { ...@@ -624,21 +624,21 @@ describe('imageExif', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_172-8', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0900', 0, async function (done) {
await getFd('test_exif.jpg'); await getFd('test_exif.jpg');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_172-8 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0900 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.getImageProperty("DateTimeOriginal", (error, data) => { imageSourceApi.getImageProperty("DateTimeOriginal", (error, data) => {
if (error) { if (error) {
console.info('TC_172-8 getImageProperty DateTimeOriginal error'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0900 getImageProperty DateTimeOriginal error');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
console.info('TC_172-8 DateTimeOriginal ' + data); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_CALLBACK_0900 DateTimeOriginal ' + data);
expect(data != undefined && data != '').assertTrue(); expect(data != undefined && data != '').assertTrue();
done(); done();
} }
...@@ -647,7 +647,7 @@ describe('imageExif', function () { ...@@ -647,7 +647,7 @@ describe('imageExif', function () {
}) })
/** /**
* @tc.number : TC_173 * @tc.number : SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0100
* @tc.name : getImageProperty(BitsPerSample,property)-callback * @tc.name : getImageProperty(BitsPerSample,property)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set property * 2.set property
...@@ -657,22 +657,22 @@ describe('imageExif', function () { ...@@ -657,22 +657,22 @@ describe('imageExif', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_173', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0100', 0, async function (done) {
await getFd('test_exif1.jpg'); await getFd('test_exif1.jpg');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_173 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
let property = { index: 0, defaultValue: '9999' } let property = { index: 0, defaultValue: '9999' }
imageSourceApi.getImageProperty("BitsPerSample", property, (error, data) => { imageSourceApi.getImageProperty("BitsPerSample", property, (error, data) => {
if (error) { if (error) {
console.info('TC_173 getImageProperty BitsPerSample error'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0100 getImageProperty BitsPerSample error');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
console.info('TC_173 BitsPerSample ' + data); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0100 BitsPerSample ' + data);
expect(data != '9999' && data != undefined && data != '').assertTrue(); expect(data != '9999' && data != undefined && data != '').assertTrue();
done(); done();
} }
...@@ -681,7 +681,7 @@ describe('imageExif', function () { ...@@ -681,7 +681,7 @@ describe('imageExif', function () {
}) })
/** /**
* @tc.number : TC_173-1 * @tc.number : SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0200
* @tc.name : getImageProperty(Orientation,property)-callback * @tc.name : getImageProperty(Orientation,property)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set property * 2.set property
...@@ -691,22 +691,22 @@ describe('imageExif', function () { ...@@ -691,22 +691,22 @@ describe('imageExif', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_173-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0200', 0, async function (done) {
await getFd('test_exif.jpg'); await getFd('test_exif.jpg');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_173-1 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0200 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
let property = { index: 0, defaultValue: '9999' } let property = { index: 0, defaultValue: '9999' }
imageSourceApi.getImageProperty("Orientation", property, (error, data) => { imageSourceApi.getImageProperty("Orientation", property, (error, data) => {
if (error) { if (error) {
console.info('TC_173-1 getImageProperty Orientation error'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0200 getImageProperty Orientation error');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
console.info('TC_173-1 Orientation ' + data); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0200 Orientation ' + data);
expect(data != '9999' && data != undefined && data != '').assertTrue(); expect(data != '9999' && data != undefined && data != '').assertTrue();
done(); done();
} }
...@@ -715,7 +715,7 @@ describe('imageExif', function () { ...@@ -715,7 +715,7 @@ describe('imageExif', function () {
}) })
/** /**
* @tc.number : TC_173-2 * @tc.number : SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0300
* @tc.name : getImageProperty(ImageLength,property)-callback * @tc.name : getImageProperty(ImageLength,property)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set property * 2.set property
...@@ -725,22 +725,22 @@ describe('imageExif', function () { ...@@ -725,22 +725,22 @@ describe('imageExif', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_173-2', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0300', 0, async function (done) {
await getFd('test_exif.jpg'); await getFd('test_exif.jpg');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_173-2 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0300 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
let property = { index: 0, defaultValue: '9999' } let property = { index: 0, defaultValue: '9999' }
imageSourceApi.getImageProperty("ImageLength", property, (error, data) => { imageSourceApi.getImageProperty("ImageLength", property, (error, data) => {
if (error) { if (error) {
console.info('TC_173-2 getImageProperty ImageLength error'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0300 getImageProperty ImageLength error');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
console.info('TC_173-2 ImageLength ' + data); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0300 ImageLength ' + data);
expect(data != '9999' && data != undefined && data != '').assertTrue(); expect(data != '9999' && data != undefined && data != '').assertTrue();
done(); done();
} }
...@@ -749,7 +749,7 @@ describe('imageExif', function () { ...@@ -749,7 +749,7 @@ describe('imageExif', function () {
}) })
/** /**
* @tc.number : TC_173-3 * @tc.number : SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0400
* @tc.name : getImageProperty(ImageWidth,property)-callback * @tc.name : getImageProperty(ImageWidth,property)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set property * 2.set property
...@@ -759,22 +759,22 @@ describe('imageExif', function () { ...@@ -759,22 +759,22 @@ describe('imageExif', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_173-3', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0400', 0, async function (done) {
await getFd('test_exif.jpg'); await getFd('test_exif.jpg');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_173-3 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0400 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
let property = { index: 0, defaultValue: '9999' } let property = { index: 0, defaultValue: '9999' }
imageSourceApi.getImageProperty("ImageWidth", property, (error, data) => { imageSourceApi.getImageProperty("ImageWidth", property, (error, data) => {
if (error) { if (error) {
console.info('TC_173-3 getImageProperty ImageWidth error'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0400 getImageProperty ImageWidth error');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
console.info('TC_173-3 ImageWidth ' + data); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0400 ImageWidth ' + data);
expect(data != '9999' && data != undefined && data != '').assertTrue(); expect(data != '9999' && data != undefined && data != '').assertTrue();
done(); done();
} }
...@@ -783,7 +783,7 @@ describe('imageExif', function () { ...@@ -783,7 +783,7 @@ describe('imageExif', function () {
}) })
/** /**
* @tc.number : TC_173-4 * @tc.number : SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0500
* @tc.name : getImageProperty(GPSLatitude,property)-callback * @tc.name : getImageProperty(GPSLatitude,property)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set property * 2.set property
...@@ -793,22 +793,22 @@ describe('imageExif', function () { ...@@ -793,22 +793,22 @@ describe('imageExif', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_173-4', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0500', 0, async function (done) {
await getFd('test_exif.jpg'); await getFd('test_exif.jpg');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_173-4 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0500 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
let property = { index: 0, defaultValue: '9999' } let property = { index: 0, defaultValue: '9999' }
imageSourceApi.getImageProperty("GPSLatitude", property, (error, data) => { imageSourceApi.getImageProperty("GPSLatitude", property, (error, data) => {
if (error) { if (error) {
console.info('TC_173-4 getImageProperty GPSLatitude error'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0500 getImageProperty GPSLatitude error');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
console.info('TC_173-4 GPSLatitude ' + data); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0500 GPSLatitude ' + data);
expect(data != '9999' && data != undefined && data != '').assertTrue(); expect(data != '9999' && data != undefined && data != '').assertTrue();
done(); done();
} }
...@@ -817,7 +817,7 @@ describe('imageExif', function () { ...@@ -817,7 +817,7 @@ describe('imageExif', function () {
}) })
/** /**
* @tc.number : TC_173-5 * @tc.number : SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0600
* @tc.name : getImageProperty(GPSLongitude,property)-callback * @tc.name : getImageProperty(GPSLongitude,property)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set property * 2.set property
...@@ -827,22 +827,22 @@ describe('imageExif', function () { ...@@ -827,22 +827,22 @@ describe('imageExif', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_173-5', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0600', 0, async function (done) {
await getFd('test_exif.jpg'); await getFd('test_exif.jpg');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_173-5 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0600 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
let property = { index: 0, defaultValue: '9999' } let property = { index: 0, defaultValue: '9999' }
imageSourceApi.getImageProperty("GPSLongitude", property, (error, data) => { imageSourceApi.getImageProperty("GPSLongitude", property, (error, data) => {
if (error) { if (error) {
console.info('TC_173-5 getImageProperty GPSLongitude error'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0600 getImageProperty GPSLongitude error');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
console.info('TC_173-5 GPSLongitude ' + data); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0600 GPSLongitude ' + data);
expect(data != '9999' && data != undefined && data != '').assertTrue(); expect(data != '9999' && data != undefined && data != '').assertTrue();
done(); done();
} }
...@@ -851,7 +851,7 @@ describe('imageExif', function () { ...@@ -851,7 +851,7 @@ describe('imageExif', function () {
}) })
/** /**
* @tc.number : TC_173-6 * @tc.number : SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0700
* @tc.name : getImageProperty(GPSLatitudeRef,property)-callback * @tc.name : getImageProperty(GPSLatitudeRef,property)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set property * 2.set property
...@@ -861,22 +861,22 @@ describe('imageExif', function () { ...@@ -861,22 +861,22 @@ describe('imageExif', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_173-6', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0700', 0, async function (done) {
await getFd('test_exif.jpg'); await getFd('test_exif.jpg');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_173-6 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0700 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
let property = { index: 0, defaultValue: '9999' } let property = { index: 0, defaultValue: '9999' }
imageSourceApi.getImageProperty("GPSLatitudeRef", property, (error, data) => { imageSourceApi.getImageProperty("GPSLatitudeRef", property, (error, data) => {
if (error) { if (error) {
console.info('TC_173-6 getImageProperty GPSLatitudeRef error'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0700 getImageProperty GPSLatitudeRef error');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
console.info('TC_173-6 GPSLatitudeRef ' + data); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0700 GPSLatitudeRef ' + data);
expect(data != '9999' && data != undefined && data != '').assertTrue(); expect(data != '9999' && data != undefined && data != '').assertTrue();
done(); done();
} }
...@@ -885,7 +885,7 @@ describe('imageExif', function () { ...@@ -885,7 +885,7 @@ describe('imageExif', function () {
}) })
/** /**
* @tc.number : TC_173-7 * @tc.number : SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0800
* @tc.name : getImageProperty(GPSLongitudeRef,property)-callback * @tc.name : getImageProperty(GPSLongitudeRef,property)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set property * 2.set property
...@@ -895,22 +895,22 @@ describe('imageExif', function () { ...@@ -895,22 +895,22 @@ describe('imageExif', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_173-7', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0800', 0, async function (done) {
await getFd('test_exif.jpg'); await getFd('test_exif.jpg');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_173-7 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0800 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
let property = { index: 0, defaultValue: '9999' } let property = { index: 0, defaultValue: '9999' }
imageSourceApi.getImageProperty("GPSLongitudeRef", property, (error, data) => { imageSourceApi.getImageProperty("GPSLongitudeRef", property, (error, data) => {
if (error) { if (error) {
console.info('TC_173-7 getImageProperty GPSLongitudeRef error'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0800 getImageProperty GPSLongitudeRef error');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
console.info('TC_173-7 GPSLongitudeRef ' + data); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0800 GPSLongitudeRef ' + data);
expect(data != '9999' && data != undefined && data != '').assertTrue(); expect(data != '9999' && data != undefined && data != '').assertTrue();
done(); done();
} }
...@@ -919,7 +919,7 @@ describe('imageExif', function () { ...@@ -919,7 +919,7 @@ describe('imageExif', function () {
}) })
/** /**
* @tc.number : TC_173-8 * @tc.number : SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0900
* @tc.name : getImageProperty(DateTimeOriginal,property)-callback * @tc.name : getImageProperty(DateTimeOriginal,property)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set property * 2.set property
...@@ -929,22 +929,22 @@ describe('imageExif', function () { ...@@ -929,22 +929,22 @@ describe('imageExif', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_173-8', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0900', 0, async function (done) {
await getFd('test_exif.jpg'); await getFd('test_exif.jpg');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_173-8 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0900 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
let property = { index: 0, defaultValue: '9999' } let property = { index: 0, defaultValue: '9999' }
imageSourceApi.getImageProperty("DateTimeOriginal", property, (error, data) => { imageSourceApi.getImageProperty("DateTimeOriginal", property, (error, data) => {
if (error) { if (error) {
console.info('TC_173-8 getImageProperty DateTimeOriginal error'); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0900 getImageProperty DateTimeOriginal error');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
console.info('TC_173-8 DateTimeOriginal ' + data); console.info('SUB_GRAPHIC_IMAGE_EXIF_GETIMAGEPROPERTY_PROPERTY_CALLBACK_0900 DateTimeOriginal ' + data);
expect(data != '9999' && data != undefined && data != '').assertTrue(); expect(data != '9999' && data != undefined && data != '').assertTrue();
done(); done();
} }
......
...@@ -29,7 +29,7 @@ describe('imageModifyProperty', function () { ...@@ -29,7 +29,7 @@ describe('imageModifyProperty', function () {
filePath = data + '/' + fileName; filePath = data + '/' + fileName;
console.info('image case filePath is ' + filePath); console.info('image case filePath is ' + filePath);
}) })
await fileio.open(filePath, 0o2 | 0o100, 0o777).then((data) => { await fileio.open(filePath, 0o2, 0o777).then((data) => {
fdNumber = data; fdNumber = data;
console.info("image case open fd success " + fdNumber); console.info("image case open fd success " + fdNumber);
}, (err) => { }, (err) => {
...@@ -242,7 +242,7 @@ describe('imageModifyProperty', function () { ...@@ -242,7 +242,7 @@ describe('imageModifyProperty', function () {
} }
/** /**
* @tc.number : modify_01_001 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_0100
* @tc.name : modifyImageProperty(Orientation)-promise * @tc.name : modifyImageProperty(Orientation)-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
...@@ -251,15 +251,15 @@ describe('imageModifyProperty', function () { ...@@ -251,15 +251,15 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_01_001', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_0100', 0, async function (done) {
function checkProps(result){ function checkProps(result){
expect(result == 'Top-right').assertTrue(); expect(result == 'Top-right').assertTrue();
} }
modifyPromise(done, 'modify_01_001', 'buffer', "Orientation", "2", checkProps); modifyPromise(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_0100', 'buffer', "Orientation", "2", checkProps);
}) })
/** /**
* @tc.number : modify_01_002 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_0200
* @tc.name : modifyImageProperty(GPSLatitude)-promise * @tc.name : modifyImageProperty(GPSLatitude)-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
...@@ -268,15 +268,15 @@ describe('imageModifyProperty', function () { ...@@ -268,15 +268,15 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_01_002', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_0200', 0, async function (done) {
function checkProps(result){ function checkProps(result){
expect(result.search("38") != -1).assertTrue(); expect(result.search("38") != -1).assertTrue();
} }
modifyPromise(done, 'modify_01_002', 'buffer', "GPSLatitude", "114,3", checkProps); modifyPromise(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_0200', 'buffer', "GPSLatitude", "114,3", checkProps);
}) })
/** /**
* @tc.number : modify_01_003 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_0300
* @tc.name : modifyImageProperty(GPSLongitude)-promise * @tc.name : modifyImageProperty(GPSLongitude)-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
...@@ -285,15 +285,15 @@ describe('imageModifyProperty', function () { ...@@ -285,15 +285,15 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_01_003', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_0300', 0, async function (done) {
function checkProps(result){ function checkProps(result){
expect(result.search("9") != -1).assertTrue(); expect(result.search("9") != -1).assertTrue();
} }
modifyPromise(done, 'modify_01_003', 'buffer', "GPSLongitude", "18,2", checkProps); modifyPromise(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_0300', 'buffer', "GPSLongitude", "18,2", checkProps);
}) })
/** /**
* @tc.number : modify_01_004 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_0400
* @tc.name : modifyImageProperty(GPSLatitudeRef)-promise * @tc.name : modifyImageProperty(GPSLatitudeRef)-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
...@@ -302,15 +302,15 @@ describe('imageModifyProperty', function () { ...@@ -302,15 +302,15 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_01_004', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_0400', 0, async function (done) {
function checkProps(result){ function checkProps(result){
expect(result == 'N').assertTrue(); expect(result == 'N').assertTrue();
} }
modifyPromise(done, 'modify_01_004', 'buffer', "GPSLatitudeRef", "N", checkProps); modifyPromise(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_0400', 'buffer', "GPSLatitudeRef", "N", checkProps);
}) })
/** /**
* @tc.number : modify_01_005 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_0500
* @tc.name : modifyImageProperty(GPSLongitudeRef)-promise * @tc.name : modifyImageProperty(GPSLongitudeRef)-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
...@@ -319,15 +319,15 @@ describe('imageModifyProperty', function () { ...@@ -319,15 +319,15 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_01_005', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_0500', 0, async function (done) {
function checkProps(result){ function checkProps(result){
expect(result == 'W').assertTrue(); expect(result == 'W').assertTrue();
} }
modifyPromise(done, 'modify_01_005', 'buffer', "GPSLongitudeRef", "W", checkProps); modifyPromise(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_0500', 'buffer', "GPSLongitudeRef", "W", checkProps);
}) })
/** /**
* @tc.number : modify_01_006 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_0600
* @tc.name : modifyImageProperty(Orientation)-promise * @tc.name : modifyImageProperty(Orientation)-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
...@@ -336,15 +336,15 @@ describe('imageModifyProperty', function () { ...@@ -336,15 +336,15 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_01_006', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_0600', 0, async function (done) {
function checkProps(result){ function checkProps(result){
expect(result == 'Top-right').assertTrue(); expect(result == 'Top-right').assertTrue();
} }
modifyPromise(done, 'modify_01_006', 'fd', "Orientation", "2", checkProps) modifyPromise(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_0600', 'fd', "Orientation", "2", checkProps)
}) })
/** /**
* @tc.number : modify_01_007 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_0700
* @tc.name : modifyImageProperty(GPSLatitude)-promise * @tc.name : modifyImageProperty(GPSLatitude)-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
...@@ -353,15 +353,15 @@ describe('imageModifyProperty', function () { ...@@ -353,15 +353,15 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_01_007', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_0700', 0, async function (done) {
function checkProps(result){ function checkProps(result){
expect(result.search("38") != -1).assertTrue(); expect(result.search("38") != -1).assertTrue();
} }
modifyPromise(done, 'modify_01_007', 'fd', "GPSLatitude", "114,3", checkProps); modifyPromise(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_0700', 'fd', "GPSLatitude", "114,3", checkProps);
}) })
/** /**
* @tc.number : modify_01_008 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_0800
* @tc.name : modifyImageProperty(GPSLongitude)-promise * @tc.name : modifyImageProperty(GPSLongitude)-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
...@@ -370,15 +370,15 @@ describe('imageModifyProperty', function () { ...@@ -370,15 +370,15 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_01_008', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_0800', 0, async function (done) {
function checkProps(result){ function checkProps(result){
expect(result.search("9") != -1).assertTrue(); expect(result.search("9") != -1).assertTrue();
} }
modifyPromise(done, 'modify_01_008', 'fd', "GPSLongitude", "18,2", checkProps); modifyPromise(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_0800', 'fd', "GPSLongitude", "18,2", checkProps);
}) })
/** /**
* @tc.number : modify_01_009 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_0900
* @tc.name : modifyImageProperty(GPSLatitudeRef)-promise * @tc.name : modifyImageProperty(GPSLatitudeRef)-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
...@@ -387,15 +387,15 @@ describe('imageModifyProperty', function () { ...@@ -387,15 +387,15 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_01_009', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_0900', 0, async function (done) {
function checkProps(result){ function checkProps(result){
expect(result == 'N').assertTrue(); expect(result == 'N').assertTrue();
} }
modifyPromise(done, 'modify_01_009', 'fd', "GPSLatitudeRef", "N", checkProps); modifyPromise(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_0900', 'fd', "GPSLatitudeRef", "N", checkProps);
}) })
/** /**
* @tc.number : modify_01_010 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_1000
* @tc.name : modifyImageProperty(GPSLongitudeRef)-promise * @tc.name : modifyImageProperty(GPSLongitudeRef)-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
...@@ -404,15 +404,15 @@ describe('imageModifyProperty', function () { ...@@ -404,15 +404,15 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_01_010', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_1000', 0, async function (done) {
function checkProps(result){ function checkProps(result){
expect(result == 'W').assertTrue(); expect(result == 'W').assertTrue();
} }
modifyPromise(done, 'modify_01_010', 'fd', "GPSLongitudeRef", "W", checkProps); modifyPromise(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_1000', 'fd', "GPSLongitudeRef", "W", checkProps);
}) })
/** /**
* @tc.number : modify_02_001 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_0100
* @tc.name : modifyImageProperty(Orientation)-callback * @tc.name : modifyImageProperty(Orientation)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
...@@ -421,15 +421,15 @@ describe('imageModifyProperty', function () { ...@@ -421,15 +421,15 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_02_001', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_0100', 0, async function (done) {
function checkProps(result){ function checkProps(result){
expect(result == 'Top-right').assertTrue(); expect(result == 'Top-right').assertTrue();
} }
modifyCb(done, 'modify_02_001', 'buffer', "Orientation", "2", checkProps); modifyCb(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_0100', 'buffer', "Orientation", "2", checkProps);
}) })
/** /**
* @tc.number : modify_02_002 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_0200
* @tc.name : modifyImageProperty(GPSLatitude)-callback * @tc.name : modifyImageProperty(GPSLatitude)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
...@@ -438,15 +438,15 @@ describe('imageModifyProperty', function () { ...@@ -438,15 +438,15 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_02_002', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_0200', 0, async function (done) {
function checkProps(result){ function checkProps(result){
expect(result.search("38") != -1).assertTrue(); expect(result.search("38") != -1).assertTrue();
} }
modifyCb(done, 'modify_02_002', 'buffer', "GPSLatitude", "114,3", checkProps); modifyCb(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_0200', 'buffer', "GPSLatitude", "114,3", checkProps);
}) })
/** /**
* @tc.number : modify_02_003 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_0300
* @tc.name : modifyImageProperty(GPSLongitude)-callback * @tc.name : modifyImageProperty(GPSLongitude)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
...@@ -455,15 +455,15 @@ describe('imageModifyProperty', function () { ...@@ -455,15 +455,15 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_02_003', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_0300', 0, async function (done) {
function checkProps(result){ function checkProps(result){
expect(result.search("9") != -1).assertTrue(); expect(result.search("9") != -1).assertTrue();
} }
modifyCb(done, 'modify_02_003', 'buffer', "GPSLongitude", "18,2", checkProps); modifyCb(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_0300', 'buffer', "GPSLongitude", "18,2", checkProps);
}) })
/** /**
* @tc.number : modify_02_004 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_0400
* @tc.name : modifyImageProperty(GPSLatitudeRef)-callback * @tc.name : modifyImageProperty(GPSLatitudeRef)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
...@@ -472,15 +472,15 @@ describe('imageModifyProperty', function () { ...@@ -472,15 +472,15 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_02_004', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_0400', 0, async function (done) {
function checkProps(result){ function checkProps(result){
expect(result == "N").assertTrue(); expect(result == "N").assertTrue();
} }
modifyCb(done, 'modify_02_004', 'buffer', "GPSLatitudeRef", "N", checkProps); modifyCb(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_0400', 'buffer', "GPSLatitudeRef", "N", checkProps);
}) })
/** /**
* @tc.number :modify_02_005 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_0500
* @tc.name : modifyImageProperty(GPSLongitudeRef)-callback * @tc.name : modifyImageProperty(GPSLongitudeRef)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
...@@ -489,15 +489,15 @@ describe('imageModifyProperty', function () { ...@@ -489,15 +489,15 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_02_005', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_0500', 0, async function (done) {
function checkProps(result){ function checkProps(result){
expect(result == "W").assertTrue(); expect(result == "W").assertTrue();
} }
modifyCb(done, 'modify_02_005', 'buffer', "GPSLongitudeRef", "W", checkProps); modifyCb(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_0500', 'buffer', "GPSLongitudeRef", "W", checkProps);
}) })
/** /**
* @tc.number : modify_02_006 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_0600
* @tc.name : modifyImageProperty(Orientation)-callback * @tc.name : modifyImageProperty(Orientation)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
...@@ -506,15 +506,15 @@ describe('imageModifyProperty', function () { ...@@ -506,15 +506,15 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_02_006', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_0600', 0, async function (done) {
function checkProps(result){ function checkProps(result){
expect(result == 'Top-right').assertTrue(); expect(result == 'Top-right').assertTrue();
} }
modifyCb(done, 'modify_02_006', 'fd', "Orientation", "2", checkProps); modifyCb(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_0600', 'fd', "Orientation", "2", checkProps);
}) })
/** /**
* @tc.number : modify_02_007 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_0700
* @tc.name : modifyImageProperty(GPSLatitude)-callback * @tc.name : modifyImageProperty(GPSLatitude)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
...@@ -523,15 +523,15 @@ describe('imageModifyProperty', function () { ...@@ -523,15 +523,15 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_02_007', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_0700', 0, async function (done) {
function checkProps(result){ function checkProps(result){
expect(result.search("38") != -1).assertTrue(); expect(result.search("38") != -1).assertTrue();
} }
modifyCb(done, 'modify_02_007', 'fd', "GPSLatitude", "114,3", checkProps); modifyCb(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_0700', 'fd', "GPSLatitude", "114,3", checkProps);
}) })
/** /**
* @tc.number : modify_02_008 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_0800
* @tc.name : modifyImageProperty(GPSLongitude)-callback * @tc.name : modifyImageProperty(GPSLongitude)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
...@@ -540,15 +540,15 @@ describe('imageModifyProperty', function () { ...@@ -540,15 +540,15 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_02_008', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_0800', 0, async function (done) {
function checkProps(result){ function checkProps(result){
expect(result.search("9") != -1).assertTrue(); expect(result.search("9") != -1).assertTrue();
} }
modifyCb(done, 'modify_02_008', 'fd', "GPSLongitude", "18,2", checkProps); modifyCb(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_0800', 'fd', "GPSLongitude", "18,2", checkProps);
}) })
/** /**
* @tc.number : modify_02_009 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_0900
* @tc.name : modifyImageProperty(GPSLatitudeRef)-callback * @tc.name : modifyImageProperty(GPSLatitudeRef)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
...@@ -557,15 +557,15 @@ describe('imageModifyProperty', function () { ...@@ -557,15 +557,15 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_02_009', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_0900', 0, async function (done) {
function checkProps(result){ function checkProps(result){
expect(result == "N").assertTrue(); expect(result == "N").assertTrue();
} }
modifyCb(done, 'modify_02_009', 'fd', "GPSLatitudeRef", "N", checkProps); modifyCb(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_0900', 'fd', "GPSLatitudeRef", "N", checkProps);
}) })
/** /**
* @tc.number : modify_02_010 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_1000
* @tc.name : modifyImageProperty(GPSLongitudeRef)-callback * @tc.name : modifyImageProperty(GPSLongitudeRef)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
...@@ -574,15 +574,15 @@ describe('imageModifyProperty', function () { ...@@ -574,15 +574,15 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_02_010', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_1000', 0, async function (done) {
function checkProps(result){ function checkProps(result){
expect(result == "W").assertTrue(); expect(result == "W").assertTrue();
} }
modifyCb(done, 'modify_02_010', 'fd', "GPSLongitudeRef", "W", checkProps); modifyCb(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_1000', 'fd', "GPSLongitudeRef", "W", checkProps);
}) })
/** /**
* @tc.number : modify_03_001 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROPERTY_CALLBACK_0100
* @tc.name : modifyImageProperty(Orientation,property)-callback * @tc.name : modifyImageProperty(Orientation,property)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value,options) * 2.call modifyImageProperty(key,value,options)
...@@ -591,15 +591,15 @@ describe('imageModifyProperty', function () { ...@@ -591,15 +591,15 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_03_001', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROPERTY_CALLBACK_0100', 0, async function (done) {
function checkProps(result){ function checkProps(result){
expect(result == 'Top-right').assertTrue(); expect(result == 'Top-right').assertTrue();
} }
modifyCb1(done, 'modify_03_001', 'buffer', "Orientation", "2", checkProps); modifyCb1(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROPERTY_CALLBACK_0100', 'buffer', "Orientation", "2", checkProps);
}) })
/** /**
* @tc.number : modify_03_002 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROPERTY_CALLBACK_0200
* @tc.name : modifyImageProperty(GPSLatitude,property)-callback * @tc.name : modifyImageProperty(GPSLatitude,property)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value,options) * 2.call modifyImageProperty(key,value,options)
...@@ -608,15 +608,15 @@ describe('imageModifyProperty', function () { ...@@ -608,15 +608,15 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_03_002', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROPERTY_CALLBACK_0200', 0, async function (done) {
function checkProps(result){ function checkProps(result){
expect(result.search("38") != -1).assertTrue(); expect(result.search("38") != -1).assertTrue();
} }
modifyCb1(done, 'modify_03_002', 'buffer', "GPSLatitude", "114,3", checkProps); modifyCb1(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROPERTY_CALLBACK_0200', 'buffer', "GPSLatitude", "114,3", checkProps);
}) })
/** /**
* @tc.number : modify_03_003 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROPERTY_CALLBACK_0300
* @tc.name : modifyImageProperty(GPSLongitude,property)-callback * @tc.name : modifyImageProperty(GPSLongitude,property)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value,options) * 2.call modifyImageProperty(key,value,options)
...@@ -625,15 +625,15 @@ describe('imageModifyProperty', function () { ...@@ -625,15 +625,15 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_03_003', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROPERTY_CALLBACK_0300', 0, async function (done) {
function checkProps(result){ function checkProps(result){
expect(result.search("9") != -1).assertTrue(); expect(result.search("9") != -1).assertTrue();
} }
modifyCb1(done, 'modify_03_003', 'buffer', "GPSLongitude", "18,2", checkProps); modifyCb1(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROPERTY_CALLBACK_0300', 'buffer', "GPSLongitude", "18,2", checkProps);
}) })
/** /**
* @tc.number : modify_03_004 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROPERTY_CALLBACK_0400
* @tc.name : modifyImageProperty(GPSLatitudeRef,property)-callback * @tc.name : modifyImageProperty(GPSLatitudeRef,property)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value,options) * 2.call modifyImageProperty(key,value,options)
...@@ -642,15 +642,15 @@ describe('imageModifyProperty', function () { ...@@ -642,15 +642,15 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_03_004', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROPERTY_CALLBACK_0400', 0, async function (done) {
function checkProps(result){ function checkProps(result){
expect(result == "N").assertTrue(); expect(result == "N").assertTrue();
} }
modifyCb1(done, 'modify_03_004', 'buffer', "GPSLatitudeRef", "N", checkProps); modifyCb1(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROPERTY_CALLBACK_0400', 'buffer', "GPSLatitudeRef", "N", checkProps);
}) })
/** /**
* @tc.number : modify_03_005 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROPERTY_CALLBACK_0500
* @tc.name : modifyImageProperty(GPSLongitudeRef,property)-callback * @tc.name : modifyImageProperty(GPSLongitudeRef,property)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value,options) * 2.call modifyImageProperty(key,value,options)
...@@ -659,15 +659,15 @@ describe('imageModifyProperty', function () { ...@@ -659,15 +659,15 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_03_005', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROPERTY_CALLBACK_0500', 0, async function (done) {
function checkProps(result){ function checkProps(result){
expect(result == "W").assertTrue(); expect(result == "W").assertTrue();
} }
modifyCb1(done, 'modify_03_005', 'buffer', "GPSLongitudeRef", "W", checkProps); modifyCb1(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROPERTY_CALLBACK_0500', 'buffer', "GPSLongitudeRef", "W", checkProps);
}) })
/** /**
* @tc.number : modify_03_006 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROPERTY_CALLBACK_0600
* @tc.name : modifyImageProperty(Orientation,property)-callback * @tc.name : modifyImageProperty(Orientation,property)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value,options) * 2.call modifyImageProperty(key,value,options)
...@@ -676,15 +676,15 @@ describe('imageModifyProperty', function () { ...@@ -676,15 +676,15 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_03_006', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROPERTY_CALLBACK_0600', 0, async function (done) {
function checkProps(result){ function checkProps(result){
expect(result == 'Top-right').assertTrue(); expect(result == 'Top-right').assertTrue();
} }
modifyCb1(done, 'modify_03_006', 'fd', "Orientation", "2", checkProps); modifyCb1(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROPERTY_CALLBACK_0600', 'fd', "Orientation", "2", checkProps);
}) })
/** /**
* @tc.number : modify_03_007 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROPERTY_CALLBACK_0700
* @tc.name : modifyImageProperty(GPSLatitude,property)-callback * @tc.name : modifyImageProperty(GPSLatitude,property)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value,options) * 2.call modifyImageProperty(key,value,options)
...@@ -693,15 +693,15 @@ describe('imageModifyProperty', function () { ...@@ -693,15 +693,15 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_03_007', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROPERTY_CALLBACK_0700', 0, async function (done) {
function checkProps(result){ function checkProps(result){
expect(result.search("38") != -1).assertTrue(); expect(result.search("38") != -1).assertTrue();
} }
modifyCb1(done, 'modify_03_007', 'fd', "GPSLatitude", "114,3", checkProps); modifyCb1(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROPERTY_CALLBACK_0700', 'fd', "GPSLatitude", "114,3", checkProps);
}) })
/** /**
* @tc.number : modify_03_008 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROPERTY_CALLBACK_0800
* @tc.name : modifyImageProperty(GPSLongitude,property)-callback * @tc.name : modifyImageProperty(GPSLongitude,property)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value,options) * 2.call modifyImageProperty(key,value,options)
...@@ -710,15 +710,15 @@ describe('imageModifyProperty', function () { ...@@ -710,15 +710,15 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_03_008', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROPERTY_CALLBACK_0800', 0, async function (done) {
function checkProps(result){ function checkProps(result){
expect(result.search("9") != -1).assertTrue(); expect(result.search("9") != -1).assertTrue();
} }
modifyCb1(done, 'modify_03_008', 'fd', "GPSLongitude", "18,2", checkProps); modifyCb1(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROPERTY_CALLBACK_0800', 'fd', "GPSLongitude", "18,2", checkProps);
}) })
/** /**
* @tc.number : modify_03_009 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROPERTY_CALLBACK_0900
* @tc.name : modifyImageProperty(GPSLatitudeRef,property)-callback * @tc.name : modifyImageProperty(GPSLatitudeRef,property)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value,options) * 2.call modifyImageProperty(key,value,options)
...@@ -727,15 +727,15 @@ describe('imageModifyProperty', function () { ...@@ -727,15 +727,15 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_03_009', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROPERTY_CALLBACK_0900', 0, async function (done) {
function checkProps(result){ function checkProps(result){
expect(result == "N").assertTrue(); expect(result == "N").assertTrue();
} }
modifyCb1(done, 'modify_03_009', 'fd', "GPSLatitudeRef", "N", checkProps); modifyCb1(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROPERTY_CALLBACK_0900', 'fd', "GPSLatitudeRef", "N", checkProps);
}) })
/** /**
* @tc.number : modify_03_010 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROPERTY_CALLBACK_1000
* @tc.name : modifyImageProperty(GPSLongitudeRef,property)-callback * @tc.name : modifyImageProperty(GPSLongitudeRef,property)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value,options) * 2.call modifyImageProperty(key,value,options)
...@@ -744,15 +744,15 @@ describe('imageModifyProperty', function () { ...@@ -744,15 +744,15 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_03_010', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROPERTY_CALLBACK_1000', 0, async function (done) {
function checkProps(result){ function checkProps(result){
expect(result == "W").assertTrue(); expect(result == "W").assertTrue();
} }
modifyCb1(done, 'modify_03_010', 'fd', "GPSLongitudeRef", "W", checkProps); modifyCb1(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROPERTY_CALLBACK_1000', 'fd', "GPSLongitudeRef", "W", checkProps);
}) })
/** /**
* @tc.number : modify_01_011 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_1100
* @tc.name : modifyImageProperty(Orientation)-promise * @tc.name : modifyImageProperty(Orientation)-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
...@@ -761,12 +761,12 @@ describe('imageModifyProperty', function () { ...@@ -761,12 +761,12 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_01_011', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_1100', 0, async function (done) {
modifyImageErrPromise(done, 'modify_01_011', 'fd', "Orientation", "abcdef") modifyImageErrPromise(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_1100', 'fd', "Orientation", "abcdef")
}) })
/** /**
* @tc.number : modify_01_012 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_1200
* @tc.name : modifyImageProperty(GPSLatitude)-promise * @tc.name : modifyImageProperty(GPSLatitude)-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
...@@ -775,12 +775,12 @@ describe('imageModifyProperty', function () { ...@@ -775,12 +775,12 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_01_012', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_1200', 0, async function (done) {
modifyImageErrPromise(done, 'modify_01_012', 'fd', "GPSLatitude", "abc,3") modifyImageErrPromise(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_1200', 'fd', "GPSLatitude", "abc,3")
}) })
/** /**
* @tc.number : modify_01_013 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_1300
* @tc.name : modifyImageProperty(GPSLongitude)-promise * @tc.name : modifyImageProperty(GPSLongitude)-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
...@@ -789,12 +789,12 @@ describe('imageModifyProperty', function () { ...@@ -789,12 +789,12 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_01_013', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_1300', 0, async function (done) {
modifyImageErrPromise(done, 'modify_01_013', 'fd', "GPSLongitude", "abc,2") modifyImageErrPromise(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_1300', 'fd', "GPSLongitude", "abc,2")
}) })
/** /**
* @tc.number : modify_01_014 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_1400
* @tc.name : modifyImageProperty(GPSLatitudeRef)-promise * @tc.name : modifyImageProperty(GPSLatitudeRef)-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
...@@ -803,12 +803,12 @@ describe('imageModifyProperty', function () { ...@@ -803,12 +803,12 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_01_014', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_1400', 0, async function (done) {
modifyImageErrPromise(done, 'modify_01_014', 'fd', "GPSLatitudeRef", "456") modifyImageErrPromise(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_1400', 'fd', "GPSLatitudeRef", "456")
}) })
/** /**
* @tc.number : modify_01_015 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_1500
* @tc.name : modifyImageProperty(GPSLongitudeRef)-promise * @tc.name : modifyImageProperty(GPSLongitudeRef)-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
...@@ -817,13 +817,13 @@ describe('imageModifyProperty', function () { ...@@ -817,13 +817,13 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_01_015', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_1500', 0, async function (done) {
modifyImageErrPromise(done, 'modify_01_015', 'fd', "GPSLongitudeRef", "1234") modifyImageErrPromise(done, 'SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_1500', 'fd', "GPSLongitudeRef", "1234")
}) })
/** /**
* @tc.number : modify_01_016 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_1600
* @tc.name : modifyImageProperty()-promise * @tc.name : modifyImageProperty(Orientation)-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
* 3.return undefined * 3.return undefined
...@@ -831,13 +831,13 @@ describe('imageModifyProperty', function () { ...@@ -831,13 +831,13 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_01_016', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_1600', 0, async function (done) {
modifyImageErrPromise(done, "modify_01_016", "buffer", "Orientation", "abcdef") modifyImageErrPromise(done, "SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_1600", "buffer", "Orientation", "abcdef")
}) })
/** /**
* @tc.number : modify_01_017 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_1700
* @tc.name : modifyImageProperty()-promise * @tc.name : modifyImageProperty(GPSLatitude)-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
* 3.return undefined * 3.return undefined
...@@ -845,13 +845,13 @@ describe('imageModifyProperty', function () { ...@@ -845,13 +845,13 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_01_017', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_1700', 0, async function (done) {
modifyImageErrPromise(done, "modify_01_017", "buffer", "GPSLatitude", "abc,3") modifyImageErrPromise(done, "SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_1700", "buffer", "GPSLatitude", "abc,3")
}) })
/** /**
* @tc.number : modify_01_018 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_1800
* @tc.name : modifyImageProperty()-promise * @tc.name : modifyImageProperty(GPSLongitude)-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
* 3.return undefined * 3.return undefined
...@@ -859,13 +859,13 @@ describe('imageModifyProperty', function () { ...@@ -859,13 +859,13 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_01_018', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_1800', 0, async function (done) {
modifyImageErrPromise(done, "modify_01_018", "buffer", "GPSLongitude", "abc,2") modifyImageErrPromise(done, "SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_1800", "buffer", "GPSLongitude", "abc,2")
}) })
/** /**
* @tc.number : modify_01_019 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_1900
* @tc.name : modifyImageProperty()-promise * @tc.name : modifyImageProperty(GPSLatitudeRef)-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
* 3.return undefined * 3.return undefined
...@@ -873,13 +873,13 @@ describe('imageModifyProperty', function () { ...@@ -873,13 +873,13 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_01_019', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_1900', 0, async function (done) {
modifyImageErrPromise(done, "modify_01_019", "buffer", "GPSLatitudeRef", "456") modifyImageErrPromise(done, "SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_1900", "buffer", "GPSLatitudeRef", "456")
}) })
/** /**
* @tc.number : modify_01_020 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_2000
* @tc.name : modifyImageProperty()-promise * @tc.name : modifyImageProperty(GPSLongitudeRef)-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
* 3.return undefined * 3.return undefined
...@@ -887,13 +887,13 @@ describe('imageModifyProperty', function () { ...@@ -887,13 +887,13 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_01_020', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_2000', 0, async function (done) {
modifyImageErrPromise(done, "modify_01_020", "buffer", "GPSLongitudeRef", "1234") modifyImageErrPromise(done, "SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_PROMISE_2000", "buffer", "GPSLongitudeRef", "1234")
}) })
/** /**
* @tc.number : modify_02_011 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_1100
* @tc.name : modifyImageProperty-callback * @tc.name : modifyImageProperty(Orientation)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
* 3.return undefined * 3.return undefined
...@@ -901,13 +901,13 @@ describe('imageModifyProperty', function () { ...@@ -901,13 +901,13 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_02_011', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_1100', 0, async function (done) {
modifyErrCb(done, "modify_02_011", "fd", "Orientation", "abcdef") modifyErrCb(done, "SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_1100", "fd", "Orientation", "abcdef")
}) })
/** /**
* @tc.number : modify_02_012 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_1200
* @tc.name : modifyImageProperty-callback * @tc.name : modifyImageProperty(GPSLatitude)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
* 3.return undefined * 3.return undefined
...@@ -915,13 +915,13 @@ describe('imageModifyProperty', function () { ...@@ -915,13 +915,13 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_02_012', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_1200', 0, async function (done) {
modifyErrCb(done, "modify_02_012", "fd", "GPSLatitude", "abc,3") modifyErrCb(done, "SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_1200", "fd", "GPSLatitude", "abc,3")
}) })
/** /**
* @tc.number : modify_02_013 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_1300
* @tc.name : modifyImageProperty-callback * @tc.name : modifyImageProperty(GPSLongitude)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
* 3.return undefined * 3.return undefined
...@@ -929,13 +929,13 @@ describe('imageModifyProperty', function () { ...@@ -929,13 +929,13 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_02_013', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_1300', 0, async function (done) {
modifyErrCb(done, "modify_02_013", "fd", "GPSLongitude", "abc,2") modifyErrCb(done, "SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_1300", "fd", "GPSLongitude", "abc,2")
}) })
/** /**
* @tc.number : modify_02_014 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_1400
* @tc.name : modifyImageProperty-callback * @tc.name : modifyImageProperty(GPSLongitudeRef)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
* 3.return undefined * 3.return undefined
...@@ -943,13 +943,13 @@ describe('imageModifyProperty', function () { ...@@ -943,13 +943,13 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_02_014', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_1400', 0, async function (done) {
modifyErrCb(done, "modify_02_014", "fd", "GPSLongitudeRef", "1234") modifyErrCb(done, "SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_1400", "fd", "GPSLongitudeRef", "1234")
}) })
/** /**
* @tc.number : modify_02_015 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_1500
* @tc.name : modifyImageProperty-callback * @tc.name : modifyImageProperty(GPSLatitudeRef)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
* 3.return undefined * 3.return undefined
...@@ -957,13 +957,13 @@ describe('imageModifyProperty', function () { ...@@ -957,13 +957,13 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_02_015', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_1500', 0, async function (done) {
modifyErrCb(done, "modify_02_015", "fd", "GPSLatitudeRef", "456") modifyErrCb(done, "SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_1500", "fd", "GPSLatitudeRef", "456")
}) })
/** /**
* @tc.number : modify_02_016 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_1600
* @tc.name : modifyImageProperty-callback * @tc.name : modifyImageProperty(Orientation)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
* 3.return undefined * 3.return undefined
...@@ -971,13 +971,13 @@ describe('imageModifyProperty', function () { ...@@ -971,13 +971,13 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_02_016', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_1600', 0, async function (done) {
modifyErrCb(done, "modify_02_016", "buffer", "Orientation", "abcdef") modifyErrCb(done, "SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_1600", "buffer", "Orientation", "abcdef")
}) })
/** /**
* @tc.number : modify_02_017 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_1700
* @tc.name : modifyImageProperty-callback * @tc.name : modifyImageProperty(GPSLatitude)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
* 3.return undefined * 3.return undefined
...@@ -985,13 +985,13 @@ describe('imageModifyProperty', function () { ...@@ -985,13 +985,13 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_02_017', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_1700', 0, async function (done) {
modifyErrCb(done, "modify_02_017", "buffer", "GPSLatitude", "abc,3") modifyErrCb(done, "SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_1700", "buffer", "GPSLatitude", "abc,3")
}) })
/** /**
* @tc.number : modify_02_018 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_1800
* @tc.name : modifyImageProperty-callback * @tc.name : modifyImageProperty(GPSLongitude)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
* 3.return undefined * 3.return undefined
...@@ -999,13 +999,13 @@ describe('imageModifyProperty', function () { ...@@ -999,13 +999,13 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_02_018', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_1800', 0, async function (done) {
modifyErrCb(done, "modify_02_018", "buffer", "GPSLongitude", "abc,2") modifyErrCb(done, "SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_1800", "buffer", "GPSLongitude", "abc,2")
}) })
/** /**
* @tc.number : modify_02_019 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_1900
* @tc.name : modifyImageProperty-callback * @tc.name : modifyImageProperty(GPSLongitudeRef)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
* 3.return undefined * 3.return undefined
...@@ -1013,13 +1013,13 @@ describe('imageModifyProperty', function () { ...@@ -1013,13 +1013,13 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_02_019', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_1900', 0, async function (done) {
modifyErrCb(done, "modify_02_019", "buffer", "GPSLongitudeRef", "1234") modifyErrCb(done, "SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_1900", "buffer", "GPSLongitudeRef", "1234")
}) })
/** /**
* @tc.number : modify_02_020 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_2000
* @tc.name : modifyImageProperty-callback * @tc.name : modifyImageProperty(GPSLatitudeRef)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
* 3.return undefined * 3.return undefined
...@@ -1027,13 +1027,13 @@ describe('imageModifyProperty', function () { ...@@ -1027,13 +1027,13 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_02_020', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_2000', 0, async function (done) {
modifyErrCb(done, "modify_02_020", "buffer", "GPSLatitudeRef", "456") modifyErrCb(done, "SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_2000", "buffer", "GPSLatitudeRef", "456")
}) })
/** /**
* @tc.number : modify_03_011 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_2100
* @tc.name : modifyImageProperty()-callback * @tc.name : modifyImageProperty(Orientation)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
* 3.return undefined * 3.return undefined
...@@ -1041,13 +1041,13 @@ describe('imageModifyProperty', function () { ...@@ -1041,13 +1041,13 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_03_011', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_2100', 0, async function (done) {
modifyErrCb1(done, "modify_03_011", "fd", "Orientation", "abcdef") modifyErrCb1(done, "SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_2100", "fd", "Orientation", "abcdef")
}) })
/** /**
* @tc.number : modify_03_012 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_2200
* @tc.name : modifyImageProperty()-callback * @tc.name : modifyImageProperty(GPSLatitude)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
* 3.return undefined * 3.return undefined
...@@ -1055,13 +1055,13 @@ describe('imageModifyProperty', function () { ...@@ -1055,13 +1055,13 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_03_012', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_2200', 0, async function (done) {
modifyErrCb1(done, "modify_03_012", "fd", "GPSLatitude", "abc,3") modifyErrCb1(done, "SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_2200", "fd", "GPSLatitude", "abc,3")
}) })
/** /**
* @tc.number : modify_03_013 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_2300
* @tc.name : modifyImageProperty()-callback * @tc.name : modifyImageProperty(GPSLongitude)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
* 3.return undefined * 3.return undefined
...@@ -1069,13 +1069,13 @@ describe('imageModifyProperty', function () { ...@@ -1069,13 +1069,13 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_03_013', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_2300', 0, async function (done) {
modifyErrCb1(done, "modify_03_013", "fd", "GPSLongitude", "abc,2") modifyErrCb1(done, "SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_2300", "fd", "GPSLongitude", "abc,2")
}) })
/** /**
* @tc.number : modify_03_014 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_2400
* @tc.name : modifyImageProperty()-callback * @tc.name : modifyImageProperty(GPSLatitudeRef)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
* 3.return undefined * 3.return undefined
...@@ -1083,13 +1083,13 @@ describe('imageModifyProperty', function () { ...@@ -1083,13 +1083,13 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_03_014', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_2400', 0, async function (done) {
modifyErrCb1(done, "modify_03_014", "fd", "GPSLatitudeRef", "1234") modifyErrCb1(done, "SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_2400", "fd", "GPSLatitudeRef", "1234")
}) })
/** /**
* @tc.number : modify_03_015 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_2500
* @tc.name : modifyImageProperty()-callback * @tc.name : modifyImageProperty(GPSLongitudeRef)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
* 3.return undefined * 3.return undefined
...@@ -1097,13 +1097,13 @@ describe('imageModifyProperty', function () { ...@@ -1097,13 +1097,13 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_03_015', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_2500', 0, async function (done) {
modifyErrCb1(done, "modify_03_015", "fd", "GPSLongitudeRef", "567") modifyErrCb1(done, "SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_2500", "fd", "GPSLongitudeRef", "567")
}) })
/** /**
* @tc.number : modify_03_016 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_2600
* @tc.name : modifyImageProperty-callback * @tc.name : modifyImageProperty(Orientation)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
* 3.return undefined * 3.return undefined
...@@ -1111,13 +1111,13 @@ describe('imageModifyProperty', function () { ...@@ -1111,13 +1111,13 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_03_016', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_2600', 0, async function (done) {
modifyErrCb1(done, "modify_03_016", "buffer", "Orientation", "abcef") modifyErrCb1(done, "SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_2600", "buffer", "Orientation", "abcef")
}) })
/** /**
* @tc.number : modify_03_017 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_2700
* @tc.name : modifyImageProperty-callback * @tc.name : modifyImageProperty(GPSLatitude)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
* 3.return undefined * 3.return undefined
...@@ -1125,13 +1125,13 @@ describe('imageModifyProperty', function () { ...@@ -1125,13 +1125,13 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_03_017', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_2700', 0, async function (done) {
modifyErrCb1(done, "modify_03_017", "buffer", "GPSLatitude", "abc,3") modifyErrCb1(done, "SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_2700", "buffer", "GPSLatitude", "abc,3")
}) })
/** /**
* @tc.number : modify_03_018 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_2800
* @tc.name : modifyImageProperty-callback * @tc.name : modifyImageProperty(GPSLongitude)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
* 3.return undefined * 3.return undefined
...@@ -1139,13 +1139,13 @@ describe('imageModifyProperty', function () { ...@@ -1139,13 +1139,13 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_03_018', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_2800', 0, async function (done) {
modifyErrCb1(done, "modify_03_018", "buffer", "GPSLongitude", "abc,2") modifyErrCb1(done, "SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_2800", "buffer", "GPSLongitude", "abc,2")
}) })
/** /**
* @tc.number : modify_03_019 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_2900
* @tc.name : modifyImageProperty-callback * @tc.name : modifyImageProperty(GPSLatitudeRef)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
* 3.return undefined * 3.return undefined
...@@ -1153,13 +1153,13 @@ describe('imageModifyProperty', function () { ...@@ -1153,13 +1153,13 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_03_019', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_2900', 0, async function (done) {
modifyErrCb1(done, "modify_03_019", "buffer", "GPSLatitudeRef", "456") modifyErrCb1(done, "SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_2900", "buffer", "GPSLatitudeRef", "456")
}) })
/** /**
* @tc.number : modify_03_020 * @tc.number : SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_3000
* @tc.name : modifyImageProperty-callback * @tc.name : modifyImageProperty(GPSLongitudeRef)-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.call modifyImageProperty(key,value) * 2.call modifyImageProperty(key,value)
* 3.return undefined * 3.return undefined
...@@ -1167,7 +1167,7 @@ describe('imageModifyProperty', function () { ...@@ -1167,7 +1167,7 @@ describe('imageModifyProperty', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('modify_03_020', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_3000', 0, async function (done) {
modifyErrCb1(done, "modify_03_020", "buffer", "GPSLongitudeRef", "1234") modifyErrCb1(done, "SUB_GRAPHIC_IMAGE_MODIFYPROPERTY_CALLBACK_3000", "buffer", "GPSLongitudeRef", "1234")
}) })
})} })}
...@@ -217,7 +217,7 @@ export default function imagePacking() { ...@@ -217,7 +217,7 @@ export default function imagePacking() {
} }
/** /**
* @tc.number : SUB_IMAGE_packing_P_001 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_PROMISE_0100
* @tc.name : SUB_IMAGE_packing_P_001 * @tc.name : SUB_IMAGE_packing_P_001
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
...@@ -226,13 +226,13 @@ export default function imagePacking() { ...@@ -226,13 +226,13 @@ export default function imagePacking() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_P_001', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_PROMISE_0100', 0, async function (done) {
let packOpts = { format: "image/jpeg", quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
packingPromise(done, 'SUB_IMAGE_packing_P_001', 2, packOpts) packingPromise(done, 'SUB_GRAPHIC_IMAGE_PACKING_PROMISE_0100', 2, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packing_P_002 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_PROMISE_0200
* @tc.name : SUB_IMAGE_packing_P_002 - Promise - RGB565 quality 123 * @tc.name : SUB_IMAGE_packing_P_002 - Promise - RGB565 quality 123
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
...@@ -241,13 +241,13 @@ export default function imagePacking() { ...@@ -241,13 +241,13 @@ export default function imagePacking() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_P_002', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_PROMISE_0200', 0, async function (done) {
let packOpts = { format: "image/jpeg", quality: 123 } let packOpts = { format: "image/jpeg", quality: 123 }
packingPromiseFail(done, 'SUB_IMAGE_packing_P_002', 2, packOpts) packingPromiseFail(done, 'SUB_GRAPHIC_IMAGE_PACKING_PROMISE_0200', 2, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packing_P_003 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_PROMISE_0300
* @tc.name : SUB_IMAGE_packing_P_003 - Promise - RGB565 quality null * @tc.name : SUB_IMAGE_packing_P_003 - Promise - RGB565 quality null
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
...@@ -256,13 +256,13 @@ export default function imagePacking() { ...@@ -256,13 +256,13 @@ export default function imagePacking() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_P_003', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_PROMISE_0300', 0, async function (done) {
let packOpts = { format: "image/jpeg" } let packOpts = { format: "image/jpeg" }
packingPromiseFail(done, 'SUB_IMAGE_packing_P_003', 2, packOpts) packingPromiseFail(done, 'SUB_GRAPHIC_IMAGE_PACKING_PROMISE_0300', 2, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packing_P_004 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_PROMISE_0400
* @tc.name : SUB_IMAGE_packing_P_004 - Promise - RGB565 format null * @tc.name : SUB_IMAGE_packing_P_004 - Promise - RGB565 format null
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
...@@ -271,13 +271,13 @@ export default function imagePacking() { ...@@ -271,13 +271,13 @@ export default function imagePacking() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_P_004', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_PROMISE_0400', 0, async function (done) {
let packOpts = { quality: 99 } let packOpts = { quality: 99 }
packingPromiseFail(done, 'SUB_IMAGE_packing_P_004', 2, packOpts) packingPromiseFail(done, 'SUB_GRAPHIC_IMAGE_PACKING_PROMISE_0400', 2, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packing_P_005 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_PROMISE_0500
* @tc.name : SUB_IMAGE_packing_P_005 - Promise - RGB565 wrong format * @tc.name : SUB_IMAGE_packing_P_005 - Promise - RGB565 wrong format
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
...@@ -286,13 +286,13 @@ export default function imagePacking() { ...@@ -286,13 +286,13 @@ export default function imagePacking() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_P_005', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_PROMISE_0500', 0, async function (done) {
let packOpts = { format: "image/png", quality: 99 } let packOpts = { format: "image/png", quality: 99 }
packingPromiseFail(done, 'SUB_IMAGE_packing_P_005', 2, packOpts) packingPromiseFail(done, 'SUB_GRAPHIC_IMAGE_PACKING_PROMISE_0500', 2, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packing_P_006 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_PROMISE_0600
* @tc.name : SUB_IMAGE_packing_P_006 * @tc.name : SUB_IMAGE_packing_P_006
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
...@@ -301,13 +301,13 @@ export default function imagePacking() { ...@@ -301,13 +301,13 @@ export default function imagePacking() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_P_006', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_PROMISE_0600', 0, async function (done) {
let packOpts = { format: "image/jpeg", quality: 50 } let packOpts = { format: "image/jpeg", quality: 50 }
packingPromise(done, 'SUB_IMAGE_packing_P_006', 5, packOpts) packingPromise(done, 'SUB_GRAPHIC_IMAGE_PACKING_PROMISE_0600', 5, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packing_P_007 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_PROMISE_0700
* @tc.name : SUB_IMAGE_packing_P_007 - Promise - RGB888 quality 123 * @tc.name : SUB_IMAGE_packing_P_007 - Promise - RGB888 quality 123
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
...@@ -316,13 +316,13 @@ export default function imagePacking() { ...@@ -316,13 +316,13 @@ export default function imagePacking() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_P_007', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_PROMISE_0700', 0, async function (done) {
let packOpts = { format: "image/jpeg", quality: 123 } let packOpts = { format: "image/jpeg", quality: 123 }
packingPromiseFail(done, 'SUB_IMAGE_packing_P_007', 5, packOpts) packingPromiseFail(done, 'SUB_GRAPHIC_IMAGE_PACKING_PROMISE_0700', 5, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packing_P_008 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_PROMISE_0800
* @tc.name : SUB_IMAGE_packing_P_008 - Promise - RGB888 quality null * @tc.name : SUB_IMAGE_packing_P_008 - Promise - RGB888 quality null
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
...@@ -331,13 +331,13 @@ export default function imagePacking() { ...@@ -331,13 +331,13 @@ export default function imagePacking() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_P_008', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_PROMISE_0800', 0, async function (done) {
let packOpts = { format: "image/jpeg" } let packOpts = { format: "image/jpeg" }
packingPromiseFail(done, 'SUB_IMAGE_packing_P_008', 5, packOpts) packingPromiseFail(done, 'SUB_GRAPHIC_IMAGE_PACKING_PROMISE_0800', 5, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packing_P_009 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_PROMISE_0900
* @tc.name : SUB_IMAGE_packing_P_009 - Promise - RGB888 format null * @tc.name : SUB_IMAGE_packing_P_009 - Promise - RGB888 format null
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
...@@ -346,13 +346,13 @@ export default function imagePacking() { ...@@ -346,13 +346,13 @@ export default function imagePacking() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_P_009', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_PROMISE_0900', 0, async function (done) {
let packOpts = { quality: 99 } let packOpts = { quality: 99 }
packingPromiseFail(done, 'SUB_IMAGE_packing_P_009', 5, packOpts) packingPromiseFail(done, 'SUB_GRAPHIC_IMAGE_PACKING_PROMISE_0900', 5, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packing_P_010 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_PROMISE_1000
* @tc.name : SUB_IMAGE_packing_P_010 - Promise - RGB888 wrong format * @tc.name : SUB_IMAGE_packing_P_010 - Promise - RGB888 wrong format
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
...@@ -361,13 +361,13 @@ export default function imagePacking() { ...@@ -361,13 +361,13 @@ export default function imagePacking() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_P_010', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_PROMISE_1000', 0, async function (done) {
let packOpts = { format: "image/png", quality: 99 } let packOpts = { format: "image/png", quality: 99 }
packingPromiseFail(done, 'SUB_IMAGE_packing_P_010', 5, packOpts) packingPromiseFail(done, 'SUB_GRAPHIC_IMAGE_PACKING_PROMISE_1000', 5, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packingCb_001 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_CALLBACK_0100
* @tc.name : SUB_IMAGE_packingCb_001 * @tc.name : SUB_IMAGE_packingCb_001
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
...@@ -376,13 +376,13 @@ export default function imagePacking() { ...@@ -376,13 +376,13 @@ export default function imagePacking() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packingCb_001', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_CALLBACK_0100', 0, async function (done) {
let packOpts = { format: "image/jpeg", quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
packingCb(done, 'SUB_IMAGE_packingCb_001', 2, packOpts) packingCb(done, 'SUB_GRAPHIC_IMAGE_PACKING_CALLBACK_0100', 2, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packingCb_002 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_CALLBACK_0200
* @tc.name : SUB_IMAGE_packingCb_002 - callback - RGB565 quality 123 * @tc.name : SUB_IMAGE_packingCb_002 - callback - RGB565 quality 123
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
...@@ -391,14 +391,14 @@ export default function imagePacking() { ...@@ -391,14 +391,14 @@ export default function imagePacking() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packingCb_002', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_CALLBACK_0200', 0, async function (done) {
let packOpts = { format: "image/jpeg", quality: 123 } let packOpts = { format: "image/jpeg", quality: 123 }
packingCbFail(done, 'SUB_IMAGE_packingCb_002', 2, packOpts) packingCbFail(done, 'SUB_GRAPHIC_IMAGE_PACKING_CALLBACK_0200', 2, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packingCb_003 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_CALLBACK_0300
* @tc.name : SUB_IMAGE_packingCb_003 - callback - RGB565 quality null * @tc.name : SUB_IMAGE_packingCb_003 - callback - RGB565 quality null
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
...@@ -407,13 +407,13 @@ export default function imagePacking() { ...@@ -407,13 +407,13 @@ export default function imagePacking() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packingCb_003', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_CALLBACK_0300', 0, async function (done) {
let packOpts = { format: "image/jpeg" } let packOpts = { format: "image/jpeg" }
packingCbFail(done, 'SUB_IMAGE_packingCb_003', 2, packOpts) packingCbFail(done, 'SUB_GRAPHIC_IMAGE_PACKING_CALLBACK_0300', 2, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packingCb_004 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_CALLBACK_0400
* @tc.name : SUB_IMAGE_packingCb_004 - callback - RGB565 format null * @tc.name : SUB_IMAGE_packingCb_004 - callback - RGB565 format null
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
...@@ -422,13 +422,13 @@ export default function imagePacking() { ...@@ -422,13 +422,13 @@ export default function imagePacking() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packingCb_004', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_CALLBACK_0400', 0, async function (done) {
let packOpts = { quality: 99 } let packOpts = { quality: 99 }
packingCbFail(done, 'SUB_IMAGE_packingCb_004', 2, packOpts) packingCbFail(done, 'SUB_GRAPHIC_IMAGE_PACKING_CALLBACK_0400', 2, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packingCb_005 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_CALLBACK_0500
* @tc.name : SUB_IMAGE_packingCb_005 - callback - RGB565 wrong format * @tc.name : SUB_IMAGE_packingCb_005 - callback - RGB565 wrong format
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
...@@ -437,13 +437,13 @@ export default function imagePacking() { ...@@ -437,13 +437,13 @@ export default function imagePacking() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packingCb_005', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_CALLBACK_0500', 0, async function (done) {
let packOpts = { format: "image/png", quality: 99 } let packOpts = { format: "image/png", quality: 99 }
packingCbFail(done, 'SUB_IMAGE_packingCb_005', 2, packOpts) packingCbFail(done, 'SUB_GRAPHIC_IMAGE_PACKING_CALLBACK_0500', 2, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packingCb_006 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_CALLBACK_0600
* @tc.name : SUB_IMAGE_packingCb_006 * @tc.name : SUB_IMAGE_packingCb_006
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
...@@ -452,13 +452,13 @@ export default function imagePacking() { ...@@ -452,13 +452,13 @@ export default function imagePacking() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packingCb_006', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_CALLBACK_0600', 0, async function (done) {
let packOpts = { format: "image/jpeg", quality: 50 } let packOpts = { format: "image/jpeg", quality: 50 }
packingCb(done, 'SUB_IMAGE_packingCb_006', 5, packOpts) packingCb(done, 'SUB_GRAPHIC_IMAGE_PACKING_CALLBACK_0600', 5, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packingCb_007 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_CALLBACK_0700
* @tc.name : SUB_IMAGE_packingCb_007 - callback - RGB888 quality 123 * @tc.name : SUB_IMAGE_packingCb_007 - callback - RGB888 quality 123
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
...@@ -467,14 +467,14 @@ export default function imagePacking() { ...@@ -467,14 +467,14 @@ export default function imagePacking() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packingCb_007', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_CALLBACK_0700', 0, async function (done) {
let packOpts = { format: "image/jpeg", quality: 123 } let packOpts = { format: "image/jpeg", quality: 123 }
packingCbFail(done, 'SUB_IMAGE_packingCb_007', 5, packOpts) packingCbFail(done, 'SUB_GRAPHIC_IMAGE_PACKING_CALLBACK_0700', 5, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packingCb_008 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_CALLBACK_0800
* @tc.name : SUB_IMAGE_packingCb_008 - callback - RGB888 quality null * @tc.name : SUB_IMAGE_packingCb_008 - callback - RGB888 quality null
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
...@@ -483,13 +483,13 @@ export default function imagePacking() { ...@@ -483,13 +483,13 @@ export default function imagePacking() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packingCb_008', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_CALLBACK_0800', 0, async function (done) {
let packOpts = { format: "image/jpeg" } let packOpts = { format: "image/jpeg" }
packingCbFail(done, 'SUB_IMAGE_packingCb_008', 5, packOpts) packingCbFail(done, 'SUB_GRAPHIC_IMAGE_PACKING_CALLBACK_0800', 5, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packingCb_009 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_CALLBACK_0900
* @tc.name : SUB_IMAGE_packingCb_009 - callback - RGB888 format null * @tc.name : SUB_IMAGE_packingCb_009 - callback - RGB888 format null
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
...@@ -498,13 +498,13 @@ export default function imagePacking() { ...@@ -498,13 +498,13 @@ export default function imagePacking() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packingCb_009', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_CALLBACK_0900', 0, async function (done) {
let packOpts = { quality: 99 } let packOpts = { quality: 99 }
packingCbFail(done, 'SUB_IMAGE_packingCb_009', 5, packOpts) packingCbFail(done, 'SUB_GRAPHIC_IMAGE_PACKING_CALLBACK_0900', 5, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packingCb_010 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_CALLBACK_1000
* @tc.name : SUB_IMAGE_packingCb_010 - callback - RGB888 wrong format * @tc.name : SUB_IMAGE_packingCb_010 - callback - RGB888 wrong format
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
...@@ -513,13 +513,13 @@ export default function imagePacking() { ...@@ -513,13 +513,13 @@ export default function imagePacking() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packingCb_010', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_CALLBACK_1000', 0, async function (done) {
let packOpts = { format: "image/png", quality: 99 } let packOpts = { format: "image/png", quality: 99 }
packingCbFail(done, 'SUB_IMAGE_packingCb_010', 5, packOpts) packingCbFail(done, 'SUB_GRAPHIC_IMAGE_PACKING_CALLBACK_1000', 5, packOpts)
}) })
/** /**
* @tc.number : TC_062 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_PROMISE_0100
* @tc.name : packing ImageSource - promise * @tc.name : packing ImageSource - promise
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call packing * 2.call packing
...@@ -529,36 +529,36 @@ export default function imagePacking() { ...@@ -529,36 +529,36 @@ export default function imagePacking() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_062', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_PROMISE_0100', 0, async function (done) {
try { try {
await getFd('test.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 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_PROMISE_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
const imagePackerApi = image.createImagePacker(); const imagePackerApi = image.createImagePacker();
if (imagePackerApi == undefined) { if (imagePackerApi == undefined) {
console.info('TC_062 create image packer failed'); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_PROMISE_0100 create image packer failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
let packOpts = { format: "image/jpeg", quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
imagePackerApi.packing(imageSourceApi, packOpts) imagePackerApi.packing(imageSourceApi, packOpts)
.then(data => { .then(data => {
console.info('TC_062 success'); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_PROMISE_0100 success');
expect(data != undefined).assertTrue(); expect(data != undefined).assertTrue();
done(); done();
}).catch(error => { }).catch(error => {
console.log('TC_062 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_PROMISE_0100 error: ' + error);
expect(false).assertFail(); expect(false).assertFail();
done(); done();
}) })
} }
} }
} catch (error) { } catch (error) {
console.info('TC_062 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_PROMISE_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -566,7 +566,7 @@ export default function imagePacking() { ...@@ -566,7 +566,7 @@ export default function imagePacking() {
}) })
/** /**
* @tc.number : TC_062-1 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0100
* @tc.name : packing ImageSource - callback * @tc.name : packing ImageSource - callback
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call packing * 2.call packing
...@@ -576,38 +576,38 @@ export default function imagePacking() { ...@@ -576,38 +576,38 @@ export default function imagePacking() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_062-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0100', 0, async function (done) {
try { try {
await getFd('test.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-1 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
const imagePackerApi = image.createImagePacker(); const imagePackerApi = image.createImagePacker();
if (imagePackerApi == undefined) { if (imagePackerApi == undefined) {
console.info('TC_062-1 create image packer failed'); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0100 create image packer failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
let packOpts = { format: "image/jpeg", quality: 1 } let packOpts = { format: "image/jpeg", quality: 1 }
imagePackerApi.packing(imageSourceApi, packOpts, (err, data) => { imagePackerApi.packing(imageSourceApi, packOpts, (err, data) => {
console.info('TC_062-1 success' + JSON.stringify(data)); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0100 success' + JSON.stringify(data));
expect(data != undefined).assertTrue(); expect(data != undefined).assertTrue();
done(); done();
}) })
} }
} }
} catch (error) { } catch (error) {
console.info('TC_062-1 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_062-2 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0200
* @tc.name : packing ImageSource - callback - wrong format * @tc.name : packing ImageSource - callback - wrong format
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call packing * 2.call packing
...@@ -617,24 +617,24 @@ export default function imagePacking() { ...@@ -617,24 +617,24 @@ export default function imagePacking() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_062-2', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0200', 0, async function (done) {
try { try {
await getFd('test.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-2 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0200 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
const imagePackerApi = image.createImagePacker(); const imagePackerApi = image.createImagePacker();
if (imagePackerApi == undefined) { if (imagePackerApi == undefined) {
console.info('TC_062-2 create image packer failed'); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0200 create image packer failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
let packOpts = { format: "image/gif", quality: 98 } let packOpts = { format: "image/gif", quality: 98 }
imagePackerApi.packing(imageSourceApi, packOpts, (err, data) => { imagePackerApi.packing(imageSourceApi, packOpts, (err, data) => {
console.info('TC_062-2 success'); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0200 success');
expect(data == undefined).assertTrue(); expect(data == undefined).assertTrue();
console.info(data); console.info(data);
done(); done();
...@@ -642,14 +642,14 @@ export default function imagePacking() { ...@@ -642,14 +642,14 @@ export default function imagePacking() {
} }
} }
} catch (error) { } catch (error) {
console.info('TC_062-2 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0200 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_062-3 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0300
* @tc.name : packing ImageSource - callback - wrong quality * @tc.name : packing ImageSource - callback - wrong quality
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call packing * 2.call packing
...@@ -659,24 +659,24 @@ export default function imagePacking() { ...@@ -659,24 +659,24 @@ export default function imagePacking() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_062-3', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0300', 0, async function (done) {
try { try {
await getFd('test.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-3 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0300 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
const imagePackerApi = image.createImagePacker(); const imagePackerApi = image.createImagePacker();
if (imagePackerApi == undefined) { if (imagePackerApi == undefined) {
console.info('TC_062-3 create image packer failed'); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0300 create image packer failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
let packOpts = { format: "image/jpeg", 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('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0300 success');
expect(data == undefined).assertTrue(); expect(data == undefined).assertTrue();
console.info(data); console.info(data);
done(); done();
...@@ -684,14 +684,14 @@ export default function imagePacking() { ...@@ -684,14 +684,14 @@ export default function imagePacking() {
} }
} }
} catch (error) { } catch (error) {
console.info('TC_062-3 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0300 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_062-4 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_CREATEIMAGEPACKER_0100
* @tc.name : createImagePacker * @tc.name : createImagePacker
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call packing * 2.call packing
...@@ -701,35 +701,35 @@ export default function imagePacking() { ...@@ -701,35 +701,35 @@ export default function imagePacking() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_062-4', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_CREATEIMAGEPACKER_0100', 0, async function (done) {
try { try {
await getFd('test.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-4 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_PACKING_CREATEIMAGEPACKER_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
const imagePackerApi = image.createImagePacker(); const imagePackerApi = image.createImagePacker();
if (imagePackerApi == undefined) { if (imagePackerApi == undefined) {
console.info('TC_062-4 create image packer failed'); console.info('SUB_GRAPHIC_IMAGE_PACKING_CREATEIMAGEPACKER_0100 create image packer failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
console.info('TC_062-4 create image packer success'); console.info('SUB_GRAPHIC_IMAGE_PACKING_CREATEIMAGEPACKER_0100 create image packer success');
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} }
} }
} catch (error) { } catch (error) {
console.info('TC_062-4 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_PACKING_CREATEIMAGEPACKER_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_062-5 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_PROMISE_0200
* @tc.name : packing ImageSource - promise - no quality * @tc.name : packing ImageSource - promise - no quality
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call packing * 2.call packing
...@@ -740,44 +740,44 @@ export default function imagePacking() { ...@@ -740,44 +740,44 @@ export default function imagePacking() {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_062-5', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_PROMISE_0200', 0, async function (done) {
try { try {
await getFd('test.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('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_PROMISE_0200 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
const imagePackerApi = image.createImagePacker(); const imagePackerApi = image.createImagePacker();
if (imagePackerApi == undefined) { if (imagePackerApi == undefined) {
console.info('TC_062-5 create image packer failed'); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_PROMISE_0200 create image packer failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
let packOpts = { format: "image/jpeg" } 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('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_PROMISE_0200 failed');
expect(data == undefined).assertTrue(); expect(data == undefined).assertTrue();
done(); done();
}).catch(error => { }).catch(error => {
console.log('TC_062-5 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_PROMISE_0200 error: ' + error);
console.log('TC_062-5 success'); console.log('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_PROMISE_0200 success');
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
}) })
} }
} }
} catch (error) { } catch (error) {
console.info('TC_062-5 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_PROMISE_0200 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_062-6 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_PROMISE_0300
* @tc.name : packing ImageSource - promise - no format * @tc.name : packing ImageSource - promise - no format
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call packing * 2.call packing
...@@ -787,44 +787,44 @@ export default function imagePacking() { ...@@ -787,44 +787,44 @@ export default function imagePacking() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_062-6', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_PROMISE_0300', 0, async function (done) {
try { try {
await getFd('test.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-6 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_PROMISE_0300 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
const imagePackerApi = image.createImagePacker(); const imagePackerApi = image.createImagePacker();
if (imagePackerApi == undefined) { if (imagePackerApi == undefined) {
console.info('TC_062-6 create image packer failed'); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_PROMISE_0300 create image packer failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
let packOpts = { quality: 50 } let packOpts = { quality: 50 }
imagePackerApi.packing(imageSourceApi, packOpts) imagePackerApi.packing(imageSourceApi, packOpts)
.then(data => { .then(data => {
console.info('TC_062-6 failed'); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_PROMISE_0300 failed');
expect(data == undefined).assertTrue(); expect(data == undefined).assertTrue();
done(); done();
}).catch(error => { }).catch(error => {
console.log('TC_062-6 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_PROMISE_0300 error: ' + error);
console.log('TC_062-6 success'); console.log('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_PROMISE_0300 success');
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
}) })
} }
} }
} catch (error) { } catch (error) {
console.info('TC_062-6 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_PROMISE_0300 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_062-7 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0400
* @tc.name : packing ImageSource - callback - quality 100 * @tc.name : packing ImageSource - callback - quality 100
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call packing * 2.call packing
...@@ -835,18 +835,18 @@ export default function imagePacking() { ...@@ -835,18 +835,18 @@ export default function imagePacking() {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_062-7', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0400', 0, async function (done) {
try { try {
await getFd('test.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-7 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0400 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
const imagePackerApi = image.createImagePacker(); const imagePackerApi = image.createImagePacker();
if (imagePackerApi == undefined) { if (imagePackerApi == undefined) {
console.info('TC_062-7 create image packer failed'); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0400 create image packer failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -854,31 +854,31 @@ export default function imagePacking() { ...@@ -854,31 +854,31 @@ export default function imagePacking() {
imagePackerApi.packing(imageSourceApi, packOpts, (err, data) => { imagePackerApi.packing(imageSourceApi, packOpts, (err, data) => {
if (err) { if (err) {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('TC_062-7 error: ' + err); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0400 error: ' + err);
done(); done();
return return
} }
if (data != undefined) { if (data != undefined) {
console.info('TC_062-7 success'); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0400 success');
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} else { } else {
except(false).assertTrue(); except(false).assertTrue();
console.info('TC_062-7 failed'); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0400 failed');
done(); done();
} }
}) })
} }
} }
} catch (error) { } catch (error) {
console.info('TC_062-7 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0400 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_062-8 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0500
* @tc.name : packing ImageSource - callback - quality 0 * @tc.name : packing ImageSource - callback - quality 0
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call packing * 2.call packing
...@@ -888,38 +888,38 @@ export default function imagePacking() { ...@@ -888,38 +888,38 @@ export default function imagePacking() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_062-8', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0500', 0, async function (done) {
try { try {
await getFd('test.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-8 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0500 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
const imagePackerApi = image.createImagePacker(); const imagePackerApi = image.createImagePacker();
if (imagePackerApi == undefined) { if (imagePackerApi == undefined) {
console.info('TC_062-8 create image packer failed'); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0500 create image packer failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
let packOpts = { format: "image/jpeg", quality: 0 } let packOpts = { format: "image/jpeg", quality: 0 }
imagePackerApi.packing(imageSourceApi, packOpts, (err, data) => { imagePackerApi.packing(imageSourceApi, packOpts, (err, data) => {
console.info('TC_062-8 success'); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0500 success');
expect(data != undefined).assertTrue(); expect(data != undefined).assertTrue();
done(); done();
}) })
} }
} }
} catch (error) { } catch (error) {
console.info('TC_062-8 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0500 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_062-9 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0600
* @tc.name : packing ImageSource - callback - quality -1 * @tc.name : packing ImageSource - callback - quality -1
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call packing * 2.call packing
...@@ -929,38 +929,38 @@ export default function imagePacking() { ...@@ -929,38 +929,38 @@ export default function imagePacking() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_062-9', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0600', 0, async function (done) {
try { try {
await getFd('test.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-9 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0600 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
const imagePackerApi = image.createImagePacker(); const imagePackerApi = image.createImagePacker();
if (imagePackerApi == undefined) { if (imagePackerApi == undefined) {
console.info('TC_062-9 create image packer failed'); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0600 create image packer failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
let packOpts = { format: "image/jpeg", quality: -1 } let packOpts = { format: "image/jpeg", quality: -1 }
imagePackerApi.packing(imageSourceApi, packOpts, (err, data) => { imagePackerApi.packing(imageSourceApi, packOpts, (err, data) => {
console.info('TC_062-9 success'); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0600 success');
expect(data == undefined).assertTrue(); expect(data == undefined).assertTrue();
done(); done();
}) })
} }
} }
} catch (error) { } catch (error) {
console.info('TC_062-9 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_PACKING_IMAGESOURCE_CALLBACK_0600 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
}) })
/** /**
* @tc.number : TC_063 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_RELEASE_IMAGEPACKER_PROMISE_0100
* @tc.name : release ImagePacker - promise * @tc.name : release ImagePacker - promise
* @tc.desc : 1.create ImagePacker * @tc.desc : 1.create ImagePacker
* 2.call release * 2.call release
...@@ -969,19 +969,19 @@ export default function imagePacking() { ...@@ -969,19 +969,19 @@ export default function imagePacking() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_063', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_RELEASE_IMAGEPACKER_PROMISE_0100', 0, async function (done) {
const imagePackerApi = image.createImagePacker(); const imagePackerApi = image.createImagePacker();
if (imagePackerApi == undefined) { if (imagePackerApi == undefined) {
console.info('TC_063 create image packer failed'); console.info('SUB_GRAPHIC_IMAGE_PACKING_RELEASE_IMAGEPACKER_PROMISE_0100 create image packer failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imagePackerApi.release().then(() => { imagePackerApi.release().then(() => {
console.info('TC_063 success'); console.info('SUB_GRAPHIC_IMAGE_PACKING_RELEASE_IMAGEPACKER_PROMISE_0100 success');
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
}).catch(() => { }).catch(() => {
console.log('TC_063 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_PACKING_RELEASE_IMAGEPACKER_PROMISE_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
}) })
...@@ -989,7 +989,7 @@ export default function imagePacking() { ...@@ -989,7 +989,7 @@ export default function imagePacking() {
}) })
/** /**
* @tc.number : TC_063-1 * @tc.number : SUB_GRAPHIC_IMAGE_PACKING_RELEASE_IMAGEPACKER_CALLBACK_0100
* @tc.name : release ImagePacker - callback * @tc.name : release ImagePacker - callback
* @tc.desc : 1.create ImagePacker * @tc.desc : 1.create ImagePacker
* 2.call release * 2.call release
...@@ -998,15 +998,15 @@ export default function imagePacking() { ...@@ -998,15 +998,15 @@ export default function imagePacking() {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_063-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PACKING_RELEASE_IMAGEPACKER_CALLBACK_0100', 0, async function (done) {
const imagePackerApi = image.createImagePacker(); const imagePackerApi = image.createImagePacker();
if (imagePackerApi == undefined) { if (imagePackerApi == undefined) {
console.info('TC_063-1 create image packer failed'); console.info('SUB_GRAPHIC_IMAGE_PACKING_RELEASE_IMAGEPACKER_CALLBACK_0100 create image packer failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imagePackerApi.release(() => { imagePackerApi.release(() => {
console.info('TC_063-1 success'); console.info('SUB_GRAPHIC_IMAGE_PACKING_RELEASE_IMAGEPACKER_CALLBACK_0100 success');
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
}) })
......
...@@ -386,7 +386,7 @@ describe('imagePixelMapFramework', function () { ...@@ -386,7 +386,7 @@ describe('imagePixelMapFramework', function () {
} }
/** /**
* @tc.number : frmwk_001 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_BASE64_0100
* @tc.name : BASE64 Image * @tc.name : BASE64 Image
* @tc.desc : 1.create imagesource with base64Image * @tc.desc : 1.create imagesource with base64Image
* : 2.create pixelmap * : 2.create pixelmap
...@@ -394,8 +394,8 @@ describe('imagePixelMapFramework', function () { ...@@ -394,8 +394,8 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_001', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_BASE64_0100', 0, async function (done) {
let logger = loger('frmwk_001') let logger = loger('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_BASE64_0100')
try { try {
const imageSource = image.createImageSource(base64Image) const imageSource = image.createImageSource(base64Image)
logger.log("ImageSource " + (imageSource != undefined)); logger.log("ImageSource " + (imageSource != undefined));
...@@ -413,7 +413,7 @@ describe('imagePixelMapFramework', function () { ...@@ -413,7 +413,7 @@ describe('imagePixelMapFramework', function () {
}) })
/** /**
* @tc.number : frmwk_002 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_PROMISE_0100
* @tc.name : Pixelmap Scale-promise * @tc.name : Pixelmap Scale-promise
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call scale * : 2.call scale
...@@ -423,7 +423,7 @@ describe('imagePixelMapFramework', function () { ...@@ -423,7 +423,7 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_002', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_PROMISE_0100', 0, async function (done) {
function sizeCheck(done, logger, orgInfo, newInfo) { function sizeCheck(done, logger, orgInfo, newInfo) {
if (newInfo.size.width != orgInfo.size.width * 2) { if (newInfo.size.width != orgInfo.size.width * 2) {
logger.log(`org width ${orgInfo.size.width}, new width ${newInfo.size.width} `); logger.log(`org width ${orgInfo.size.width}, new width ${newInfo.size.width} `);
...@@ -431,11 +431,11 @@ describe('imagePixelMapFramework', function () { ...@@ -431,11 +431,11 @@ describe('imagePixelMapFramework', function () {
done() done()
} }
} }
await pixelMapModifySizeTest(done, 'frmwk_002', 'promise', 'scale', sizeCheck, scale2x1, 2.0, 1.0) await pixelMapModifySizeTest(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_PROMISE_0100', 'promise', 'scale', sizeCheck, scale2x1, 2.0, 1.0)
}) })
/** /**
* @tc.number : frmwk_003 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_PROMISE_0200
* @tc.name : Pixelmap Scale-promise * @tc.name : Pixelmap Scale-promise
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call scale * : 2.call scale
...@@ -445,7 +445,7 @@ describe('imagePixelMapFramework', function () { ...@@ -445,7 +445,7 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_003', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_PROMISE_0200', 0, async function (done) {
function sizeCheck(done, logger, orgInfo, newInfo) { function sizeCheck(done, logger, orgInfo, newInfo) {
if (newInfo.size.height != orgInfo.size.height * 4) { if (newInfo.size.height != orgInfo.size.height * 4) {
logger.log(`org height ${orgInfo.size.height}, new height ${newInfo.size.height} `); logger.log(`org height ${orgInfo.size.height}, new height ${newInfo.size.height} `);
...@@ -453,11 +453,11 @@ describe('imagePixelMapFramework', function () { ...@@ -453,11 +453,11 @@ describe('imagePixelMapFramework', function () {
done() done()
} }
} }
await pixelMapModifySizeTest(done, 'frmwk_003', 'promise', 'scale', sizeCheck, scale1x4, 1.0, 4.0) await pixelMapModifySizeTest(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_PROMISE_0200', 'promise', 'scale', sizeCheck, scale1x4, 1.0, 4.0)
}) })
/** /**
* @tc.number : frmwk_004 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_CALLBACK_0100
* @tc.name : Pixelmap Scale-callback * @tc.name : Pixelmap Scale-callback
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call scale * : 2.call scale
...@@ -467,7 +467,7 @@ describe('imagePixelMapFramework', function () { ...@@ -467,7 +467,7 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_004', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_CALLBACK_0100', 0, async function (done) {
function sizeCheck(done, logger, orgInfo, newInfo) { function sizeCheck(done, logger, orgInfo, newInfo) {
if (newInfo.size.height != orgInfo.size.height * 4) { if (newInfo.size.height != orgInfo.size.height * 4) {
logger.log(`org height ${orgInfo.size.height}, new height ${newInfo.size.height} `); logger.log(`org height ${orgInfo.size.height}, new height ${newInfo.size.height} `);
...@@ -475,11 +475,11 @@ describe('imagePixelMapFramework', function () { ...@@ -475,11 +475,11 @@ describe('imagePixelMapFramework', function () {
done() done()
} }
} }
await pixelMapModifySizeTest(done, 'frmwk_004', 'callback', 'scale', sizeCheck, scale1x4, 1.0, 4.0) await pixelMapModifySizeTest(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_CALLBACK_0100', 'callback', 'scale', sizeCheck, scale1x4, 1.0, 4.0)
}) })
/** /**
* @tc.number : frmwk_005 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_PROMISE_0100
* @tc.name : Pixelmap Translate -promise * @tc.name : Pixelmap Translate -promise
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call translate * : 2.call translate
...@@ -489,7 +489,7 @@ describe('imagePixelMapFramework', function () { ...@@ -489,7 +489,7 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_005', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_PROMISE_0100', 0, async function (done) {
function sizeCheck(done, logger, orgInfo, newInfo) { function sizeCheck(done, logger, orgInfo, newInfo) {
if (newInfo.size.width != orgInfo.size.width + 3) { if (newInfo.size.width != orgInfo.size.width + 3) {
logger.log(`org width ${orgInfo.size.width}, new width ${newInfo.size.width} `); logger.log(`org width ${orgInfo.size.width}, new width ${newInfo.size.width} `);
...@@ -497,11 +497,11 @@ describe('imagePixelMapFramework', function () { ...@@ -497,11 +497,11 @@ describe('imagePixelMapFramework', function () {
done(); done();
} }
} }
await pixelMapModifySizeTest(done, 'frmwk_005', 'promise', 'translate', sizeCheck, translate3x1, 3.0, 1.0) await pixelMapModifySizeTest(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_PROMISE_0100', 'promise', 'translate', sizeCheck, translate3x1, 3.0, 1.0)
}) })
/** /**
* @tc.number : frmwk_006 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_PROMISE_0200
* @tc.name : Pixelmap Translate-promise * @tc.name : Pixelmap Translate-promise
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call translate * : 2.call translate
...@@ -511,7 +511,7 @@ describe('imagePixelMapFramework', function () { ...@@ -511,7 +511,7 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_006', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_PROMISE_0200', 0, async function (done) {
function sizeCheck(done, logger, orgInfo, newInfo) { function sizeCheck(done, logger, orgInfo, newInfo) {
if (newInfo.size.height != orgInfo.size.height + 3) { if (newInfo.size.height != orgInfo.size.height + 3) {
logger.log(`org height ${orgInfo.size.height}, new height ${newInfo.size.height} `); logger.log(`org height ${orgInfo.size.height}, new height ${newInfo.size.height} `);
...@@ -519,11 +519,11 @@ describe('imagePixelMapFramework', function () { ...@@ -519,11 +519,11 @@ describe('imagePixelMapFramework', function () {
done(); done();
} }
} }
await pixelMapModifySizeTest(done, 'frmwk_006', 'promise', 'translate', sizeCheck, translate1x3, 1.0, 3.0) await pixelMapModifySizeTest(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_PROMISE_0200', 'promise', 'translate', sizeCheck, translate1x3, 1.0, 3.0)
}) })
/** /**
* @tc.number : frmwk_01_007 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_CALLBACK_0100
* @tc.name : Pixelmap Translate-callback * @tc.name : Pixelmap Translate-callback
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call translate * : 2.call translate
...@@ -533,7 +533,7 @@ describe('imagePixelMapFramework', function () { ...@@ -533,7 +533,7 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_007', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_CALLBACK_0100', 0, async function (done) {
function sizeCheck(done, logger, orgInfo, newInfo) { function sizeCheck(done, logger, orgInfo, newInfo) {
if (newInfo.size.height != orgInfo.size.height + 3) { if (newInfo.size.height != orgInfo.size.height + 3) {
logger.log(`org height ${orgInfo.size.height}, new height ${newInfo.size.height} `); logger.log(`org height ${orgInfo.size.height}, new height ${newInfo.size.height} `);
...@@ -541,11 +541,11 @@ describe('imagePixelMapFramework', function () { ...@@ -541,11 +541,11 @@ describe('imagePixelMapFramework', function () {
done(); done();
} }
} }
await pixelMapModifySizeTest(done, 'frmwk_007', 'callback', 'translate', sizeCheck, translate1x3, 1.0, 3.0) await pixelMapModifySizeTest(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_CALLBACK_0100', 'callback', 'translate', sizeCheck, translate1x3, 1.0, 3.0)
}) })
/** /**
* @tc.number : frmwk_008 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_ROTATE_PROMISE_0100
* @tc.name : Pixelmap Rotate-promise * @tc.name : Pixelmap Rotate-promise
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call rotate * : 2.call rotate
...@@ -555,7 +555,7 @@ describe('imagePixelMapFramework', function () { ...@@ -555,7 +555,7 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_008', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_ROTATE_PROMISE_0100', 0, async function (done) {
function sizeCheck(done, logger, orgInfo, newInfo) { function sizeCheck(done, logger, orgInfo, newInfo) {
if (newInfo.size.width != orgInfo.size.height) { if (newInfo.size.width != orgInfo.size.height) {
logger.log(`org height ${orgInfo.size.height}, new width ${newInfo.size.width} `); logger.log(`org height ${orgInfo.size.height}, new width ${newInfo.size.width} `);
...@@ -563,11 +563,11 @@ describe('imagePixelMapFramework', function () { ...@@ -563,11 +563,11 @@ describe('imagePixelMapFramework', function () {
done(); done();
} }
} }
await pixelMapModifySizeTest(done, 'frmwk_008', 'promise', 'rotate', sizeCheck, rotate90, 90.0) await pixelMapModifySizeTest(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_ROTATE_PROMISE_0100', 'promise', 'rotate', sizeCheck, rotate90, 90.0)
}) })
/** /**
* @tc.number : frmwk_009 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_ROTATE_CALLBACK_0100
* @tc.name : Pixelmap Rotate-callback * @tc.name : Pixelmap Rotate-callback
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call rotate * : 2.call rotate
...@@ -577,7 +577,7 @@ describe('imagePixelMapFramework', function () { ...@@ -577,7 +577,7 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_009', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_ROTATE_CALLBACK_0100', 0, async function (done) {
function sizeCheck(done, logger, orgInfo, newInfo) { function sizeCheck(done, logger, orgInfo, newInfo) {
if (newInfo.size.width != orgInfo.size.height) { if (newInfo.size.width != orgInfo.size.height) {
logger.log(`org height ${orgInfo.size.height}, new width ${newInfo.size.width} `); logger.log(`org height ${orgInfo.size.height}, new width ${newInfo.size.width} `);
...@@ -585,11 +585,11 @@ describe('imagePixelMapFramework', function () { ...@@ -585,11 +585,11 @@ describe('imagePixelMapFramework', function () {
done(); done();
} }
} }
await pixelMapModifySizeTest(done, 'frmwk_009', 'callback', 'rotate', sizeCheck, rotate90, 90.0) await pixelMapModifySizeTest(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_ROTATE_CALLBACK_0100', 'callback', 'rotate', sizeCheck, rotate90, 90.0)
}) })
/** /**
* @tc.number : frmwk_010 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_FLIP_PROMISE_0100
* @tc.name : Pixelmap Flip-promise * @tc.name : Pixelmap Flip-promise
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call flip * : 2.call flip
...@@ -599,7 +599,7 @@ describe('imagePixelMapFramework', function () { ...@@ -599,7 +599,7 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_010', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_FLIP_PROMISE_0100', 0, async function (done) {
function sizeCheck(done, logger, orgInfo, newInfo) { function sizeCheck(done, logger, orgInfo, newInfo) {
if (newInfo.size.width != orgInfo.size.width) { if (newInfo.size.width != orgInfo.size.width) {
logger.log(`org width ${orgInfo.size.width}, new width ${newInfo.size.width} `); logger.log(`org width ${orgInfo.size.width}, new width ${newInfo.size.width} `);
...@@ -607,11 +607,11 @@ describe('imagePixelMapFramework', function () { ...@@ -607,11 +607,11 @@ describe('imagePixelMapFramework', function () {
done(); done();
} }
} }
await pixelMapModifySizeTest(done, 'frmwk_010', 'promise', 'flip', sizeCheck, flipH, false, true) await pixelMapModifySizeTest(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_FLIP_PROMISE_0100', 'promise', 'flip', sizeCheck, flipH, false, true)
}) })
/** /**
* @tc.number : frmwk_011 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_FLIP_CALLBACK_0100
* @tc.name : Pixelmap Flip-callback * @tc.name : Pixelmap Flip-callback
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call flip * : 2.call flip
...@@ -621,7 +621,7 @@ describe('imagePixelMapFramework', function () { ...@@ -621,7 +621,7 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_011', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_FLIP_CALLBACK_0100', 0, async function (done) {
function sizeCheck(done, logger, orgInfo, newInfo) { function sizeCheck(done, logger, orgInfo, newInfo) {
if (newInfo.size.width != orgInfo.size.width) { if (newInfo.size.width != orgInfo.size.width) {
logger.log(`org width ${orgInfo.size.width}, new width ${newInfo.size.width} `); logger.log(`org width ${orgInfo.size.width}, new width ${newInfo.size.width} `);
...@@ -629,11 +629,11 @@ describe('imagePixelMapFramework', function () { ...@@ -629,11 +629,11 @@ describe('imagePixelMapFramework', function () {
done(); done();
} }
} }
await pixelMapModifySizeTest(done, 'frmwk_011', 'callback', 'flip', sizeCheck, flipH, false, true) await pixelMapModifySizeTest(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_FLIP_CALLBACK_0100', 'callback', 'flip', sizeCheck, flipH, false, true)
}) })
/** /**
* @tc.number : frmwk_012 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_ISSUPPORTALPHA_SETSUPPORTALPHA_0100
* @tc.name : isSupportAlpha SetSupportAlpha * @tc.name : isSupportAlpha SetSupportAlpha
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* : 2.create pixelmap * : 2.create pixelmap
...@@ -643,8 +643,8 @@ describe('imagePixelMapFramework', function () { ...@@ -643,8 +643,8 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_012', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_ISSUPPORTALPHA_SETSUPPORTALPHA_0100', 0, async function (done) {
let logger = loger('frmwk_012') let logger = loger('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_ISSUPPORTALPHA_SETSUPPORTALPHA_0100')
try { try {
let imageSource = genPicSource(); let imageSource = genPicSource();
logger.log("ImageSource " + (imageSource != undefined)); logger.log("ImageSource " + (imageSource != undefined));
...@@ -676,7 +676,7 @@ describe('imagePixelMapFramework', function () { ...@@ -676,7 +676,7 @@ describe('imagePixelMapFramework', function () {
} }
}) })
/** /**
* @tc.number : frmwk_013 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CREATEALPHAPIXELMAP_PROMISE_0100
* @tc.name : createAlphaPixelmap-promise * @tc.name : createAlphaPixelmap-promise
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* : 2.create pixelmap * : 2.create pixelmap
...@@ -686,13 +686,13 @@ describe('imagePixelMapFramework', function () { ...@@ -686,13 +686,13 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_013', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CREATEALPHAPIXELMAP_PROMISE_0100', 0, async function (done) {
var imageData = testPng.buffer; var imageData = testPng.buffer;
await createAlphaPixelmapTest(done, 'frmwk_013', 'promise', imageData); await createAlphaPixelmapTest(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CREATEALPHAPIXELMAP_PROMISE_0100', 'promise', imageData);
}) })
/** /**
* @tc.number : frmwk_014 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CREATEALPHAPIXELMAP_CALLBACK_0100
* @tc.name : createAlphaPixelmap-callback * @tc.name : createAlphaPixelmap-callback
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* : 2.create pixelmap * : 2.create pixelmap
...@@ -702,13 +702,13 @@ describe('imagePixelMapFramework', function () { ...@@ -702,13 +702,13 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_014', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CREATEALPHAPIXELMAP_CALLBACK_0100', 0, async function (done) {
var imageData = testPng.buffer; var imageData = testPng.buffer;
await createAlphaPixelmapTest(done, 'frmwk_014', 'callback', imageData); await createAlphaPixelmapTest(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CREATEALPHAPIXELMAP_CALLBACK_0100', 'callback', imageData);
}) })
/** /**
* @tc.number : frmwk_015 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CREATEALPHAPIXELMAP_0100
* @tc.name : createAlphaPixelmap-Jpg * @tc.name : createAlphaPixelmap-Jpg
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* : 2.create pixelmap * : 2.create pixelmap
...@@ -718,13 +718,13 @@ describe('imagePixelMapFramework', function () { ...@@ -718,13 +718,13 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_015', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CREATEALPHAPIXELMAP_0100', 0, async function (done) {
var imageData = testJpg.buffer; var imageData = testJpg.buffer;
await createAlphaPixelmapTest(done, 'frmwk_015', 'promise', imageData); await createAlphaPixelmapTest(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CREATEALPHAPIXELMAP_0100', 'promise', imageData);
}) })
/** /**
* @tc.number : frmwk_016 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CREATEALPHAPIXELMAP_0200
* @tc.name : createAlphaPixelmap * @tc.name : createAlphaPixelmap
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* : 2.create pixelmap * : 2.create pixelmap
...@@ -734,13 +734,13 @@ describe('imagePixelMapFramework', function () { ...@@ -734,13 +734,13 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_016', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CREATEALPHAPIXELMAP_0200', 0, async function (done) {
var imageData = testBmp.buffer; var imageData = testBmp.buffer;
await createAlphaPixelmapTest(done, 'frmwk_016', 'promise', imageData); await createAlphaPixelmapTest(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CREATEALPHAPIXELMAP_0200', 'promise', imageData);
}) })
/** /**
* @tc.number : frmwk_017 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CREATEALPHAPIXELMAP_0300
* @tc.name : createAlphaPixelmap * @tc.name : createAlphaPixelmap
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* : 2.create pixelmap * : 2.create pixelmap
...@@ -750,13 +750,13 @@ describe('imagePixelMapFramework', function () { ...@@ -750,13 +750,13 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_017', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CREATEALPHAPIXELMAP_0300', 0, async function (done) {
var imageData = testGif.buffer; var imageData = testGif.buffer;
await createAlphaPixelmapTest(done, 'frmwk_017', 'promise', imageData); await createAlphaPixelmapTest(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CREATEALPHAPIXELMAP_0300', 'promise', imageData);
}) })
/** /**
* @tc.number : frmwk_018 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETALPHA_PROMISE_0100
* @tc.name : setAlpha-promise * @tc.name : setAlpha-promise
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.setAlpha * : 2.setAlpha
...@@ -766,8 +766,8 @@ describe('imagePixelMapFramework', function () { ...@@ -766,8 +766,8 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_018', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETALPHA_PROMISE_0100', 0, async function (done) {
let logger = loger('frmwk_018') let logger = loger('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETALPHA_PROMISE_0100')
try { try {
var pixelMap = await genPixelMap() var pixelMap = await genPixelMap()
logger.log("pixelMap " + (pixelMap != undefined)); logger.log("pixelMap " + (pixelMap != undefined));
...@@ -800,7 +800,7 @@ describe('imagePixelMapFramework', function () { ...@@ -800,7 +800,7 @@ describe('imagePixelMapFramework', function () {
}) })
/** /**
* @tc.number : frmwk_019 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETALPHA_CALLBACK_0100
* @tc.name : setAlpha -callback * @tc.name : setAlpha -callback
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.setAlpha * : 2.setAlpha
...@@ -810,8 +810,8 @@ describe('imagePixelMapFramework', function () { ...@@ -810,8 +810,8 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_019', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETALPHA_CALLBACK_0100', 0, async function (done) {
let logger = loger('frmwk_019') let logger = loger('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETALPHA_CALLBACK_0100')
try { try {
var pixelMap = await genPixelMap() var pixelMap = await genPixelMap()
logger.log("pixelMap " + (pixelMap != undefined)); logger.log("pixelMap " + (pixelMap != undefined));
...@@ -845,7 +845,7 @@ describe('imagePixelMapFramework', function () { ...@@ -845,7 +845,7 @@ describe('imagePixelMapFramework', function () {
}) })
/** /**
* @tc.number : frmwk_020 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SOURCEOPTIONS_GETDENSITY_FITDENSITY_0100
* @tc.name : SourceOptions getDensity fitDensity * @tc.name : SourceOptions getDensity fitDensity
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* : 2.create PixelMap * : 2.create PixelMap
...@@ -854,13 +854,13 @@ describe('imagePixelMapFramework', function () { ...@@ -854,13 +854,13 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_020', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SOURCEOPTIONS_GETDENSITY_FITDENSITY_0100', 0, async function (done) {
var imageData = testPng.buffer; var imageData = testPng.buffer;
await getDensityTest(done, 'frmwk_020', imageData) await getDensityTest(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SOURCEOPTIONS_GETDENSITY_FITDENSITY_0100', imageData)
}) })
/** /**
* @tc.number : frmwk_021 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_FITDENSITY_0100
* @tc.name : fitDensity * @tc.name : fitDensity
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* : 2.create PixelMap with fitDensity * : 2.create PixelMap with fitDensity
...@@ -869,14 +869,14 @@ describe('imagePixelMapFramework', function () { ...@@ -869,14 +869,14 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_021', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_FITDENSITY_0100', 0, async function (done) {
var imageData = testPng.buffer; var imageData = testPng.buffer;
let decodingOptions = { fitDensity: 240 }; let decodingOptions = { fitDensity: 240 };
await getDensityTest(done, 'frmwk_021', imageData, decodingOptions) await getDensityTest(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_FITDENSITY_0100', imageData, decodingOptions)
}) })
/** /**
* @tc.number : frmwk_022 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_FITDENSITY_0200
* @tc.name : setDensity * @tc.name : setDensity
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* : 2.create PixelMap * : 2.create PixelMap
...@@ -886,13 +886,13 @@ describe('imagePixelMapFramework', function () { ...@@ -886,13 +886,13 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_022', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_FITDENSITY_0200', 0, async function (done) {
var imageData = testPng.buffer; var imageData = testPng.buffer;
await setDensityTest(done, 'frmwk_022', imageData) await setDensityTest(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_FITDENSITY_0200', imageData)
}) })
/** /**
* @tc.number : frmwk_023 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SOURCEOPTIONS_GETDENSITY_FITDENSITY_0200
* @tc.name : SourceOptions getDensity fitDensity * @tc.name : SourceOptions getDensity fitDensity
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* : 2.create PixelMap * : 2.create PixelMap
...@@ -901,13 +901,13 @@ describe('imagePixelMapFramework', function () { ...@@ -901,13 +901,13 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_023', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SOURCEOPTIONS_GETDENSITY_FITDENSITY_0200', 0, async function (done) {
var imageData = testJpg.buffer; var imageData = testJpg.buffer;
await getDensityTest(done, 'frmwk_023', imageData) await getDensityTest(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SOURCEOPTIONS_GETDENSITY_FITDENSITY_0200', imageData)
}) })
/** /**
* @tc.number : frmwk_024 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SOURCEOPTIONS_GETDENSITY_FITDENSITY_0300
* @tc.name : SourceOptions getDensity fitDensity * @tc.name : SourceOptions getDensity fitDensity
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* : 2.create PixelMap * : 2.create PixelMap
...@@ -916,13 +916,13 @@ describe('imagePixelMapFramework', function () { ...@@ -916,13 +916,13 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_024', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SOURCEOPTIONS_GETDENSITY_FITDENSITY_0300', 0, async function (done) {
var imageData = testBmp.buffer; var imageData = testBmp.buffer;
await getDensityTest(done, 'frmwk_024', imageData) await getDensityTest(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SOURCEOPTIONS_GETDENSITY_FITDENSITY_0300', imageData)
}) })
/** /**
* @tc.number : frmwk_025 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SOURCEOPTIONS_GETDENSITY_FITDENSITY_0400
* @tc.name : SourceOptions getDensity fitDensity * @tc.name : SourceOptions getDensity fitDensity
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* : 2.create PixelMap * : 2.create PixelMap
...@@ -931,13 +931,13 @@ describe('imagePixelMapFramework', function () { ...@@ -931,13 +931,13 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_025', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SOURCEOPTIONS_GETDENSITY_FITDENSITY_0400', 0, async function (done) {
var imageData = testGif.buffer; var imageData = testGif.buffer;
await getDensityTest(done, 'frmwk_025', imageData) await getDensityTest(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SOURCEOPTIONS_GETDENSITY_FITDENSITY_0400', imageData)
}) })
/** /**
* @tc.number : frmwk_026 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_FITDENSITY_0300
* @tc.name : fitDensity-JPG * @tc.name : fitDensity-JPG
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* : 2.create PixelMap with fitDensity * : 2.create PixelMap with fitDensity
...@@ -946,14 +946,14 @@ describe('imagePixelMapFramework', function () { ...@@ -946,14 +946,14 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_026', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_FITDENSITY_0300', 0, async function (done) {
var imageData = testJpg.buffer; var imageData = testJpg.buffer;
let decodingOptions = { fitDensity: 240 }; let decodingOptions = { fitDensity: 240 };
await getDensityTest(done, 'frmwk_026', imageData, decodingOptions) await getDensityTest(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_FITDENSITY_0300', imageData, decodingOptions)
}) })
/** /**
* @tc.number : frmwk_027 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_FITDENSITY_0400
* @tc.name : fitDensity-bmp * @tc.name : fitDensity-bmp
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* : 2.create PixelMap with fitDensity * : 2.create PixelMap with fitDensity
...@@ -962,14 +962,14 @@ describe('imagePixelMapFramework', function () { ...@@ -962,14 +962,14 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_027', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_FITDENSITY_0400', 0, async function (done) {
var imageData = testBmp.buffer; var imageData = testBmp.buffer;
let decodingOptions = { fitDensity: 240 }; let decodingOptions = { fitDensity: 240 };
await getDensityTest(done, 'frmwk_027', imageData, decodingOptions) await getDensityTest(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_FITDENSITY_0400', imageData, decodingOptions)
}) })
/** /**
* @tc.number : frmwk_028 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_FITDENSITY_0500
* @tc.name : fitDensity-gif * @tc.name : fitDensity-gif
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* : 2.create PixelMap with fitDensity * : 2.create PixelMap with fitDensity
...@@ -978,14 +978,14 @@ describe('imagePixelMapFramework', function () { ...@@ -978,14 +978,14 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_028', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_FITDENSITY_0500', 0, async function (done) {
var imageData = testGif.buffer; var imageData = testGif.buffer;
let decodingOptions = { fitDensity: 240 }; let decodingOptions = { fitDensity: 240 };
await getDensityTest(done, 'frmwk_028', imageData, decodingOptions) await getDensityTest(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_FITDENSITY_0500', imageData, decodingOptions)
}) })
/** /**
* @tc.number : frmwk_029 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETDENSITY_0100
* @tc.name : setDensity-Jpg * @tc.name : setDensity-Jpg
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* : 2.create PixelMap * : 2.create PixelMap
...@@ -995,13 +995,13 @@ describe('imagePixelMapFramework', function () { ...@@ -995,13 +995,13 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_029', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETDENSITY_0100', 0, async function (done) {
var imageData = testJpg.buffer; var imageData = testJpg.buffer;
await setDensityTest(done, 'frmwk_029', imageData) await setDensityTest(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETDENSITY_0100', imageData)
}) })
/** /**
* @tc.number : frmwk_030 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETDENSITY_0200
* @tc.name : setDensity-bmp * @tc.name : setDensity-bmp
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* : 2.create PixelMap * : 2.create PixelMap
...@@ -1011,13 +1011,13 @@ describe('imagePixelMapFramework', function () { ...@@ -1011,13 +1011,13 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_030', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETDENSITY_0200', 0, async function (done) {
var imageData = testBmp.buffer; var imageData = testBmp.buffer;
await setDensityTest(done, 'frmwk_030', imageData) await setDensityTest(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETDENSITY_0200', imageData)
}) })
/** /**
* @tc.number : frmwk_031 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETDENSITY_0300
* @tc.name : setDensity-gif * @tc.name : setDensity-gif
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* : 2.create PixelMap * : 2.create PixelMap
...@@ -1027,13 +1027,13 @@ describe('imagePixelMapFramework', function () { ...@@ -1027,13 +1027,13 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_031', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETDENSITY_0300', 0, async function (done) {
var imageData = testGif.buffer; var imageData = testGif.buffer;
await setDensityTest(done, 'frmwk_031', imageData) await setDensityTest(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETDENSITY_0300', imageData)
}) })
/** /**
* @tc.number : frmwk_032 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CROP_PROMISE_0100
* @tc.name : crop-promise * @tc.name : crop-promise
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* : 2.crop * : 2.crop
...@@ -1044,7 +1044,7 @@ describe('imagePixelMapFramework', function () { ...@@ -1044,7 +1044,7 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_032', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CROP_PROMISE_0100', 0, async function (done) {
var region = { size: { height: 3, width: 3 }, x: 1, y: 1 }; var region = { size: { height: 3, width: 3 }, x: 1, y: 1 };
function sizeCheck(done, logger, orgInfo, newInfo) { function sizeCheck(done, logger, orgInfo, newInfo) {
orgInfo = region; orgInfo = region;
...@@ -1054,11 +1054,11 @@ describe('imagePixelMapFramework', function () { ...@@ -1054,11 +1054,11 @@ describe('imagePixelMapFramework', function () {
done(); done();
} }
} }
await pixelMapModifySizeTest(done, 'frmwk_032', 'promise', 'crop', sizeCheck, crop3x3, region) await pixelMapModifySizeTest(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CROP_PROMISE_0100', 'promise', 'crop', sizeCheck, crop3x3, region)
}) })
/** /**
* @tc.number : frmwk_033 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CROP_CALLBACK_0100
* @tc.name : crop -callback * @tc.name : crop -callback
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* : 2.crop * : 2.crop
...@@ -1069,7 +1069,7 @@ describe('imagePixelMapFramework', function () { ...@@ -1069,7 +1069,7 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('frmwk_033', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CROP_CALLBACK_0100', 0, async function (done) {
var region = { size: { height: 3, width: 3 }, x: 1, y: 1 }; var region = { size: { height: 3, width: 3 }, x: 1, y: 1 };
function sizeCheck(done, logger, orgInfo, newInfo) { function sizeCheck(done, logger, orgInfo, newInfo) {
orgInfo = region; orgInfo = region;
...@@ -1079,11 +1079,11 @@ describe('imagePixelMapFramework', function () { ...@@ -1079,11 +1079,11 @@ describe('imagePixelMapFramework', function () {
done(); done();
} }
} }
await pixelMapModifySizeTest(done, 'frmwk_033', 'callback', 'crop', sizeCheck, crop3x3, region) await pixelMapModifySizeTest(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CROP_CALLBACK_0100', 'callback', 'crop', sizeCheck, crop3x3, region)
}) })
/** /**
* @tc.number : scaleErr_001 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_ERROR_PROMISE_0100
* @tc.name : Pixelmap Scale-promise-wrong x * @tc.name : Pixelmap Scale-promise-wrong x
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call scale * : 2.call scale
...@@ -1091,12 +1091,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1091,12 +1091,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('scaleErr_001', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_ERROR_PROMISE_0100', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'scaleErr_001', 'promise', 'scale', { a: 10 }, 1.0) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_ERROR_PROMISE_0100', 'promise', 'scale', { a: 10 }, 1.0)
}) })
/** /**
* @tc.number : scaleErr_002 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_ERROR_PROMISE_0200
* @tc.name : Pixelmap Scale-promise-wrong x * @tc.name : Pixelmap Scale-promise-wrong x
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call scale * : 2.call scale
...@@ -1104,12 +1104,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1104,12 +1104,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('scaleErr_002', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_ERROR_PROMISE_0200', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'scaleErr_002', 'promise', 'scale', 'a', 1.0) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_ERROR_PROMISE_0200', 'promise', 'scale', 'a', 1.0)
}) })
/** /**
* @tc.number : scaleErr_003 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_ERROR_PROMISE_0300
* @tc.name : Pixelmap Scale-promise-wrong y * @tc.name : Pixelmap Scale-promise-wrong y
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call scale * : 2.call scale
...@@ -1117,13 +1117,13 @@ describe('imagePixelMapFramework', function () { ...@@ -1117,13 +1117,13 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('scaleErr_003', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_ERROR_PROMISE_0300', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'scaleErr_003', 'promise', 'scale', 1.0, null) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_ERROR_PROMISE_0300', 'promise', 'scale', 1.0, null)
}) })
/** /**
* @tc.number : scaleErr_004 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_ERROR_PROMISE_0400
* @tc.name : Pixelmap Scale-promise-wrong y * @tc.name : Pixelmap Scale-promise-wrong y
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call scale * : 2.call scale
...@@ -1131,13 +1131,13 @@ describe('imagePixelMapFramework', function () { ...@@ -1131,13 +1131,13 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('scaleErr_004', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_ERROR_PROMISE_0400', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'scaleErr_004', 'promise', 'scale', 1.0, true) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_ERROR_PROMISE_0400', 'promise', 'scale', 1.0, true)
}) })
/** /**
* @tc.number : scaleErr_005 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_ERROR_CALLBACK_0100
* @tc.name : Pixelmap Scale-callback-wrong x * @tc.name : Pixelmap Scale-callback-wrong x
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call scale * : 2.call scale
...@@ -1145,12 +1145,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1145,12 +1145,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('scaleErr_005', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_ERROR_CALLBACK_0100', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'scaleErr_005', 'callback', 'scale', { a: 10 }, 1.0) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_ERROR_CALLBACK_0100', 'callback', 'scale', { a: 10 }, 1.0)
}) })
/** /**
* @tc.number : scaleErr_006 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_ERROR_CALLBACK_0200
* @tc.name : Pixelmap Scale-callback-wrong x * @tc.name : Pixelmap Scale-callback-wrong x
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call scale * : 2.call scale
...@@ -1158,12 +1158,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1158,12 +1158,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('scaleErr_006', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_ERROR_CALLBACK_0200', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'scaleErr_006', 'callback', 'scale', 'a', 1.0) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_ERROR_CALLBACK_0200', 'callback', 'scale', 'a', 1.0)
}) })
/** /**
* @tc.number : scaleErr_007 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_ERROR_CALLBACK_0300
* @tc.name : Pixelmap Scale-callback-wrong y * @tc.name : Pixelmap Scale-callback-wrong y
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call scale * : 2.call scale
...@@ -1171,12 +1171,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1171,12 +1171,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('scaleErr_007', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_ERROR_CALLBACK_0300', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'scaleErr_007', 'callback', 'scale', 1.0, null) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_ERROR_CALLBACK_0300', 'callback', 'scale', 1.0, null)
}) })
/** /**
* @tc.number : scaleErr_008 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_ERROR_CALLBACK_0400
* @tc.name : Pixelmap Scale-callback-wrong y * @tc.name : Pixelmap Scale-callback-wrong y
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call scale * : 2.call scale
...@@ -1184,12 +1184,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1184,12 +1184,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('scaleErr_008', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_ERROR_CALLBACK_0400', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'scaleErr_008', 'callback', 'scale', 1.0, true) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_SCALE_ERROR_CALLBACK_0400', 'callback', 'scale', 1.0, true)
}) })
/** /**
* @tc.number : translateErr_001 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_ERROR_PROMISE_0100
* @tc.name : Pixelmap Translate -promise-wrong x * @tc.name : Pixelmap Translate -promise-wrong x
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call translate * : 2.call translate
...@@ -1197,12 +1197,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1197,12 +1197,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('translateErr_001', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_ERROR_PROMISE_0100', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'translateErr_001', 'promise', 'translate', { a: 10 }, 1.0) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_ERROR_PROMISE_0100', 'promise', 'translate', { a: 10 }, 1.0)
}) })
/** /**
* @tc.number : translateErr_002 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_ERROR_PROMISE_0200
* @tc.name : Pixelmap Translate -promise-wrong x * @tc.name : Pixelmap Translate -promise-wrong x
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call translate * : 2.call translate
...@@ -1210,12 +1210,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1210,12 +1210,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('translateErr_002', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_ERROR_PROMISE_0200', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'translateErr_002', 'promise', 'translate', 'a', 1.0) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_ERROR_PROMISE_0200', 'promise', 'translate', 'a', 1.0)
}) })
/** /**
* @tc.number : translateErr_003 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_ERROR_PROMISE_0300
* @tc.name : Pixelmap Translate -promise-wrong y * @tc.name : Pixelmap Translate -promise-wrong y
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call translate * : 2.call translate
...@@ -1223,12 +1223,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1223,12 +1223,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('translateErr_003', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_ERROR_PROMISE_0300', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'translateErr_003', 'promise', 'translate', 1.0, null) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_ERROR_PROMISE_0300', 'promise', 'translate', 1.0, null)
}) })
/** /**
* @tc.number : translateErr_004 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_ERROR_PROMISE_0400
* @tc.name : Pixelmap Translate -promise-wrong y * @tc.name : Pixelmap Translate -promise-wrong y
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call translate * : 2.call translate
...@@ -1236,12 +1236,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1236,12 +1236,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('translateErr_004', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_ERROR_PROMISE_0400', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'translateErr_004', 'promise', 'translate', 1.0, false) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_ERROR_PROMISE_0400', 'promise', 'translate', 1.0, false)
}) })
/** /**
* @tc.number : translateErr_005 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_ERROR_CALLBACK_0100
* @tc.name : Pixelmap Translate -callback-wrong x * @tc.name : Pixelmap Translate -callback-wrong x
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call translate * : 2.call translate
...@@ -1249,12 +1249,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1249,12 +1249,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('translateErr_005', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_ERROR_CALLBACK_0100', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'translateErr_005', 'callback', 'translate', { a: 10 }, 1.0) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_ERROR_CALLBACK_0100', 'callback', 'translate', { a: 10 }, 1.0)
}) })
/** /**
* @tc.number : translateErr_006 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_ERROR_CALLBACK_0200
* @tc.name : Pixelmap Translate -callback-wrong x * @tc.name : Pixelmap Translate -callback-wrong x
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call translate * : 2.call translate
...@@ -1262,12 +1262,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1262,12 +1262,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('translateErr_006', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_ERROR_CALLBACK_0200', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'translateErr_006', 'callback', 'translate', 'a', 1.0) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_ERROR_CALLBACK_0200', 'callback', 'translate', 'a', 1.0)
}) })
/** /**
* @tc.number : translateErr_007 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_ERROR_CALLBACK_0300
* @tc.name : Pixelmap Translate -callback-wrong y * @tc.name : Pixelmap Translate -callback-wrong y
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call translate * : 2.call translate
...@@ -1275,12 +1275,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1275,12 +1275,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('translateErr_007', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_ERROR_CALLBACK_0300', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'translateErr_007', 'callback', 'translate', 1.0, null) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_ERROR_CALLBACK_0300', 'callback', 'translate', 1.0, null)
}) })
/** /**
* @tc.number : translateErr_008 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_ERROR_CALLBACK_0400
* @tc.name : Pixelmap Translate -callback-wrong y * @tc.name : Pixelmap Translate -callback-wrong y
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call translate * : 2.call translate
...@@ -1288,12 +1288,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1288,12 +1288,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('translateErr_008', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_ERROR_CALLBACK_0400', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'translateErr_008', 'callback', 'translate', 1.0, false) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_TRANSLATE_ERROR_CALLBACK_0400', 'callback', 'translate', 1.0, false)
}) })
/** /**
* @tc.number : rotateErr_001 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_ROTATE_ERROR_ANGLE_PROMISE_0100
* @tc.name : Pixelmap Rotate-promise-wrong angle * @tc.name : Pixelmap Rotate-promise-wrong angle
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call rotate * : 2.call rotate
...@@ -1301,12 +1301,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1301,12 +1301,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('rotateErr_001', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_ROTATE_ERROR_ANGLE_PROMISE_0100', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'rotateErr_001', 'promise', 'rotate', 'a') await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_ROTATE_ERROR_ANGLE_PROMISE_0100', 'promise', 'rotate', 'a')
}) })
/** /**
* @tc.number : rotateErr_002 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_ROTATE_ERROR_ANGLE_PROMISE_0200
* @tc.name : Pixelmap Rotate-promise-wrong angle * @tc.name : Pixelmap Rotate-promise-wrong angle
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call rotate * : 2.call rotate
...@@ -1314,12 +1314,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1314,12 +1314,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('rotateErr_002', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_ROTATE_ERROR_ANGLE_PROMISE_0200', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'rotateErr_002', 'promise', 'rotate', { a: 10 }) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_ROTATE_ERROR_ANGLE_PROMISE_0200', 'promise', 'rotate', { a: 10 })
}) })
/** /**
* @tc.number : rotateErr_003 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_ROTATE_ERROR_ANGLE_PROMISE_0300
* @tc.name : Pixelmap Rotate-promise-wrong angle * @tc.name : Pixelmap Rotate-promise-wrong angle
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call rotate * : 2.call rotate
...@@ -1327,12 +1327,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1327,12 +1327,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('rotateErr_003', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_ROTATE_ERROR_ANGLE_PROMISE_0300', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'rotateErr_003', 'promise', 'rotate', null) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_ROTATE_ERROR_ANGLE_PROMISE_0300', 'promise', 'rotate', null)
}) })
/** /**
* @tc.number : rotateErr_004 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_ROTATE_ERROR_ANGLE_PROMISE_0400
* @tc.name : Pixelmap Rotate-promise-wrong angle * @tc.name : Pixelmap Rotate-promise-wrong angle
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call rotate * : 2.call rotate
...@@ -1340,12 +1340,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1340,12 +1340,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('rotateErr_004', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_ROTATE_ERROR_ANGLE_PROMISE_0400', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'rotateErr_004', 'promise', 'rotate', false) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_ROTATE_ERROR_ANGLE_PROMISE_0400', 'promise', 'rotate', false)
}) })
/** /**
* @tc.number : rotateErr_005 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_ROTATE_ERROR_ANGLE_CALLBACK_0100
* @tc.name : Pixelmap Rotate-callback-wrong angle * @tc.name : Pixelmap Rotate-callback-wrong angle
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call rotate * : 2.call rotate
...@@ -1353,12 +1353,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1353,12 +1353,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('rotateErr_005', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_ROTATE_ERROR_ANGLE_CALLBACK_0100', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'rotateErr_005', 'callback', 'rotate', 'a') await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_ROTATE_ERROR_ANGLE_CALLBACK_0100', 'callback', 'rotate', 'a')
}) })
/** /**
* @tc.number : rotateErr_006 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_ROTATE_ERROR_ANGLE_CALLBACK_0200
* @tc.name : Pixelmap Rotate-callback-wrong angle * @tc.name : Pixelmap Rotate-callback-wrong angle
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call rotate * : 2.call rotate
...@@ -1366,12 +1366,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1366,12 +1366,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('rotateErr_006', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_ROTATE_ERROR_ANGLE_CALLBACK_0200', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'rotateErr_006', 'callback', 'rotate', { a: 10 }) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_ROTATE_ERROR_ANGLE_CALLBACK_0200', 'callback', 'rotate', { a: 10 })
}) })
/** /**
* @tc.number : rotateErr_007 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_ROTATE_ERROR_ANGLE_CALLBACK_0300
* @tc.name : Pixelmap Rotate-callback-wrong angle * @tc.name : Pixelmap Rotate-callback-wrong angle
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call rotate * : 2.call rotate
...@@ -1379,12 +1379,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1379,12 +1379,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('rotateErr_007', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_ROTATE_ERROR_ANGLE_CALLBACK_0300', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'rotateErr_007', 'callback', 'rotate', null) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_ROTATE_ERROR_ANGLE_CALLBACK_0300', 'callback', 'rotate', null)
}) })
/** /**
* @tc.number : rotateErr_008 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_ROTATE_ERROR_ANGLE_CALLBACK_0400
* @tc.name : Pixelmap Rotate-callback-wrong angle * @tc.name : Pixelmap Rotate-callback-wrong angle
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call rotate * : 2.call rotate
...@@ -1392,12 +1392,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1392,12 +1392,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('rotateErr_008', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_ROTATE_ERROR_ANGLE_CALLBACK_0400', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'rotateErr_008', 'callback', 'rotate', false) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_ROTATE_ERROR_ANGLE_CALLBACK_0400', 'callback', 'rotate', false)
}) })
/** /**
* @tc.number : flipErr_001 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_FLIP_ERROR_PROMISE_0100
* @tc.name : Pixelmap Flip-promise-wrong x * @tc.name : Pixelmap Flip-promise-wrong x
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call flip * : 2.call flip
...@@ -1405,12 +1405,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1405,12 +1405,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('flipErr_001', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_FLIP_ERROR_PROMISE_0100', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'flipErr_001', 'promise', 'flip', 'false', true) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_FLIP_ERROR_PROMISE_0100', 'promise', 'flip', 'false', true)
}) })
/** /**
* @tc.number : flipErr_002 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_FLIP_ERROR_PROMISE_0200
* @tc.name : Pixelmap Flip-promise-wrong x * @tc.name : Pixelmap Flip-promise-wrong x
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call flip * : 2.call flip
...@@ -1418,12 +1418,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1418,12 +1418,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('flipErr_002', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_FLIP_ERROR_PROMISE_0200', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'flipErr_002', 'promise', 'flip', 1, true) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_FLIP_ERROR_PROMISE_0200', 'promise', 'flip', 1, true)
}) })
/** /**
* @tc.number : flipErr_003 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_FLIP_ERROR_PROMISE_0300
* @tc.name : Pixelmap Flip-promise-wrong y * @tc.name : Pixelmap Flip-promise-wrong y
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call flip * : 2.call flip
...@@ -1431,12 +1431,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1431,12 +1431,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('flipErr_003', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_FLIP_ERROR_PROMISE_0300', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'flipErr_003', 'promise', 'flip', true, { a: 10 }) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_FLIP_ERROR_PROMISE_0300', 'promise', 'flip', true, { a: 10 })
}) })
/** /**
* @tc.number : flipErr_004 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_FLIP_ERROR_PROMISE_0400
* @tc.name : Pixelmap Flip-promise-wrong y * @tc.name : Pixelmap Flip-promise-wrong y
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call flip * : 2.call flip
...@@ -1444,12 +1444,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1444,12 +1444,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('flipErr_004', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_FLIP_ERROR_PROMISE_0400', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'flipErr_004', 'promise', 'flip', true, null) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_FLIP_ERROR_PROMISE_0400', 'promise', 'flip', true, null)
}) })
/** /**
* @tc.number : flipErr_005 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_FLIP_ERROR_CALLBACK_0100
* @tc.name : Pixelmap Flip-callback-wrong x * @tc.name : Pixelmap Flip-callback-wrong x
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call flip * : 2.call flip
...@@ -1457,12 +1457,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1457,12 +1457,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('flipErr_005', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_FLIP_ERROR_CALLBACK_0100', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'flipErr_005', 'callback', 'flip', 'false', true) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_FLIP_ERROR_CALLBACK_0100', 'callback', 'flip', 'false', true)
}) })
/** /**
* @tc.number : flipErr_006 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_FLIP_ERROR_CALLBACK_0200
* @tc.name : Pixelmap Flip-callback-wrong x * @tc.name : Pixelmap Flip-callback-wrong x
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call flip * : 2.call flip
...@@ -1470,12 +1470,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1470,12 +1470,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('flipErr_006', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_FLIP_ERROR_CALLBACK_0200', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'flipErr_006', 'callback', 'flip', 1, true) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_FLIP_ERROR_CALLBACK_0200', 'callback', 'flip', 1, true)
}) })
/** /**
* @tc.number : flipErr_007 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_FLIP_ERROR_CALLBACK_0300
* @tc.name : Pixelmap Flip-callback-wrong y * @tc.name : Pixelmap Flip-callback-wrong y
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call flip * : 2.call flip
...@@ -1483,12 +1483,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1483,12 +1483,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('flipErr_007', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_FLIP_ERROR_CALLBACK_0300', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'flipErr_007', 'callback', 'flip', true, { a: 10 }) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_FLIP_ERROR_CALLBACK_0300', 'callback', 'flip', true, { a: 10 })
}) })
/** /**
* @tc.number : flipErr_008 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_FLIP_ERROR_CALLBACK_0400
* @tc.name : Pixelmap Flip-callback-wrong y * @tc.name : Pixelmap Flip-callback-wrong y
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.call flip * : 2.call flip
...@@ -1496,12 +1496,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1496,12 +1496,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('flipErr_008', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_FLIP_ERROR_CALLBACK_0400', 0, async function (done) {
await pixelMapModifySizeTestErr(done, 'flipErr_008', 'callback', 'flip', true, null) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_PIXELMAP_FLIP_ERROR_CALLBACK_0400', 'callback', 'flip', true, null)
}) })
/** /**
* @tc.number : setAlphaAbleErr_001 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETSUPPORTALPHA_ERROR_ALPHA_0100
* @tc.name : SetSupportAlpha-wrong alpha * @tc.name : SetSupportAlpha-wrong alpha
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* : 2.create pixelmap * : 2.create pixelmap
...@@ -1510,12 +1510,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1510,12 +1510,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('setAlphaAbleErr_001', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETSUPPORTALPHA_ERROR_ALPHA_0100', 0, async function (done) {
setAlphaAbleErr(done, 'setAlphaAbleErr_001', 'a') setAlphaAbleErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETSUPPORTALPHA_ERROR_ALPHA_0100', 'a')
}) })
/** /**
* @tc.number : setAlphaAbleErr_002 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETSUPPORTALPHA_ERROR_ALPHA_0200
* @tc.name : SetSupportAlpha-wrong alpha * @tc.name : SetSupportAlpha-wrong alpha
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* : 2.create pixelmap * : 2.create pixelmap
...@@ -1524,12 +1524,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1524,12 +1524,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('setAlphaAbleErr_002', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETSUPPORTALPHA_ERROR_ALPHA_0200', 0, async function (done) {
setAlphaAbleErr(done, 'setAlphaAbleErr_002', { a: 1 }) setAlphaAbleErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETSUPPORTALPHA_ERROR_ALPHA_0200', { a: 1 })
}) })
/** /**
* @tc.number : setAlphaAbleErr_003 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETSUPPORTALPHA_ERROR_ALPHA_0300
* @tc.name : SetSupportAlpha-wrong alpha * @tc.name : SetSupportAlpha-wrong alpha
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* : 2.create pixelmap * : 2.create pixelmap
...@@ -1538,12 +1538,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1538,12 +1538,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('setAlphaAbleErr_003', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETSUPPORTALPHA_ERROR_ALPHA_0300', 0, async function (done) {
setAlphaAbleErr(done, 'setAlphaAbleErr_003', null) setAlphaAbleErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETSUPPORTALPHA_ERROR_ALPHA_0300', null)
}) })
/** /**
* @tc.number : setAlphaAbleErr_004 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETSUPPORTALPHA_ERROR_ALPHA_0400
* @tc.name : SetSupportAlpha-wrong alpha * @tc.name : SetSupportAlpha-wrong alpha
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* : 2.create pixelmap * : 2.create pixelmap
...@@ -1552,12 +1552,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1552,12 +1552,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('setAlphaAbleErr_004', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETSUPPORTALPHA_ERROR_ALPHA_0400', 0, async function (done) {
setAlphaAbleErr(done, 'setAlphaAbleErr_004', 1) setAlphaAbleErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETSUPPORTALPHA_ERROR_ALPHA_0400', 1)
}) })
/** /**
* @tc.number : cropErr_001 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CROP_PROMISE_SIZE_0100
* @tc.name : crop-promise- size: { height: 3, width: 3 }, x: -1, y: 1 * @tc.name : crop-promise- size: { height: 3, width: 3 }, x: -1, y: 1
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* : 2.crop * : 2.crop
...@@ -1568,13 +1568,13 @@ describe('imagePixelMapFramework', function () { ...@@ -1568,13 +1568,13 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('cropErr_001', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CROP_PROMISE_SIZE_0100', 0, async function (done) {
var region = { size: { height: 3, width: 3 }, x: -1, y: 1 }; var region = { size: { height: 3, width: 3 }, x: -1, y: 1 };
await pixelMapModifySizeTestErr(done, 'cropErr_001', 'promise', 'crop', region) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CROP_PROMISE_SIZE_0100', 'promise', 'crop', region)
}) })
/** /**
* @tc.number : cropErr_002 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CROP_PROMISE_SIZE_0200
* @tc.name : crop-promise-size: { height: 3, width: 3 }, x: 1, y: -1 * @tc.name : crop-promise-size: { height: 3, width: 3 }, x: 1, y: -1
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* : 2.crop * : 2.crop
...@@ -1585,13 +1585,13 @@ describe('imagePixelMapFramework', function () { ...@@ -1585,13 +1585,13 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('cropErr_002', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CROP_PROMISE_SIZE_0200', 0, async function (done) {
var region = { size: { height: 3, width: 3 }, x: 1, y: -1 }; var region = { size: { height: 3, width: 3 }, x: 1, y: -1 };
await pixelMapModifySizeTestErr(done, 'cropErr_002', 'promise', 'crop', region) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CROP_PROMISE_SIZE_0200', 'promise', 'crop', region)
}) })
/** /**
* @tc.number : cropErr_003 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CROP_PROMISE_SIZE_0300
* @tc.name : crop-promise-size: { height: 3, width: -3 }, x: 1, y: 1 * @tc.name : crop-promise-size: { height: 3, width: -3 }, x: 1, y: 1
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* : 2.crop * : 2.crop
...@@ -1602,13 +1602,13 @@ describe('imagePixelMapFramework', function () { ...@@ -1602,13 +1602,13 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('cropErr_003', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CROP_PROMISE_SIZE_0300', 0, async function (done) {
var region = { size: { height: 3, width: -3 }, x: 1, y: 1 }; var region = { size: { height: 3, width: -3 }, x: 1, y: 1 };
await pixelMapModifySizeTestErr(done, 'cropErr_003', 'promise', 'crop', region) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CROP_PROMISE_SIZE_0300', 'promise', 'crop', region)
}) })
/** /**
* @tc.number : cropErr_004 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CROP_PROMISE_SIZE_0400
* @tc.name : crop-promise-size: { height: -3, width: 3 }, x: 1, y: 1 * @tc.name : crop-promise-size: { height: -3, width: 3 }, x: 1, y: 1
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* : 2.crop * : 2.crop
...@@ -1619,13 +1619,13 @@ describe('imagePixelMapFramework', function () { ...@@ -1619,13 +1619,13 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('cropErr_004', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CROP_PROMISE_SIZE_0400', 0, async function (done) {
var region = { size: { height: -3, width: 3 }, x: 1, y: 1 }; var region = { size: { height: -3, width: 3 }, x: 1, y: 1 };
await pixelMapModifySizeTestErr(done, 'cropErr_004', 'promise', 'crop', region) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CROP_PROMISE_SIZE_0400', 'promise', 'crop', region)
}) })
/** /**
* @tc.number : cropErr_005 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CROP_CALLBACK_SIZE_0100
* @tc.name : crop-callback-size: { height: 3, width: 3 }, x: -1, y: 1 * @tc.name : crop-callback-size: { height: 3, width: 3 }, x: -1, y: 1
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* : 2.crop * : 2.crop
...@@ -1636,13 +1636,13 @@ describe('imagePixelMapFramework', function () { ...@@ -1636,13 +1636,13 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('cropErr_005', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CROP_CALLBACK_SIZE_0100', 0, async function (done) {
var region = { size: { height: 3, width: 3 }, x: -1, y: 1 }; var region = { size: { height: 3, width: 3 }, x: -1, y: 1 };
await pixelMapModifySizeTestErr(done, 'cropErr_005', 'callback', 'crop', region) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CROP_CALLBACK_SIZE_0100', 'callback', 'crop', region)
}) })
/** /**
* @tc.number : cropErr_006 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CROP_CALLBACK_SIZE_0200
* @tc.name : crop-callback-size: { height: 3, width: 3 }, x: 1, y: -1 * @tc.name : crop-callback-size: { height: 3, width: 3 }, x: 1, y: -1
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* : 2.crop * : 2.crop
...@@ -1653,13 +1653,13 @@ describe('imagePixelMapFramework', function () { ...@@ -1653,13 +1653,13 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('cropErr_006', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CROP_CALLBACK_SIZE_0200', 0, async function (done) {
var region = { size: { height: 3, width: 3 }, x: 1, y: -1 }; var region = { size: { height: 3, width: 3 }, x: 1, y: -1 };
await pixelMapModifySizeTestErr(done, 'cropErr_006', 'callback', 'crop', region) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CROP_CALLBACK_SIZE_0200', 'callback', 'crop', region)
}) })
/** /**
* @tc.number : cropErr_007 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CROP_CALLBACK_SIZE_0300
* @tc.name : crop-callback-size: { height: 3, width: -3 }, x: 1, y: 1 * @tc.name : crop-callback-size: { height: 3, width: -3 }, x: 1, y: 1
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* : 2.crop * : 2.crop
...@@ -1670,13 +1670,13 @@ describe('imagePixelMapFramework', function () { ...@@ -1670,13 +1670,13 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('cropErr_007', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CROP_CALLBACK_SIZE_0300', 0, async function (done) {
var region = { size: { height: 3, width: -3 }, x: 1, y: 1 }; var region = { size: { height: 3, width: -3 }, x: 1, y: 1 };
await pixelMapModifySizeTestErr(done, 'cropErr_007', 'callback', 'crop', region) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CROP_CALLBACK_SIZE_0300', 'callback', 'crop', region)
}) })
/** /**
* @tc.number : cropErr_008 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CROP_CALLBACK_SIZE_0400
* @tc.name : crop-callback-size: { height: -3, width: 3 }, x: 1, y: 1 * @tc.name : crop-callback-size: { height: -3, width: 3 }, x: 1, y: 1
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* : 2.crop * : 2.crop
...@@ -1687,13 +1687,13 @@ describe('imagePixelMapFramework', function () { ...@@ -1687,13 +1687,13 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('cropErr_008', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CROP_CALLBACK_SIZE_0400', 0, async function (done) {
var region = { size: { height: -3, width: 3 }, x: 1, y: 1 }; var region = { size: { height: -3, width: 3 }, x: 1, y: 1 };
await pixelMapModifySizeTestErr(done, 'cropErr_008', 'callback', 'crop', region) await pixelMapModifySizeTestErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_CROP_CALLBACK_SIZE_0400', 'callback', 'crop', region)
}) })
/** /**
* @tc.number : setDensityErr_001 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETDENSITY_GIF_ERROR_DENSITY_0100
* @tc.name : setDensity-gif-wrong density * @tc.name : setDensity-gif-wrong density
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* : 2.create PixelMap * : 2.create PixelMap
...@@ -1702,13 +1702,13 @@ describe('imagePixelMapFramework', function () { ...@@ -1702,13 +1702,13 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('setDensityErr_001', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETDENSITY_GIF_ERROR_DENSITY_0100', 0, async function (done) {
var imageData = testGif.buffer; var imageData = testGif.buffer;
setDensityErr(done, 'setDensityErr_001', imageData, null) setDensityErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETDENSITY_GIF_ERROR_DENSITY_0100', imageData, null)
}) })
/** /**
* @tc.number : setDensityErr_002 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETDENSITY_GIF_ERROR_DENSITY_0200
* @tc.name : setDensity-gif-wrong density * @tc.name : setDensity-gif-wrong density
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* : 2.create PixelMap * : 2.create PixelMap
...@@ -1717,13 +1717,13 @@ describe('imagePixelMapFramework', function () { ...@@ -1717,13 +1717,13 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('setDensityErr_002', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETDENSITY_GIF_ERROR_DENSITY_0200', 0, async function (done) {
var imageData = testGif.buffer; var imageData = testGif.buffer;
setDensityErr(done, 'setDensityErr_002', imageData, 'a') setDensityErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETDENSITY_GIF_ERROR_DENSITY_0200', imageData, 'a')
}) })
/** /**
* @tc.number : setDensityErr_003 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETDENSITY_GIF_ERROR_DENSITY_0300
* @tc.name : setDensity-gif-wrong density * @tc.name : setDensity-gif-wrong density
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* : 2.create PixelMap * : 2.create PixelMap
...@@ -1732,13 +1732,13 @@ describe('imagePixelMapFramework', function () { ...@@ -1732,13 +1732,13 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('setDensityErr_003', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETDENSITY_GIF_ERROR_DENSITY_0300', 0, async function (done) {
var imageData = testGif.buffer; var imageData = testGif.buffer;
setDensityErr(done, 'setDensityErr_003', imageData, true) setDensityErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETDENSITY_GIF_ERROR_DENSITY_0300', imageData, true)
}) })
/** /**
* @tc.number : setDensityErr_004 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETDENSITY_GIF_ERROR_DENSITY_0400
* @tc.name : setDensity-gif-wrong density * @tc.name : setDensity-gif-wrong density
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* : 2.create PixelMap * : 2.create PixelMap
...@@ -1747,13 +1747,13 @@ describe('imagePixelMapFramework', function () { ...@@ -1747,13 +1747,13 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('setDensityErr_004', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETDENSITY_GIF_ERROR_DENSITY_0400', 0, async function (done) {
var imageData = testGif.buffer; var imageData = testGif.buffer;
setDensityErr(done, 'setDensityErr_004', imageData, { a: 1 }) setDensityErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_SETDENSITY_GIF_ERROR_DENSITY_0400', imageData, { a: 1 })
}) })
/** /**
* @tc.number : opacityErr_001 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_OPACITY_PROMISE_ERROR_ALPHA_0100
* @tc.name : opacity-promise-wrong alpha * @tc.name : opacity-promise-wrong alpha
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.opacity * : 2.opacity
...@@ -1761,12 +1761,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1761,12 +1761,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('opacityErr_001', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_OPACITY_PROMISE_ERROR_ALPHA_0100', 0, async function (done) {
opacityErr(done, 'opacityErr_001', { a: 1 }, 'Promise') opacityErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_OPACITY_PROMISE_ERROR_ALPHA_0100', { a: 1 }, 'Promise')
}) })
/** /**
* @tc.number : opacityErr_002 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_OPACITY_PROMISE_ERROR_ALPHA_0200
* @tc.name : opacity-promise-wrong alpha * @tc.name : opacity-promise-wrong alpha
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.opacity * : 2.opacity
...@@ -1774,12 +1774,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1774,12 +1774,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('opacityErr_002', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_OPACITY_PROMISE_ERROR_ALPHA_0200', 0, async function (done) {
opacityErr(done, 'opacityErr_002', 'a', 'Promise') opacityErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_OPACITY_PROMISE_ERROR_ALPHA_0200', 'a', 'Promise')
}) })
/** /**
* @tc.number : opacityErr_003 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_OPACITY_PROMISE_ERROR_ALPHA_0300
* @tc.name : opacity-promise-wrong alpha * @tc.name : opacity-promise-wrong alpha
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.opacity * : 2.opacity
...@@ -1787,12 +1787,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1787,12 +1787,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('opacityErr_003', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_OPACITY_PROMISE_ERROR_ALPHA_0300', 0, async function (done) {
opacityErr(done, 'opacityErr_003', null, 'Promise') opacityErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_OPACITY_PROMISE_ERROR_ALPHA_0300', null, 'Promise')
}) })
/** /**
* @tc.number : opacityErr_004 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_OPACITY_PROMISE_ERROR_ALPHA_0400
* @tc.name : opacity-promise-wrong alpha * @tc.name : opacity-promise-wrong alpha
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.opacity * : 2.opacity
...@@ -1800,12 +1800,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1800,12 +1800,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('opacityErr_004', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_OPACITY_PROMISE_ERROR_ALPHA_0400', 0, async function (done) {
opacityErr(done, 'opacityErr_004', 2, 'Promise') opacityErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_OPACITY_PROMISE_ERROR_ALPHA_0400', 2, 'Promise')
}) })
/** /**
* @tc.number : opacityErr_005 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_OPACITY_CALLBACK_ERROR_ALPHA_0100
* @tc.name : opacity-callback-wrong alpha * @tc.name : opacity-callback-wrong alpha
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.opacity * : 2.opacity
...@@ -1813,12 +1813,12 @@ describe('imagePixelMapFramework', function () { ...@@ -1813,12 +1813,12 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('opacityErr_005', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_OPACITY_CALLBACK_ERROR_ALPHA_0100', 0, async function (done) {
opacityErr(done, 'opacityErr_005', { a: 1 }, 'callback') opacityErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_OPACITY_CALLBACK_ERROR_ALPHA_0100', { a: 1 }, 'callback')
}) })
/** /**
* @tc.number : opacityErr_006 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_OPACITY_CALLBACK_ERROR_ALPHA_0200
* @tc.name : opacity-callback-wrong alpha * @tc.name : opacity-callback-wrong alpha
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.opacity * : 2.opacity
...@@ -1826,33 +1826,33 @@ describe('imagePixelMapFramework', function () { ...@@ -1826,33 +1826,33 @@ describe('imagePixelMapFramework', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('opacityErr_006', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_OPACITY_CALLBACK_ERROR_ALPHA_0200', 0, async function (done) {
opacityErr(done, 'opacityErr_006', 'a', 'callback') opacityErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_OPACITY_CALLBACK_ERROR_ALPHA_0200', 'a', 'callback')
}) })
/** /**
* @tc.number : opacityErr_007 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_OPACITY_CALLBACK_ERROR_ALPHA_0300
* @tc.name : opacityErr-callback-wrong alpha * @tc.name : opacity-callback-wrong alpha
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.opacityErr * : 2.opacityErr
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('opacityErr_007', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_OPACITY_CALLBACK_ERROR_ALPHA_0300', 0, async function (done) {
opacityErr(done, 'opacityErr_007', null, 'callback') opacityErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_OPACITY_CALLBACK_ERROR_ALPHA_0300', null, 'callback')
}) })
/** /**
* @tc.number : opacityErr_008 * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_OPACITY_CALLBACK_ERROR_ALPHA_0400
* @tc.name : opacityErr-callback-wrong alpha * @tc.name : opacity-callback-wrong alpha
* @tc.desc : 1.create pixelmap * @tc.desc : 1.create pixelmap
* : 2.opacity * : 2.opacity
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('opacityErr_008', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_OPACITY_CALLBACK_ERROR_ALPHA_0400', 0, async function (done) {
opacityErr(done, 'opacityErr_008', 2, 'callback') opacityErr(done, 'SUB_GRAPHIC_IMAGE_PIXELMAPFRAMEWORK_OPACITY_CALLBACK_ERROR_ALPHA_0400', 2, 'callback')
}) })
})} })}
...@@ -35,7 +35,7 @@ describe('Image', function () { ...@@ -35,7 +35,7 @@ describe('Image', function () {
}) })
/** /**
* @tc.number : RGBA_001 * @tc.number : SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_PROMISE_0100
* @tc.name : create pixelmap-promise (editable: true, pixelFormat: RGBA_F16, * @tc.name : create pixelmap-promise (editable: true, pixelFormat: RGBA_F16,
* size: { height: 4, width: 6 }, bytes = buffer) * size: { height: 4, width: 6 }, bytes = buffer)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
...@@ -46,7 +46,7 @@ describe('Image', function () { ...@@ -46,7 +46,7 @@ describe('Image', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('RGBA_001', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_PROMISE_0100', 0, async function (done) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
let opts = { editable: true, pixelFormat: 7, size: { height: 4, width: 6 } } let opts = { editable: true, pixelFormat: 7, size: { height: 4, width: 6 } }
image.createPixelMap(Color, opts) image.createPixelMap(Color, opts)
...@@ -56,14 +56,14 @@ describe('Image', function () { ...@@ -56,14 +56,14 @@ describe('Image', function () {
done(); done();
}) })
.catch(error => { .catch(error => {
console.log('RGBA_001 err' + error); console.log('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_PROMISE_0100 err' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
}) })
}) })
/** /**
* @tc.number : RGBA_002 * @tc.number : SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_CALLBACK_0100
* @tc.name : create pixelmap-callback (editable: true, pixelFormat: RGBA_F16, * @tc.name : create pixelmap-callback (editable: true, pixelFormat: RGBA_F16,
* size: { height: 4, width: 6 },bytes = buffer) * size: { height: 4, width: 6 },bytes = buffer)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
...@@ -74,12 +74,12 @@ describe('Image', function () { ...@@ -74,12 +74,12 @@ describe('Image', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('RGBA_002', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_CALLBACK_0100', 0, async function (done) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
let opts = { editable: true, pixelFormat: 7, size: { height: 4, width: 6 } } let opts = { editable: true, pixelFormat: 7, size: { height: 4, width: 6 } }
image.createPixelMap(Color, opts, (err, pixelmap) => { image.createPixelMap(Color, opts, (err, pixelmap) => {
if (err != undefined) { if (err != undefined) {
console.info('RGBA_002 err: ' + err); console.info('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_CALLBACK_0100 err: ' + err);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
return; return;
...@@ -91,7 +91,7 @@ describe('Image', function () { ...@@ -91,7 +91,7 @@ describe('Image', function () {
}) })
/** /**
* @tc.number : RGBA_003 * @tc.number : SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_PROMISE_0200
* @tc.name : create pixelmap-promise (editable: false, pixelFormat: RGBA_F16, * @tc.name : create pixelmap-promise (editable: false, pixelFormat: RGBA_F16,
* size: { height: 4, width: 6 }, bytes = buffer) * size: { height: 4, width: 6 }, bytes = buffer)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
...@@ -102,7 +102,7 @@ describe('Image', function () { ...@@ -102,7 +102,7 @@ describe('Image', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('RGBA_003', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_PROMISE_0200', 0, async function (done) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
let opts = { editable: false, pixelFormat: 7, size: { height: 4, width: 6 } } let opts = { editable: false, pixelFormat: 7, size: { height: 4, width: 6 } }
image.createPixelMap(Color, opts) image.createPixelMap(Color, opts)
...@@ -112,14 +112,14 @@ describe('Image', function () { ...@@ -112,14 +112,14 @@ describe('Image', function () {
done(); done();
}) })
.catch(error => { .catch(error => {
console.log('RGBA_003 err' + error); console.log('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_PROMISE_0200 err' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
}) })
}) })
/** /**
* @tc.number : RGBA_004 * @tc.number : SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_CALLBACK_0200
* @tc.name : create pixelmap-callback (editable: false, pixelFormat: RGBA_F16, * @tc.name : create pixelmap-callback (editable: false, pixelFormat: RGBA_F16,
* size: { height: 4, width: 6 },bytes = buffer) * size: { height: 4, width: 6 },bytes = buffer)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
...@@ -130,12 +130,12 @@ describe('Image', function () { ...@@ -130,12 +130,12 @@ describe('Image', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('RGBA_004', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_CALLBACK_0200', 0, async function (done) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
let opts = { editable: false, pixelFormat: 7, size: { height: 4, width: 6 } } let opts = { editable: false, pixelFormat: 7, size: { height: 4, width: 6 } }
image.createPixelMap(Color, opts, (err, pixelmap) => { image.createPixelMap(Color, opts, (err, pixelmap) => {
if (err != undefined) { if (err != undefined) {
console.info('RGBA_002 err: ' + err); console.info('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_CALLBACK_0200 err: ' + err);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
return; return;
...@@ -148,7 +148,7 @@ describe('Image', function () { ...@@ -148,7 +148,7 @@ describe('Image', function () {
}) })
/** /**
* @tc.number : RGBA_005 * @tc.number : SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_CALLBACK_0300
* @tc.name : create pixelmap-promise (editable: true, pixelFormat: ALPHA_8, * @tc.name : create pixelmap-promise (editable: true, pixelFormat: ALPHA_8,
* size: { height: 4, width: 6 }, bytes = buffer) * size: { height: 4, width: 6 }, bytes = buffer)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
...@@ -159,7 +159,7 @@ describe('Image', function () { ...@@ -159,7 +159,7 @@ describe('Image', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('RGBA_005', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_CALLBACK_0300', 0, async function (done) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
let opts = { editable: true, pixelFormat: 6, size: { height: 4, width: 6 } } let opts = { editable: true, pixelFormat: 6, size: { height: 4, width: 6 } }
image.createPixelMap(Color, opts) image.createPixelMap(Color, opts)
...@@ -169,14 +169,14 @@ describe('Image', function () { ...@@ -169,14 +169,14 @@ describe('Image', function () {
done(); done();
}) })
.catch(error => { .catch(error => {
console.log('RGBA_005 err' + error); console.log('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_CALLBACK_0300 err' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
}) })
}) })
/** /**
* @tc.number : RGBA_006 * @tc.number : SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_PROMISE_0400
* @tc.name : create pixelmap-promise (editable: true, pixelFormat: RGB_565, * @tc.name : create pixelmap-promise (editable: true, pixelFormat: RGB_565,
* size: { height: 4, width: 6 }, bytes = buffer) * size: { height: 4, width: 6 }, bytes = buffer)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
...@@ -187,7 +187,7 @@ describe('Image', function () { ...@@ -187,7 +187,7 @@ describe('Image', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('RGBA_006', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_PROMISE_0400', 0, async function (done) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
let opts = { editable: true, pixelFormat: 2, size: { height: 4, width: 6 } } let opts = { editable: true, pixelFormat: 2, size: { height: 4, width: 6 } }
image.createPixelMap(Color, opts) image.createPixelMap(Color, opts)
...@@ -197,14 +197,14 @@ describe('Image', function () { ...@@ -197,14 +197,14 @@ describe('Image', function () {
done(); done();
}) })
.catch(error => { .catch(error => {
console.log('RGBA_006 err' + error); console.log('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_PROMISE_0400 err' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
}) })
}) })
/** /**
* @tc.number : RGBA_007 * @tc.number : SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_PROMISE_0500
* @tc.name : create pixelmap-promise (editable: true, pixelFormat: ARGB_8888, * @tc.name : create pixelmap-promise (editable: true, pixelFormat: ARGB_8888,
* size: { height: 4, width: 6 }, bytes = buffer) * size: { height: 4, width: 6 }, bytes = buffer)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
...@@ -215,7 +215,7 @@ describe('Image', function () { ...@@ -215,7 +215,7 @@ describe('Image', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('RGBA_007', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_PROMISE_0500', 0, async function (done) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
let opts = { editable: true, pixelFormat: 1, size: { height: 4, width: 6 } } let opts = { editable: true, pixelFormat: 1, size: { height: 4, width: 6 } }
image.createPixelMap(Color, opts) image.createPixelMap(Color, opts)
...@@ -225,14 +225,14 @@ describe('Image', function () { ...@@ -225,14 +225,14 @@ describe('Image', function () {
done(); done();
}) })
.catch(error => { .catch(error => {
console.log('RGBA_007 err' + error); console.log('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_PROMISE_0500 err' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
}) })
}) })
/** /**
* @tc.number : RGBA_008 * @tc.number : SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_CALLBACK_0300
* @tc.name : create pixelmap-callback (editable: true, pixelFormat: ALPHA_8, * @tc.name : create pixelmap-callback (editable: true, pixelFormat: ALPHA_8,
* size: { height: 4, width: 6 },bytes = buffer) * size: { height: 4, width: 6 },bytes = buffer)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
...@@ -243,12 +243,12 @@ describe('Image', function () { ...@@ -243,12 +243,12 @@ describe('Image', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('RGBA_008', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_CALLBACK_0300', 0, async function (done) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
let opts = { editable: true, pixelFormat: 6, size: { height: 4, width: 6 } } let opts = { editable: true, pixelFormat: 6, size: { height: 4, width: 6 } }
image.createPixelMap(Color, opts, (err, pixelmap) => { image.createPixelMap(Color, opts, (err, pixelmap) => {
if (err != undefined) { if (err != undefined) {
console.info('RGBA_008 err: ' + err); console.info('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_CALLBACK_0300 err: ' + err);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
return; return;
...@@ -261,7 +261,7 @@ describe('Image', function () { ...@@ -261,7 +261,7 @@ describe('Image', function () {
}) })
/** /**
* @tc.number : RGBA_009 * @tc.number : SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_CALLBACK_0400
* @tc.name : create pixelmap-callback (editable: true, pixelFormat: RGB_565, * @tc.name : create pixelmap-callback (editable: true, pixelFormat: RGB_565,
* size: { height: 4, width: 6 },bytes = buffer) * size: { height: 4, width: 6 },bytes = buffer)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
...@@ -272,12 +272,12 @@ describe('Image', function () { ...@@ -272,12 +272,12 @@ describe('Image', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('RGBA_009', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_CALLBACK_0400', 0, async function (done) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
let opts = { editable: true, pixelFormat: 2, size: { height: 4, width: 6 } } let opts = { editable: true, pixelFormat: 2, size: { height: 4, width: 6 } }
image.createPixelMap(Color, opts, (err, pixelmap) => { image.createPixelMap(Color, opts, (err, pixelmap) => {
if (err != undefined) { if (err != undefined) {
console.info('RGBA_009 err: ' + err); console.info('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_CALLBACK_0400 err: ' + err);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
return; return;
...@@ -290,7 +290,7 @@ describe('Image', function () { ...@@ -290,7 +290,7 @@ describe('Image', function () {
}) })
/** /**
* @tc.number : RGBA_010 * @tc.number : SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_CALLBACK_0500
* @tc.name : create pixelmap-callback (editable: true, pixelFormat: ARGB_8888, * @tc.name : create pixelmap-callback (editable: true, pixelFormat: ARGB_8888,
* size: { height: 4, width: 6 },bytes = buffer) * size: { height: 4, width: 6 },bytes = buffer)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
...@@ -301,12 +301,12 @@ describe('Image', function () { ...@@ -301,12 +301,12 @@ describe('Image', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('RGBA_010', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_CALLBACK_0500', 0, async function (done) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
let opts = { editable: true, pixelFormat: 1, size: { height: 4, width: 6 } } let opts = { editable: true, pixelFormat: 1, size: { height: 4, width: 6 } }
image.createPixelMap(Color, opts, (err, pixelmap) => { image.createPixelMap(Color, opts, (err, pixelmap) => {
if (err != undefined) { if (err != undefined) {
console.info('RGBA_010 err: ' + err); console.info('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_CALLBACK_0500 err: ' + err);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
return; return;
...@@ -318,7 +318,7 @@ describe('Image', function () { ...@@ -318,7 +318,7 @@ describe('Image', function () {
}) })
/** /**
* @tc.number : RGBA_011 * @tc.number : SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_CALLBACK_0600
* @tc.name : create pixelmap-callback(editable: true, pixelFormat: unkonwn, size: { height: -1, width: 8 }) * @tc.name : create pixelmap-callback(editable: true, pixelFormat: unkonwn, size: { height: -1, width: 8 })
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
* 2.set editable,pixeFormat,size * 2.set editable,pixeFormat,size
...@@ -328,14 +328,14 @@ describe('Image', function () { ...@@ -328,14 +328,14 @@ describe('Image', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('RGBA_011', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_CALLBACK_0600', 0, async function (done) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
let opts = { editable: true, pixelFormat: 0, size: { height: -1, width: 8 } } let opts = { editable: true, pixelFormat: 0, size: { height: -1, width: 8 } }
image.createPixelMap(Color, opts, (err, pixelmap) => { image.createPixelMap(Color, opts, (err, pixelmap) => {
if (err) { if (err) {
console.info('RGBA_011 err: ' + err); console.info('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_CALLBACK_0600 err: ' + err);
expect(pixelmap == undefined).assertTrue(); expect(pixelmap == undefined).assertTrue();
console.info('RGBA_011 pass'); console.info('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_CALLBACK_0600 pass');
done(); done();
} else { } else {
expect(false).assertTrue(); expect(false).assertTrue();
...@@ -345,7 +345,7 @@ describe('Image', function () { ...@@ -345,7 +345,7 @@ describe('Image', function () {
}) })
/** /**
* @tc.number : RGBA_012 * @tc.number : SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_CALLBACK_0700
* @tc.name : create pixelmap-callback(editable: true, pixelFormat: ARGB_8888, size: { height: 6, width: -1 }) * @tc.name : create pixelmap-callback(editable: true, pixelFormat: ARGB_8888, size: { height: 6, width: -1 })
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
* 2.set editable,pixeFormat,size * 2.set editable,pixeFormat,size
...@@ -355,14 +355,14 @@ describe('Image', function () { ...@@ -355,14 +355,14 @@ describe('Image', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('RGBA_012', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_CALLBACK_0700', 0, async function (done) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
let opts = { editable: true, pixelFormat: 1, size: { height: 6, width: -1 } } let opts = { editable: true, pixelFormat: 1, size: { height: 6, width: -1 } }
image.createPixelMap(Color, opts, (err, pixelmap) => { image.createPixelMap(Color, opts, (err, pixelmap) => {
if (err) { if (err) {
console.info('RGBA_012 err: ' + err); console.info('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_CALLBACK_0700 err: ' + err);
expect(pixelmap == undefined).assertTrue(); expect(pixelmap == undefined).assertTrue();
console.info('RGBA_012 pass'); console.info('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_CALLBACK_0700 pass');
done(); done();
} else { } else {
expect(false).assertTrue(); expect(false).assertTrue();
...@@ -372,7 +372,7 @@ describe('Image', function () { ...@@ -372,7 +372,7 @@ describe('Image', function () {
}) })
/** /**
* @tc.number : RGBA_013 * @tc.number : SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_PROMISE_0600
* @tc.name : create pixelmap-promise(editable: true, pixelFormat: unkonwn, size: { height: -1, width: 8 }) * @tc.name : create pixelmap-promise(editable: true, pixelFormat: unkonwn, size: { height: -1, width: 8 })
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
* 2.set editable,pixeFormat,size * 2.set editable,pixeFormat,size
...@@ -382,22 +382,22 @@ describe('Image', function () { ...@@ -382,22 +382,22 @@ describe('Image', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('RGBA_013', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_PROMISE_0600', 0, async function (done) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
let opts = { editable: true, pixelFormat: 0, size: { height: -1, width: 8 } } let opts = { editable: true, pixelFormat: 0, size: { height: -1, width: 8 } }
image.createPixelMap(Color, opts).then(pixelmap => { image.createPixelMap(Color, opts).then(pixelmap => {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('RGBA_013 failed'); console.info('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_PROMISE_0600 failed');
done(); done();
}).catch(error => { }).catch(error => {
console.log('RGBA_013 err: ' + error); console.log('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_PROMISE_0600 err: ' + error);
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
}) })
}) })
/** /**
* @tc.number : RGBA_014 * @tc.number : SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_PROMISE_0700
* @tc.name : create pixelmap-promise(editable: true, pixelFormat: unkonwn, size: { height: 6, width: -1 }) * @tc.name : create pixelmap-promise(editable: true, pixelFormat: unkonwn, size: { height: 6, width: -1 })
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
* 2.set editable,pixeFormat,size * 2.set editable,pixeFormat,size
...@@ -407,22 +407,22 @@ describe('Image', function () { ...@@ -407,22 +407,22 @@ describe('Image', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('RGBA_014', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_PROMISE_0700', 0, async function (done) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
let opts = { editable: true, pixelFormat: 0, size: { height: 6, width: -1 } } let opts = { editable: true, pixelFormat: 0, size: { height: 6, width: -1 } }
image.createPixelMap(Color, opts).then(pixelmap => { image.createPixelMap(Color, opts).then(pixelmap => {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('RGBA_014 failed'); console.info('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_PROMISE_0700 failed');
done(); done();
}).catch(error => { }).catch(error => {
console.log('RGBA_014 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_PROMISE_0700 error: ' + error);
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
}) })
}) })
/** /**
* @tc.number : RGBA_015 * @tc.number : SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_PROMISE_0800
* @tc.name : create pixelmap-promise (editable: true, pixelFormat: BGRA8888, * @tc.name : create pixelmap-promise (editable: true, pixelFormat: BGRA8888,
* size: { height: 4, width: 6 }, bytes = buffer) * size: { height: 4, width: 6 }, bytes = buffer)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
...@@ -433,25 +433,25 @@ describe('Image', function () { ...@@ -433,25 +433,25 @@ describe('Image', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('RGBA_015', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_PROMISE_0800', 0, async function (done) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
let opts = { editable: true, pixelFormat: 4, size: { height: 4, width: 6 } } let opts = { editable: true, pixelFormat: 4, size: { height: 4, width: 6 } }
image.createPixelMap(Color, opts) image.createPixelMap(Color, opts)
.then(pixelmap => { .then(pixelmap => {
console.log('RGBA_015 pixelFormat: 4'); console.log('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_PROMISE_0800 pixelFormat: 4');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
expect(pixelmap.isEditable == opts.editable).assertTrue(); expect(pixelmap.isEditable == opts.editable).assertTrue();
done(); done();
}) })
.catch(error => { .catch(error => {
console.log('RGBA_015 err: ' + error); console.log('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_PROMISE_0800 err: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
}) })
}) })
/** /**
* @tc.number : RGBA_016 * @tc.number : SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_CALLBACK_0800
* @tc.name : create pixelmap-callback (editable: true, pixelFormat: BGRA8888, * @tc.name : create pixelmap-callback (editable: true, pixelFormat: BGRA8888,
* size: { height: 4, width: 6 },bytes = buffer) * size: { height: 4, width: 6 },bytes = buffer)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
...@@ -462,17 +462,17 @@ describe('Image', function () { ...@@ -462,17 +462,17 @@ describe('Image', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('RGBA_016', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_CALLBACK_0800', 0, async function (done) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
let opts = { editable: true, pixelFormat: 4, size: { height: 4, width: 6 } } let opts = { editable: true, pixelFormat: 4, size: { height: 4, width: 6 } }
image.createPixelMap(Color, opts, (err, pixelmap) => { image.createPixelMap(Color, opts, (err, pixelmap) => {
if (err != undefined) { if (err != undefined) {
console.log('RGBA_016 err: ' + err); console.log('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_CALLBACK_0800 err: ' + err);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
return; return;
} }
console.log('RGBA_016 pixelFormat: image.PixelMapFormat.BGRA_8888'); console.log('SUB_GRAPHIC_IMAGE_RGBA_CREATE_PIXELMAP_CALLBACK_0800 pixelFormat: image.PixelMapFormat.BGRA_8888');
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
expect(pixelmap.isEditable == opts.editable).assertTrue(); expect(pixelmap.isEditable == opts.editable).assertTrue();
done(); done();
......
...@@ -264,7 +264,7 @@ describe('ImageReceiver', function () { ...@@ -264,7 +264,7 @@ describe('ImageReceiver', function () {
} }
/** /**
* @tc.number : Receiver_001 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0100
* @tc.name : createImageReceiver * @tc.name : createImageReceiver
* @tc.desc : 1.set width,height,format,capacity * @tc.desc : 1.set width,height,format,capacity
* 2.create ImageReceiver * 2.create ImageReceiver
...@@ -273,7 +273,7 @@ describe('ImageReceiver', function () { ...@@ -273,7 +273,7 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_001', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0100', 0, async function (done) {
var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMAT, CAPACITY) var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMAT, CAPACITY)
if (receiver == undefined) { if (receiver == undefined) {
expect(false).assertTrue(); expect(false).assertTrue();
...@@ -289,7 +289,7 @@ describe('ImageReceiver', function () { ...@@ -289,7 +289,7 @@ describe('ImageReceiver', function () {
}) })
/** /**
* @tc.number : Receiver_001-1 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0200
* @tc.name : createImageReceiver * @tc.name : createImageReceiver
* @tc.desc : 1.set width,height,format,capacity * @tc.desc : 1.set width,height,format,capacity
* 2.create ImageReceiver * 2.create ImageReceiver
...@@ -298,12 +298,12 @@ describe('ImageReceiver', function () { ...@@ -298,12 +298,12 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_001-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0200', 0, async function (done) {
createRecriver(done, 'Receiver_001-1', WIDTH, HEIGHT, FORMAT, 'hd!') createRecriver(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0200', WIDTH, HEIGHT, FORMAT, 'hd!')
}) })
/** /**
* @tc.number : Receiver_001-2 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0100
* @tc.name : createImageReceiver-wrong format * @tc.name : createImageReceiver-wrong format
* @tc.desc : 1.set width,height,format,capacity * @tc.desc : 1.set width,height,format,capacity
* 2.create ImageReceiver * 2.create ImageReceiver
...@@ -312,12 +312,12 @@ describe('ImageReceiver', function () { ...@@ -312,12 +312,12 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_001-2', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0100', 0, async function (done) {
createRecriver(done, 'Receiver_001-2', WIDTH, HEIGHT, null, CAPACITY) createRecriver(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0100', WIDTH, HEIGHT, null, CAPACITY)
}) })
/** /**
* @tc.number : Receiver_001-3 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0200
* @tc.name : createImageReceiver-wrong height * @tc.name : createImageReceiver-wrong height
* @tc.desc : 1.set width,height,format,capacity * @tc.desc : 1.set width,height,format,capacity
* 2.create ImageReceiver * 2.create ImageReceiver
...@@ -326,12 +326,12 @@ describe('ImageReceiver', function () { ...@@ -326,12 +326,12 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_001-3', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0200', 0, async function (done) {
createRecriver(done, 'Receiver_001-3', WIDTH, null, FORMAT, CAPACITY) createRecriver(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0200', WIDTH, null, FORMAT, CAPACITY)
}) })
/** /**
* @tc.number : Receiver_001-4 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0300
* @tc.name : createImageReceiver-wrong width * @tc.name : createImageReceiver-wrong width
* @tc.desc : 1.set width,height,format,capacity * @tc.desc : 1.set width,height,format,capacity
* 2.create ImageReceiver * 2.create ImageReceiver
...@@ -340,12 +340,12 @@ describe('ImageReceiver', function () { ...@@ -340,12 +340,12 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_001-4', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0300', 0, async function (done) {
createRecriver(done, 'Receiver_001-4', null, HEIGHT, FORMAT, CAPACITY) createRecriver(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0300', null, HEIGHT, FORMAT, CAPACITY)
}) })
/** /**
* @tc.number : Receiver_001-5 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0400
* @tc.name : createImageReceiver-wrong capacity * @tc.name : createImageReceiver-wrong capacity
* @tc.desc : 1.set width,height,format,capacity * @tc.desc : 1.set width,height,format,capacity
* 2.create ImageReceiver * 2.create ImageReceiver
...@@ -354,12 +354,12 @@ describe('ImageReceiver', function () { ...@@ -354,12 +354,12 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_001-5', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0400', 0, async function (done) {
createRecriver(done, 'Receiver_001-5', WIDTH, HEIGHT, FORMAT, null) createRecriver(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0400', WIDTH, HEIGHT, FORMAT, null)
}) })
/** /**
* @tc.number : Receiver_001-6 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0500
* @tc.name : createImageReceiver-wrong width * @tc.name : createImageReceiver-wrong width
* @tc.desc : 1.set width,height,format,capacity * @tc.desc : 1.set width,height,format,capacity
* 2.create ImageReceiver * 2.create ImageReceiver
...@@ -368,12 +368,12 @@ describe('ImageReceiver', function () { ...@@ -368,12 +368,12 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_001-6', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0500', 0, async function (done) {
createRecriver(done, 'Receiver_001-6', false, HEIGHT, FORMAT, CAPACITY) createRecriver(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0500', false, HEIGHT, FORMAT, CAPACITY)
}) })
/** /**
* @tc.number : Receiver_001-7 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0600
* @tc.name : createImageReceiver- wrong width * @tc.name : createImageReceiver- wrong width
* @tc.desc : 1.set width,height,format,capacity * @tc.desc : 1.set width,height,format,capacity
* 2.create ImageReceiver * 2.create ImageReceiver
...@@ -382,12 +382,12 @@ describe('ImageReceiver', function () { ...@@ -382,12 +382,12 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_001-7', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0600', 0, async function (done) {
createRecriver(done, 'Receiver_001-7', { a: 10 }, HEIGHT, FORMAT, CAPACITY) createRecriver(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0600', { a: 10 }, HEIGHT, FORMAT, CAPACITY)
}) })
/** /**
* @tc.number : Receiver_001-8 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0300
* @tc.name : createImageReceiver * @tc.name : createImageReceiver
* @tc.desc : 1.set width,height,format,capacity * @tc.desc : 1.set width,height,format,capacity
* 2.create ImageReceiver * 2.create ImageReceiver
...@@ -396,12 +396,12 @@ describe('ImageReceiver', function () { ...@@ -396,12 +396,12 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_001-8', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0300', 0, async function (done) {
createRecriver(done, 'Receiver_001-8', WIDTH, false, FORMAT, CAPACITY) createRecriver(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0300', WIDTH, false, FORMAT, CAPACITY)
}) })
/** /**
* @tc.number : Receiver_001-9 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0700
* @tc.name : createImageReceiver- wrong format * @tc.name : createImageReceiver- wrong format
* @tc.desc : 1.set width,height,format,capacity * @tc.desc : 1.set width,height,format,capacity
* 2.create ImageReceiver * 2.create ImageReceiver
...@@ -410,12 +410,12 @@ describe('ImageReceiver', function () { ...@@ -410,12 +410,12 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_001-9', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0700', 0, async function (done) {
createRecriver(done, 'Receiver_001-9', WIDTH, HEIGHT, 'form.', CAPACITY) createRecriver(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0700', WIDTH, HEIGHT, 'form.', CAPACITY)
}) })
/** /**
* @tc.number : Receiver_001-10 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0400
* @tc.name : createImageReceiver * @tc.name : createImageReceiver
* @tc.desc : 1.set width,height,format,capacity * @tc.desc : 1.set width,height,format,capacity
* 2.create ImageReceiver * 2.create ImageReceiver
...@@ -424,11 +424,11 @@ describe('ImageReceiver', function () { ...@@ -424,11 +424,11 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_001-10', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0400', 0, async function (done) {
var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMATJPEG, CAPACITY) var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMATJPEG, CAPACITY)
if (receiver == undefined) { if (receiver == undefined) {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('Receiver_001-10 undefined') console.info('SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0400 undefined')
done(); done();
} else { } else {
expect(receiver.size.width == WIDTH).assertTrue(); expect(receiver.size.width == WIDTH).assertTrue();
...@@ -440,7 +440,7 @@ describe('ImageReceiver', function () { ...@@ -440,7 +440,7 @@ describe('ImageReceiver', function () {
}) })
/** /**
* @tc.number : Receiver_001-11 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0500
* @tc.name : createImageReceiver * @tc.name : createImageReceiver
* @tc.desc : 1.set width,height,format,capacity * @tc.desc : 1.set width,height,format,capacity
* 2.create ImageReceiver * 2.create ImageReceiver
...@@ -449,11 +449,11 @@ describe('ImageReceiver', function () { ...@@ -449,11 +449,11 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_001-11', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0500', 0, async function (done) {
var receiver = image.createImageReceiver(WIDTH, HEIGHT, YCBCR_422_SP, CAPACITY) var receiver = image.createImageReceiver(WIDTH, HEIGHT, YCBCR_422_SP, CAPACITY)
if (receiver == undefined) { if (receiver == undefined) {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('Receiver_001-11 undefined') console.info('SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0500 undefined')
done(); done();
} else { } else {
expect(receiver.size.width == WIDTH).assertTrue(); expect(receiver.size.width == WIDTH).assertTrue();
...@@ -465,7 +465,7 @@ describe('ImageReceiver', function () { ...@@ -465,7 +465,7 @@ describe('ImageReceiver', function () {
}) })
/** /**
* @tc.number : Receiver_002 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETRECEIVINGSURFACEID_PROMISE_0100
* @tc.name : getReceivingSurfaceId-promise * @tc.name : getReceivingSurfaceId-promise
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call getReceivingSurfaceId * 2.call getReceivingSurfaceId
...@@ -474,15 +474,15 @@ describe('ImageReceiver', function () { ...@@ -474,15 +474,15 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_002', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_GETRECEIVINGSURFACEID_PROMISE_0100', 0, async function (done) {
var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMAT, CAPACITY) var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMAT, CAPACITY)
if (receiver != undefined) { if (receiver != undefined) {
receiver.getReceivingSurfaceId().then(id => { receiver.getReceivingSurfaceId().then(id => {
console.info('Receiver_002 getReceivingSurfaceId [' + id + "]"); console.info('SUB_GRAPHIC_IMAGE_RECEIVER_GETRECEIVINGSURFACEID_PROMISE_0100 getReceivingSurfaceId [' + id + "]");
expect(isString(id)).assertTrue(); expect(isString(id)).assertTrue();
done(); done();
}).catch(error => { }).catch(error => {
console.log('Receiver_002 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_RECEIVER_GETRECEIVINGSURFACEID_PROMISE_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
}) })
...@@ -493,7 +493,7 @@ describe('ImageReceiver', function () { ...@@ -493,7 +493,7 @@ describe('ImageReceiver', function () {
}) })
/** /**
* @tc.number : Receiver_003 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETRECEIVINGSURFACEID_CALLBACK_0100
* @tc.name : getReceivingSurfaceId-callback * @tc.name : getReceivingSurfaceId-callback
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call getReceivingSurfaceId * 2.call getReceivingSurfaceId
...@@ -502,23 +502,23 @@ describe('ImageReceiver', function () { ...@@ -502,23 +502,23 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_003', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_GETRECEIVINGSURFACEID_CALLBACK_0100', 0, async function (done) {
var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMAT, CAPACITY) var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMAT, CAPACITY)
if (receiver != undefined) { if (receiver != undefined) {
receiver.getReceivingSurfaceId((err, id) => { receiver.getReceivingSurfaceId((err, id) => {
console.info('Receiver_003 getReceivingSurfaceId call back [' + id + "]"); console.info('SUB_GRAPHIC_IMAGE_RECEIVER_GETRECEIVINGSURFACEID_CALLBACK_0100 getReceivingSurfaceId call back [' + id + "]");
expect(isString(id)).assertTrue(); expect(isString(id)).assertTrue();
done(); done();
}); });
} else { } else {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('Receiver_003 finished'); console.info('SUB_GRAPHIC_IMAGE_RECEIVER_GETRECEIVINGSURFACEID_CALLBACK_0100 finished');
done() done()
} }
}) })
/** /**
* @tc.number : Receiver_004 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_PROMISE_0100
* @tc.name : release-promise * @tc.name : release-promise
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call release * 2.call release
...@@ -526,11 +526,11 @@ describe('ImageReceiver', function () { ...@@ -526,11 +526,11 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_004', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_PROMISE_0100', 0, async function (done) {
var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMAT, CAPACITY) var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMAT, CAPACITY)
if (receiver != undefined) { if (receiver != undefined) {
receiver.release().then(() => { receiver.release().then(() => {
console.info('Receiver_004 release '); console.info('SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_PROMISE_0100 release ');
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
}).catch(error => { }).catch(error => {
...@@ -539,13 +539,13 @@ describe('ImageReceiver', function () { ...@@ -539,13 +539,13 @@ describe('ImageReceiver', function () {
}) })
} else { } else {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('Receiver_004 finished'); console.info('SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_PROMISE_0100 finished');
done() done()
} }
}) })
/** /**
* @tc.number : Receiver_005 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_CALLBACK_0100
* @tc.name : release-callback * @tc.name : release-callback
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call release * 2.call release
...@@ -553,29 +553,29 @@ describe('ImageReceiver', function () { ...@@ -553,29 +553,29 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_005', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_CALLBACK_0100', 0, async function (done) {
var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMAT, CAPACITY) var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMAT, CAPACITY)
if (receiver != undefined) { if (receiver != undefined) {
receiver.release((err) => { receiver.release((err) => {
if (err) { if (err) {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('Receiver_005 release fail'); console.info('SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_CALLBACK_0100 release fail');
done() done()
} else { } else {
console.info('Receiver_005 release call back'); console.info('SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_CALLBACK_0100 release call back');
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} }
}); });
} else { } else {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('Receiver_005 finished'); console.info('SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_CALLBACK_0100 finished');
done() done()
} }
}) })
/** /**
* @tc.number : Receiver_006 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_READLATESTIMAGE_PROMISE_0100
* @tc.name : readLatestImage-promise * @tc.name : readLatestImage-promise
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call readLatestImage * 2.call readLatestImage
...@@ -584,28 +584,28 @@ describe('ImageReceiver', function () { ...@@ -584,28 +584,28 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_006', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_READLATESTIMAGE_PROMISE_0100', 0, async function (done) {
var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMAT, CAPACITY) var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMAT, CAPACITY)
var dummy = receiver.test; var dummy = receiver.test;
if (receiver != undefined) { if (receiver != undefined) {
receiver.readLatestImage().then(img => { receiver.readLatestImage().then(img => {
console.info('Receiver_006 readLatestImage Success'); console.info('SUB_GRAPHIC_IMAGE_RECEIVER_READLATESTIMAGE_PROMISE_0100 readLatestImage Success');
expect(img != undefined).assertTrue(); expect(img != undefined).assertTrue();
done(); done();
}).catch(error => { }).catch(error => {
console.log('Receiver_006 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_RECEIVER_READLATESTIMAGE_PROMISE_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
}) })
} else { } else {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('Receiver_006 finished'); console.info('SUB_GRAPHIC_IMAGE_RECEIVER_READLATESTIMAGE_PROMISE_0100 finished');
done() done()
} }
}) })
/** /**
* @tc.number : Receiver_007 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_READLATESTIMAGE_CALLBACK_0100
* @tc.name : readLatestImage-callback * @tc.name : readLatestImage-callback
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call readLatestImage * 2.call readLatestImage
...@@ -614,24 +614,24 @@ describe('ImageReceiver', function () { ...@@ -614,24 +614,24 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_007', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_READLATESTIMAGE_CALLBACK_0100', 0, async function (done) {
var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMAT, CAPACITY) var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMAT, CAPACITY)
var dummy = receiver.test; var dummy = receiver.test;
if (receiver != undefined) { if (receiver != undefined) {
receiver.readLatestImage((err, img) => { receiver.readLatestImage((err, img) => {
console.info('Receiver_007 readLatestImage call back Success'); console.info('SUB_GRAPHIC_IMAGE_RECEIVER_READLATESTIMAGE_CALLBACK_0100 readLatestImage call back Success');
expect(img != undefined).assertTrue(); expect(img != undefined).assertTrue();
done(); done();
}); });
} else { } else {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('Receiver_007 finished'); console.info('SUB_GRAPHIC_IMAGE_RECEIVER_READLATESTIMAGE_CALLBACK_0100 finished');
done(); done();
} }
}) })
/** /**
* @tc.number : Receiver_008 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_READNEXTIMAGE_PROMISE_0100
* @tc.name : readNextImage-promise * @tc.name : readNextImage-promise
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call readNextImage * 2.call readNextImage
...@@ -640,29 +640,29 @@ describe('ImageReceiver', function () { ...@@ -640,29 +640,29 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_008', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_READNEXTIMAGE_PROMISE_0100', 0, async function (done) {
var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMAT, CAPACITY) var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMAT, CAPACITY)
var dummy = receiver.test; var dummy = receiver.test;
expect(receiver != undefined).assertTrue(); expect(receiver != undefined).assertTrue();
if (receiver != undefined) { if (receiver != undefined) {
receiver.readNextImage().then(img => { receiver.readNextImage().then(img => {
console.info('Receiver_008 readNextImage Success'); console.info('SUB_GRAPHIC_IMAGE_RECEIVER_READNEXTIMAGE_PROMISE_0100 readNextImage Success');
expect(img != undefined).assertTrue(); expect(img != undefined).assertTrue();
done() done()
}).catch(error => { }).catch(error => {
console.log('Receiver_008 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_RECEIVER_READNEXTIMAGE_PROMISE_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
}) })
} else { } else {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('Receiver_008 finished'); console.info('SUB_GRAPHIC_IMAGE_RECEIVER_READNEXTIMAGE_PROMISE_0100 finished');
done(); done();
} }
}) })
/** /**
* @tc.number : Receiver_009 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_READNEXTIMAGE_CALLBACK_0100
* @tc.name : readNextImage-callback * @tc.name : readNextImage-callback
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call readNextImage * 2.call readNextImage
...@@ -671,7 +671,7 @@ describe('ImageReceiver', function () { ...@@ -671,7 +671,7 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_009', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_READNEXTIMAGE_CALLBACK_0100', 0, async function (done) {
var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMAT, CAPACITY) var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMAT, CAPACITY)
var dummy = receiver.test; var dummy = receiver.test;
if (receiver != undefined) { if (receiver != undefined) {
...@@ -679,7 +679,7 @@ describe('ImageReceiver', function () { ...@@ -679,7 +679,7 @@ describe('ImageReceiver', function () {
if (err) { if (err) {
expect(false).assertTrue(); expect(false).assertTrue();
} else { } else {
console.info('Receiver_009 readNextImage call back Success'); console.info('SUB_GRAPHIC_IMAGE_RECEIVER_READNEXTIMAGE_CALLBACK_0100 readNextImage call back Success');
expect(img != undefined).assertTrue(); expect(img != undefined).assertTrue();
done(); done();
} }
...@@ -687,13 +687,13 @@ describe('ImageReceiver', function () { ...@@ -687,13 +687,13 @@ describe('ImageReceiver', function () {
}) })
} else { } else {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('Receiver_009 finished'); console.info('SUB_GRAPHIC_IMAGE_RECEIVER_READNEXTIMAGE_CALLBACK_0100 finished');
done(); done();
} }
}) })
/** /**
* @tc.number : Receiver_010 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_JPEG_0100
* @tc.name : getComponent-jpeg * @tc.name : getComponent-jpeg
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call on * 2.call on
...@@ -703,12 +703,12 @@ describe('ImageReceiver', function () { ...@@ -703,12 +703,12 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_010', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_JPEG_0100', 0, async function (done) {
getComponentP(done, 'Receiver_010', JPEG) getComponentP(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_JPEG_0100', JPEG)
}) })
/** /**
* @tc.number : Receiver_010_1 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_YUV_U_0100
* @tc.name : getComponent-YUV_U * @tc.name : getComponent-YUV_U
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call on * 2.call on
...@@ -718,12 +718,12 @@ describe('ImageReceiver', function () { ...@@ -718,12 +718,12 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_010_1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_YUV_U_0100', 0, async function (done) {
getComponentP(done, 'Receiver_010_1', YUV_U) getComponentP(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_YUV_U_0100', YUV_U)
}) })
/** /**
* @tc.number : Receiver_010_2 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_YUV_U_0200
* @tc.name : getComponent-YUV_V * @tc.name : getComponent-YUV_V
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call on * 2.call on
...@@ -733,12 +733,12 @@ describe('ImageReceiver', function () { ...@@ -733,12 +733,12 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_010_2', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_YUV_U_0200', 0, async function (done) {
getComponentP(done, 'Receiver_010_2', YUV_V) getComponentP(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_YUV_U_0200', YUV_V)
}) })
/** /**
* @tc.number : Receiver_010_3 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_YUV_U_0300
* @tc.name : getComponent-YUV_Y * @tc.name : getComponent-YUV_Y
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call on * 2.call on
...@@ -748,12 +748,12 @@ describe('ImageReceiver', function () { ...@@ -748,12 +748,12 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_010_3', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_YUV_U_0300', 0, async function (done) {
getComponentP(done, 'Receiver_010_3', YUV_Y) getComponentP(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_YUV_U_0300', YUV_Y)
}) })
/** /**
* @tc.number : Receiver_010_4 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_JPEG_0200
* @tc.name : getComponent-jpeg * @tc.name : getComponent-jpeg
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call on * 2.call on
...@@ -763,12 +763,12 @@ describe('ImageReceiver', function () { ...@@ -763,12 +763,12 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_010_4', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_JPEG_0200', 0, async function (done) {
getComponentCb(done, 'Receiver_010_4', JPEG) getComponentCb(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_JPEG_0200', JPEG)
}) })
/** /**
* @tc.number : Receiver_010_5 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_YUV_U_0400
* @tc.name : getComponent-YUV_Y * @tc.name : getComponent-YUV_Y
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call on * 2.call on
...@@ -778,12 +778,12 @@ describe('ImageReceiver', function () { ...@@ -778,12 +778,12 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_010_5', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_YUV_U_0400', 0, async function (done) {
getComponentCb(done, 'Receiver_010_5', YUV_Y) getComponentCb(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_YUV_U_0400', YUV_Y)
}) })
/** /**
* @tc.number : Receiver_010_6 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_YUV_U_0500
* @tc.name : getComponent-YUV_V * @tc.name : getComponent-YUV_V
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call on * 2.call on
...@@ -793,12 +793,12 @@ describe('ImageReceiver', function () { ...@@ -793,12 +793,12 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_010_6', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_YUV_U_0500', 0, async function (done) {
getComponentCb(done, 'Receiver_010_6', YUV_V) getComponentCb(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_YUV_U_0500', YUV_V)
}) })
/** /**
* @tc.number : Receiver_010_7 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_YUV_U_0600
* @tc.name : getComponent-YUV_U * @tc.name : getComponent-YUV_U
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call on * 2.call on
...@@ -808,12 +808,12 @@ describe('ImageReceiver', function () { ...@@ -808,12 +808,12 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_010_7', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_YUV_U_0600', 0, async function (done) {
getComponentCb(done, 'Receiver_010_7', YUV_U) getComponentCb(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_YUV_U_0600', YUV_U)
}) })
/** /**
* @tc.number : Receiver_011 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_RECEIVERON_0100
* @tc.name : on * @tc.name : on
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call on * 2.call on
...@@ -821,7 +821,7 @@ describe('ImageReceiver', function () { ...@@ -821,7 +821,7 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_011', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_RECEIVERON_0100', 0, async function (done) {
var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMAT, CAPACITY) var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMAT, CAPACITY)
if (receiver == undefined) { if (receiver == undefined) {
expect(false).assertTrue(); expect(false).assertTrue();
...@@ -830,12 +830,12 @@ describe('ImageReceiver', function () { ...@@ -830,12 +830,12 @@ describe('ImageReceiver', function () {
let pass = false; let pass = false;
receiver.on('imageArrival', (err) => { receiver.on('imageArrival', (err) => {
if (err) { if (err) {
console.info('Receiver_011 on err' + err); console.info('SUB_GRAPHIC_IMAGE_RECEIVER_RECEIVERON_0100 on err' + err);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
pass = true; pass = true;
console.info('Receiver_011 on call back IN'); console.info('SUB_GRAPHIC_IMAGE_RECEIVER_RECEIVERON_0100 on call back IN');
} }
}) })
...@@ -847,7 +847,7 @@ describe('ImageReceiver', function () { ...@@ -847,7 +847,7 @@ describe('ImageReceiver', function () {
}) })
/** /**
* @tc.number : Receiver_012 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_PROMISE_0200
* @tc.name : release-promise * @tc.name : release-promise
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call on * 2.call on
...@@ -858,7 +858,7 @@ describe('ImageReceiver', function () { ...@@ -858,7 +858,7 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_012', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_PROMISE_0200', 0, async function (done) {
var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMAT, CAPACITY) var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMAT, CAPACITY)
if (receiver == undefined) { if (receiver == undefined) {
expect(false).assertTrue(); expect(false).assertTrue();
...@@ -889,20 +889,20 @@ describe('ImageReceiver', function () { ...@@ -889,20 +889,20 @@ describe('ImageReceiver', function () {
expect(true).assertTrue(); expect(true).assertTrue();
done() done()
}).catch(error => { }).catch(error => {
console.log('Receiver_012 err' + error) console.log('SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_PROMISE_0200 err' + error)
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
}) })
} }
}).catch(error => { }).catch(error => {
console.log('Receiver_012 readLatestImage err' + error) console.log('SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_PROMISE_0200 readLatestImage err' + error)
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
}) })
}) })
/** /**
* @tc.number : Receiver_013 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_CALLBACK_0200
* @tc.name : release-callback * @tc.name : release-callback
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call on * 2.call on
...@@ -913,7 +913,7 @@ describe('ImageReceiver', function () { ...@@ -913,7 +913,7 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_013', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_CALLBACK_0200', 0, async function (done) {
var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMAT, CAPACITY) var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMAT, CAPACITY)
if (receiver == undefined) { if (receiver == undefined) {
expect(false).assertTrue(); expect(false).assertTrue();
...@@ -955,7 +955,7 @@ describe('ImageReceiver', function () { ...@@ -955,7 +955,7 @@ describe('ImageReceiver', function () {
}) })
/** /**
* @tc.number : Receiver_014 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0100
* @tc.name : getComponent-wrong format * @tc.name : getComponent-wrong format
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call on * 2.call on
...@@ -965,12 +965,12 @@ describe('ImageReceiver', function () { ...@@ -965,12 +965,12 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_014', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0100', 0, async function (done) {
getComponentCbErr(done, 'Receiver_014', null) getComponentCbErr(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0100', null)
}) })
/** /**
* @tc.number : Receiver_015 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0200
* @tc.name : getComponent-wrong format * @tc.name : getComponent-wrong format
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call on * 2.call on
...@@ -980,12 +980,12 @@ describe('ImageReceiver', function () { ...@@ -980,12 +980,12 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_015', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0200', 0, async function (done) {
getComponentCbErr(done, 'Receiver_015', 'ab') getComponentCbErr(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0200', 'ab')
}) })
/** /**
* @tc.number : Receiver_016 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0300
* @tc.name : getComponent-wrong format * @tc.name : getComponent-wrong format
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call on * 2.call on
...@@ -995,12 +995,12 @@ describe('ImageReceiver', function () { ...@@ -995,12 +995,12 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_016', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0300', 0, async function (done) {
getComponentCbErr(done, 'Receiver_016', 0.1) getComponentCbErr(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0300', 0.1)
}) })
/** /**
* @tc.number : Receiver_017 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0400
* @tc.name : getComponent-wrong format * @tc.name : getComponent-wrong format
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call on * 2.call on
...@@ -1010,12 +1010,12 @@ describe('ImageReceiver', function () { ...@@ -1010,12 +1010,12 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_017', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0400', 0, async function (done) {
getComponentCbErr(done, 'Receiver_017', { a: 1 }) getComponentCbErr(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0400', { a: 1 })
}) })
/** /**
* @tc.number : Receiver_018 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0500
* @tc.name : getComponent-wrong format * @tc.name : getComponent-wrong format
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call on * 2.call on
...@@ -1025,12 +1025,12 @@ describe('ImageReceiver', function () { ...@@ -1025,12 +1025,12 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_018', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0500', 0, async function (done) {
getComponentProErr(done, 'Receiver_018', null) getComponentProErr(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0500', null)
}) })
/** /**
* @tc.number : Receiver_019 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0600
* @tc.name : getComponent-wrong format * @tc.name : getComponent-wrong format
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call on * 2.call on
...@@ -1040,12 +1040,12 @@ describe('ImageReceiver', function () { ...@@ -1040,12 +1040,12 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_019', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0600', 0, async function (done) {
getComponentProErr(done, 'Receiver_019', 'ab') getComponentProErr(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0600', 'ab')
}) })
/** /**
* @tc.number : Receiver_020 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0700
* @tc.name : getComponent-wrong format * @tc.name : getComponent-wrong format
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call on * 2.call on
...@@ -1055,12 +1055,12 @@ describe('ImageReceiver', function () { ...@@ -1055,12 +1055,12 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_020', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0700', 0, async function (done) {
getComponentProErr(done, 'Receiver_020', 0.1) getComponentProErr(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0700', 0.1)
}) })
/** /**
* @tc.number : Receiver_021 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0800
* @tc.name : getComponent-wrong format * @tc.name : getComponent-wrong format
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call on * 2.call on
...@@ -1070,12 +1070,12 @@ describe('ImageReceiver', function () { ...@@ -1070,12 +1070,12 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_021', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0800', 0, async function (done) {
getComponentProErr(done, 'Receiver_021', { a: 1 }) getComponentProErr(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0800', { a: 1 })
}) })
/** /**
* @tc.number : Receiver_022 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_0100
* @tc.name : on-1 * @tc.name : on-1
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call on * 2.call on
...@@ -1083,12 +1083,12 @@ describe('ImageReceiver', function () { ...@@ -1083,12 +1083,12 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_022', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_0100', 0, async function (done) {
onErr(done, 'Receiver_022', 1) onErr(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_0100', 1)
}) })
/** /**
* @tc.number : Receiver_023 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_0200
* @tc.name : on-null * @tc.name : on-null
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call on * 2.call on
...@@ -1096,12 +1096,12 @@ describe('ImageReceiver', function () { ...@@ -1096,12 +1096,12 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_023', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_0200', 0, async function (done) {
onErr(done, 'Receiver_023', null) onErr(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_0200', null)
}) })
/** /**
* @tc.number : Receiver_024 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_0300
* @tc.name : on-{a : 1} * @tc.name : on-{a : 1}
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call on * 2.call on
...@@ -1109,12 +1109,12 @@ describe('ImageReceiver', function () { ...@@ -1109,12 +1109,12 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_024', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_0300', 0, async function (done) {
onErr(done, 'Receiver_024', { a: 1 }) onErr(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_0300', { a: 1 })
}) })
/** /**
* @tc.number : Receiver_025 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_0400
* @tc.name : on-'a' * @tc.name : on-'a'
* @tc.desc : 1.create ImageReceiver * @tc.desc : 1.create ImageReceiver
* 2.call on * 2.call on
...@@ -1122,8 +1122,8 @@ describe('ImageReceiver', function () { ...@@ -1122,8 +1122,8 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('Receiver_025', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_0400', 0, async function (done) {
onErr(done, 'Receiver_025', 'a') onErr(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_0400', 'a')
}) })
}) })
} }
...@@ -464,7 +464,7 @@ describe('imageWebp', function () { ...@@ -464,7 +464,7 @@ describe('imageWebp', function () {
} }
/** /**
* @tc.number : wbp_001 * @tc.number : SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_PROMISE_0100
* @tc.name : createPixelMap - promise-webp * @tc.name : createPixelMap - promise-webp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -474,12 +474,12 @@ describe('imageWebp', function () { ...@@ -474,12 +474,12 @@ describe('imageWebp', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('wbp_001', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_PROMISE_0100', 0, async function (done) {
try { try {
await getFd('test_large.webp'); await getFd('test_large.webp');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('wbp_001 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_PROMISE_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -496,7 +496,7 @@ describe('imageWebp', function () { ...@@ -496,7 +496,7 @@ describe('imageWebp', function () {
imageSourceApi.createPixelMap(decodingOptions).then(pixelmap => { imageSourceApi.createPixelMap(decodingOptions).then(pixelmap => {
if (pixelmap != undefined) { if (pixelmap != undefined) {
expect(true).assertTrue(); expect(true).assertTrue();
console.info('wbp_001 success '); console.info('SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_PROMISE_0100 success ');
done(); done();
} else { } else {
expect(false).assertTrue(); expect(false).assertTrue();
...@@ -505,7 +505,7 @@ describe('imageWebp', function () { ...@@ -505,7 +505,7 @@ describe('imageWebp', function () {
}) })
} }
} catch (error) { } catch (error) {
console.info('wbp_001 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_PROMISE_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -513,7 +513,7 @@ describe('imageWebp', function () { ...@@ -513,7 +513,7 @@ describe('imageWebp', function () {
}) })
/** /**
* @tc.number : wbp_002 * @tc.number : SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0100
* @tc.name : createPixelMap - callback-webp * @tc.name : createPixelMap - callback-webp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -523,12 +523,12 @@ describe('imageWebp', function () { ...@@ -523,12 +523,12 @@ describe('imageWebp', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('wbp_002', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0100', 0, async function (done) {
try { try {
await getFd('test_large.webp'); await getFd('test_large.webp');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('wbp_002 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0100 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
...@@ -545,7 +545,7 @@ describe('imageWebp', function () { ...@@ -545,7 +545,7 @@ describe('imageWebp', function () {
imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => { imageSourceApi.createPixelMap(decodingOptions, (err, pixelmap) => {
if (pixelmap != undefined) { if (pixelmap != undefined) {
expect(true).assertTrue(); expect(true).assertTrue();
console.info('wbp_002 success '); console.info('SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0100 success ');
done(); done();
} else { } else {
expect(false).assertTrue(); expect(false).assertTrue();
...@@ -554,7 +554,7 @@ describe('imageWebp', function () { ...@@ -554,7 +554,7 @@ describe('imageWebp', function () {
}) })
} }
} catch (error) { } catch (error) {
console.info('wbp_002 error: ' + error); console.info('SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0100 error: ' + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} }
...@@ -562,7 +562,7 @@ describe('imageWebp', function () { ...@@ -562,7 +562,7 @@ describe('imageWebp', function () {
}) })
/** /**
* @tc.number : wbp_003 * @tc.number : SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_PROMISE_0200
* @tc.name : createPixelMap-promise-webp * @tc.name : createPixelMap-promise-webp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -572,33 +572,33 @@ describe('imageWebp', function () { ...@@ -572,33 +572,33 @@ describe('imageWebp', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('wbp_003', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_PROMISE_0200', 0, async function (done) {
try { try {
await getFd('test_large.webp'); await getFd('test_large.webp');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('wbp_003 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_PROMISE_0200 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.createPixelMap().then(pixelmap => { imageSourceApi.createPixelMap().then(pixelmap => {
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
console.info('wbp_003 success '); console.info('SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_PROMISE_0200 success ');
done(); done();
}).catch(error => { }).catch(error => {
console.log('wbp_003 error: ' + error); console.log('SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_PROMISE_0200 error: ' + error);
expect().assertFail(); expect().assertFail();
done(); done();
}) })
} }
} catch (error) { } catch (error) {
console.info('wbp_003 err ' + error); console.info('SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_PROMISE_0200 err ' + error);
} }
}) })
/** /**
* @tc.number : wbp_004 * @tc.number : SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0200
* @tc.name : createPixelMap-callback-webp * @tc.name : createPixelMap-callback-webp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -608,29 +608,29 @@ describe('imageWebp', function () { ...@@ -608,29 +608,29 @@ describe('imageWebp', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('wbp_004', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0200', 0, async function (done) {
try { try {
await getFd('test_large.webp'); await getFd('test_large.webp');
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('wbp_004 create image source failed'); console.info('SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0200 create image source failed');
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
imageSourceApi.createPixelMap((err, pixelmap) => { imageSourceApi.createPixelMap((err, pixelmap) => {
expect(pixelmap != undefined).assertTrue(); expect(pixelmap != undefined).assertTrue();
console.info('wbp_004 success '); console.info('SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0200 success ');
done(); done();
}) })
} }
} catch (error) { } catch (error) {
console.info('wbp_004 err ' + error); console.info('SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0200 err ' + error);
} }
}) })
/** /**
* @tc.number : wbp_005 * @tc.number : SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0300
* @tc.name : createPixelMap-callback -{sampleSize: -1} -webp * @tc.name : createPixelMap-callback -{sampleSize: -1} -webp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -640,7 +640,7 @@ describe('imageWebp', function () { ...@@ -640,7 +640,7 @@ describe('imageWebp', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('wbp_005', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0300', 0, async function (done) {
let decodingOptions = { let decodingOptions = {
sampleSize: -1, sampleSize: -1,
editable: true, editable: true,
...@@ -650,11 +650,11 @@ describe('imageWebp', function () { ...@@ -650,11 +650,11 @@ describe('imageWebp', function () {
desiredRegion: { size: { height: 1, width: 2 }, x: 0, y: 0 }, desiredRegion: { size: { height: 1, width: 2 }, x: 0, y: 0 },
index: 0 index: 0
}; };
createPixMapCbErr(done, 'wbp_005', decodingOptions) createPixMapCbErr(done, 'SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0300', decodingOptions)
}) })
/** /**
* @tc.number : wbp_006 * @tc.number : SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0400
* @tc.name : createPixelMap-callback -{index: -1} -webp * @tc.name : createPixelMap-callback -{index: -1} -webp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -664,7 +664,7 @@ describe('imageWebp', function () { ...@@ -664,7 +664,7 @@ describe('imageWebp', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('wbp_006', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0400', 0, async function (done) {
let decodingOptions = { let decodingOptions = {
sampleSize: 1, sampleSize: 1,
editable: true, editable: true,
...@@ -674,11 +674,11 @@ describe('imageWebp', function () { ...@@ -674,11 +674,11 @@ describe('imageWebp', function () {
desiredRegion: { size: { height: 1, width: 2 }, x: 0, y: 0 }, desiredRegion: { size: { height: 1, width: 2 }, x: 0, y: 0 },
index: -1 index: -1
}; };
createPixMapCbErr(done, 'wbp_006', decodingOptions) createPixMapCbErr(done, 'SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0400', decodingOptions)
}) })
/** /**
* @tc.number : wbp_007 * @tc.number : SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0500
* @tc.name : createPixelMap-callback -{rotate: 500} -webp * @tc.name : createPixelMap-callback -{rotate: 500} -webp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -688,7 +688,7 @@ describe('imageWebp', function () { ...@@ -688,7 +688,7 @@ describe('imageWebp', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('wbp_007', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0500', 0, async function (done) {
let decodingOptions = { let decodingOptions = {
sampleSize: 1, sampleSize: 1,
editable: true, editable: true,
...@@ -698,11 +698,11 @@ describe('imageWebp', function () { ...@@ -698,11 +698,11 @@ describe('imageWebp', function () {
desiredRegion: { size: { height: 1, width: 2 }, x: 0, y: 0 }, desiredRegion: { size: { height: 1, width: 2 }, x: 0, y: 0 },
index: 0 index: 0
}; };
createPixMapCbErr(done, 'wbp_007', decodingOptions) createPixMapCbErr(done, 'SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0500', decodingOptions)
}) })
/** /**
* @tc.number : wbp_007-1 * @tc.number : SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0600
* @tc.name : createPixelMap-callback -{rotate: -10} -webp * @tc.name : createPixelMap-callback -{rotate: -10} -webp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -712,7 +712,7 @@ describe('imageWebp', function () { ...@@ -712,7 +712,7 @@ describe('imageWebp', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('wbp_007-1', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0600', 0, async function (done) {
let decodingOptions = { let decodingOptions = {
sampleSize: 1, sampleSize: 1,
editable: true, editable: true,
...@@ -722,11 +722,11 @@ describe('imageWebp', function () { ...@@ -722,11 +722,11 @@ describe('imageWebp', function () {
desiredRegion: { size: { height: 1, width: 2 }, x: 0, y: 0 }, desiredRegion: { size: { height: 1, width: 2 }, x: 0, y: 0 },
index: 0 index: 0
}; };
createPixMapCbErr(done, 'wbp_007-1', decodingOptions) createPixMapCbErr(done, 'SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0600', decodingOptions)
}) })
/** /**
* @tc.number : wbp_007-2 * @tc.number : SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0700
* @tc.name : createPixelMap-callback editable: false -webp * @tc.name : createPixelMap-callback editable: false -webp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -736,7 +736,7 @@ describe('imageWebp', function () { ...@@ -736,7 +736,7 @@ describe('imageWebp', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('wbp_007-2', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0700', 0, async function (done) {
let decodingOptions = { let decodingOptions = {
sampleSize: 1, sampleSize: 1,
editable: false, editable: false,
...@@ -746,11 +746,11 @@ describe('imageWebp', function () { ...@@ -746,11 +746,11 @@ describe('imageWebp', function () {
desiredRegion: { size: { height: 1, width: 2 }, x: 0, y: 0 }, desiredRegion: { size: { height: 1, width: 2 }, x: 0, y: 0 },
index: 0 index: 0
}; };
createPixMapCbErr(done, 'wbp_007-2', decodingOptions) createPixMapCbErr(done, 'SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0700', decodingOptions)
}) })
/** /**
* @tc.number : wbp_008 * @tc.number : SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0800
* @tc.name : createPixelMap-callback -{ size: { height: 1, width: 2 }, x: -1, y: -1 }-webp * @tc.name : createPixelMap-callback -{ size: { height: 1, width: 2 }, x: -1, y: -1 }-webp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -760,7 +760,7 @@ describe('imageWebp', function () { ...@@ -760,7 +760,7 @@ describe('imageWebp', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('wbp_008', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0800', 0, async function (done) {
let decodingOptions = { let decodingOptions = {
sampleSize: 1, sampleSize: 1,
editable: true, editable: true,
...@@ -770,11 +770,11 @@ describe('imageWebp', function () { ...@@ -770,11 +770,11 @@ describe('imageWebp', function () {
desiredRegion: { size: { height: 1, width: 2 }, x: -1, y: -1 }, desiredRegion: { size: { height: 1, width: 2 }, x: -1, y: -1 },
index: 0 index: 0
}; };
createPixMapCbErr(done, 'wbp_008', decodingOptions) createPixMapCbErr(done, 'SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0800', decodingOptions)
}) })
/** /**
* @tc.number : wbp_009 * @tc.number : SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0900
* @tc.name : createPixelMap-callback -size: { height: 10000, width: 10000 } -webp * @tc.name : createPixelMap-callback -size: { height: 10000, width: 10000 } -webp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -784,7 +784,7 @@ describe('imageWebp', function () { ...@@ -784,7 +784,7 @@ describe('imageWebp', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('wbp_009', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0900', 0, async function (done) {
let decodingOptions = { let decodingOptions = {
sampleSize: 1, sampleSize: 1,
editable: true, editable: true,
...@@ -794,11 +794,11 @@ describe('imageWebp', function () { ...@@ -794,11 +794,11 @@ describe('imageWebp', function () {
desiredRegion: { size: { height: 10000, width: 10000 }, x: 0, y: 0 }, desiredRegion: { size: { height: 10000, width: 10000 }, x: 0, y: 0 },
index: 0 index: 0
}; };
createPixMapCb(done, 'wbp_009', decodingOptions) createPixMapCb(done, 'SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_0900', decodingOptions)
}) })
/** /**
* @tc.number : wbp_010 * @tc.number : SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_1000
* @tc.name : createPixelMap-callback - sampleSize: -1 -webp * @tc.name : createPixelMap-callback - sampleSize: -1 -webp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -808,7 +808,7 @@ describe('imageWebp', function () { ...@@ -808,7 +808,7 @@ describe('imageWebp', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('wbp_010', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_1000', 0, async function (done) {
let decodingOptions = { let decodingOptions = {
sampleSize: -1, sampleSize: -1,
editable: true, editable: true,
...@@ -818,11 +818,11 @@ describe('imageWebp', function () { ...@@ -818,11 +818,11 @@ describe('imageWebp', function () {
desiredRegion: { size: { height: 1, width: 2 }, x: 0, y: 0 }, desiredRegion: { size: { height: 1, width: 2 }, x: 0, y: 0 },
index: 0 index: 0
}; };
createPixMapPromiseErr(done, 'wbp_010', decodingOptions) createPixMapPromiseErr(done, 'SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_1000', decodingOptions)
}) })
/** /**
* @tc.number : wbp_011 * @tc.number : SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_1100
* @tc.name : createPixelMap-callback - index: -1 -webp * @tc.name : createPixelMap-callback - index: -1 -webp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -832,7 +832,7 @@ describe('imageWebp', function () { ...@@ -832,7 +832,7 @@ describe('imageWebp', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('wbp_011', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_1100', 0, async function (done) {
let decodingOptions = { let decodingOptions = {
sampleSize: 1, sampleSize: 1,
editable: true, editable: true,
...@@ -842,11 +842,11 @@ describe('imageWebp', function () { ...@@ -842,11 +842,11 @@ describe('imageWebp', function () {
desiredRegion: { size: { height: 1, width: 2 }, x: 0, y: 0 }, desiredRegion: { size: { height: 1, width: 2 }, x: 0, y: 0 },
index: -1 index: -1
}; };
createPixMapPromiseErr(done, 'wbp_011', decodingOptions) createPixMapPromiseErr(done, 'SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_1100', decodingOptions)
}) })
/** /**
* @tc.number : wbp_012 * @tc.number : SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_1200
* @tc.name : createPixelMap-callback - desiredPixelFormat: 1 -webp * @tc.name : createPixelMap-callback - desiredPixelFormat: 1 -webp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -856,7 +856,7 @@ describe('imageWebp', function () { ...@@ -856,7 +856,7 @@ describe('imageWebp', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('wbp_012', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_1200', 0, async function (done) {
let decodingOptions = { let decodingOptions = {
sampleSize: 2, sampleSize: 2,
editable: true, editable: true,
...@@ -866,12 +866,12 @@ describe('imageWebp', function () { ...@@ -866,12 +866,12 @@ describe('imageWebp', function () {
desiredRegion: { size: { height: 1, width: 2 }, x: 0, y: 0 }, desiredRegion: { size: { height: 1, width: 2 }, x: 0, y: 0 },
index: 0 index: 0
}; };
createPixMapPromiseErr(done, 'wbp_012', decodingOptions) createPixMapPromiseErr(done, 'SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_1200', decodingOptions)
}) })
/** /**
* @tc.number : wbp_013 * @tc.number : SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_1300
* @tc.name : createPixelMap-callback - { size: { height: 1, width: 2 }, x: -1, y: -1 } -webp * @tc.name : createPixelMap-callback - { size: { height: 1, width: 2 }, x: -1, y: -1 } -webp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -881,7 +881,7 @@ describe('imageWebp', function () { ...@@ -881,7 +881,7 @@ describe('imageWebp', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('wbp_013', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_1300', 0, async function (done) {
let decodingOptions = { let decodingOptions = {
sampleSize: 1, sampleSize: 1,
editable: true, editable: true,
...@@ -891,11 +891,11 @@ describe('imageWebp', function () { ...@@ -891,11 +891,11 @@ describe('imageWebp', function () {
desiredRegion: { size: { height: 1, width: 2 }, x: -1, y: -1 }, desiredRegion: { size: { height: 1, width: 2 }, x: -1, y: -1 },
index: 0 index: 0
}; };
createPixMapPromiseErr(done, 'wbp_013', decodingOptions) createPixMapPromiseErr(done, 'SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_1300', decodingOptions)
}) })
/** /**
* @tc.number : wbp_014 * @tc.number : SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_1400
* @tc.name : createPixelMap-callback - size: { height: 10000, width:10000 } -webp * @tc.name : createPixelMap-callback - size: { height: 10000, width:10000 } -webp
* @tc.desc : 1.create imagesource * @tc.desc : 1.create imagesource
* 2.set index and DecodeOptions * 2.set index and DecodeOptions
...@@ -905,7 +905,7 @@ describe('imageWebp', function () { ...@@ -905,7 +905,7 @@ describe('imageWebp', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('wbp_014', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_1400', 0, async function (done) {
let decodingOptions = { let decodingOptions = {
sampleSize: 1, sampleSize: 1,
editable: true, editable: true,
...@@ -915,11 +915,11 @@ describe('imageWebp', function () { ...@@ -915,11 +915,11 @@ describe('imageWebp', function () {
desiredRegion: { size: { height: 10000, width: 10000 }, x: 0, y: 0 }, desiredRegion: { size: { height: 10000, width: 10000 }, x: 0, y: 0 },
index: 0 index: 0
}; };
createPixMapPromise(done, 'wbp_014', decodingOptions) createPixMapPromise(done, 'SUB_GRAPHIC_IMAGE_WEBP_CREATEPIXELMAP_CALLBACK_1400', decodingOptions)
}) })
/** /**
* @tc.number : wbp_015 * @tc.number : SUB_GRAPHIC_IMAGE_WEBP_PACKING_CALLBACK_0100
* @tc.name : packing - callback-webp * @tc.name : packing - callback-webp
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call packing * 2.call packing
...@@ -928,13 +928,13 @@ describe('imageWebp', function () { ...@@ -928,13 +928,13 @@ describe('imageWebp', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('wbp_015', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WEBP_PACKING_CALLBACK_0100', 0, async function (done) {
let packOpts = { format: ["image/webp"], quality: 90 } let packOpts = { format: ["image/webp"], quality: 90 }
packingCb(done, 'wbp_015', packOpts) packingCb(done, 'SUB_GRAPHIC_IMAGE_WEBP_PACKING_CALLBACK_0100', packOpts)
}) })
/** /**
* @tc.number : wbp_016 * @tc.number : SUB_GRAPHIC_IMAGE_WEBP_PACKING_PROMISE_0100
* @tc.name : packing - promise-webp * @tc.name : packing - promise-webp
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call packing * 2.call packing
...@@ -943,13 +943,13 @@ describe('imageWebp', function () { ...@@ -943,13 +943,13 @@ describe('imageWebp', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('wbp_016', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WEBP_PACKING_PROMISE_0100', 0, async function (done) {
let packOpts = { format: ["image/webp"], quality: 100 } let packOpts = { format: ["image/webp"], quality: 100 }
packingPromise(done, 'wbp_016', packOpts) packingPromise(done, 'SUB_GRAPHIC_IMAGE_WEBP_PACKING_PROMISE_0100', packOpts)
}) })
/** /**
* @tc.number : wbp_017 * @tc.number : SUB_GRAPHIC_IMAGE_WEBP_PACKING_PROMISE_ERROR_0100
* @tc.name : packing - promise-webp-wrong quality * @tc.name : packing - promise-webp-wrong quality
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call packing * 2.call packing
...@@ -958,13 +958,13 @@ describe('imageWebp', function () { ...@@ -958,13 +958,13 @@ describe('imageWebp', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('wbp_017', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WEBP_PACKING_PROMISE_ERROR_0100', 0, async function (done) {
let packOpts = { format: ["image/webp"], quality: 123 } let packOpts = { format: ["image/webp"], quality: 123 }
packingPromiseErr(done, 'wbp_017', packOpts) packingPromiseErr(done, 'SUB_GRAPHIC_IMAGE_WEBP_PACKING_PROMISE_ERROR_0100', packOpts)
}) })
/** /**
* @tc.number : wbp_018 * @tc.number : SUB_GRAPHIC_IMAGE_WEBP_PACKING_PROMISE_0200
* @tc.name : packing - promise-webp * @tc.name : packing - promise-webp
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call packing * 2.call packing
...@@ -973,13 +973,13 @@ describe('imageWebp', function () { ...@@ -973,13 +973,13 @@ describe('imageWebp', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('wbp_018', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WEBP_PACKING_PROMISE_0200', 0, async function (done) {
let packOpts = { format: ["image/gif"], quality: 90 } let packOpts = { format: ["image/gif"], quality: 90 }
packingPromiseErr(done, 'wbp_018', packOpts) packingPromiseErr(done, 'SUB_GRAPHIC_IMAGE_WEBP_PACKING_PROMISE_0200', packOpts)
}) })
/** /**
* @tc.number : wbp_019 * @tc.number : SUB_GRAPHIC_IMAGE_WEBP_PACKING_PROMISE_NO_0100
* @tc.name : packing - promise-webp-no format * @tc.name : packing - promise-webp-no format
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call packing * 2.call packing
...@@ -988,13 +988,13 @@ describe('imageWebp', function () { ...@@ -988,13 +988,13 @@ describe('imageWebp', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('wbp_019', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WEBP_PACKING_PROMISE_NO_0100', 0, async function (done) {
let packOpts = { quality: 90 } let packOpts = { quality: 90 }
packingPromiseErr(done, 'wbp_019', packOpts) packingPromiseErr(done, 'SUB_GRAPHIC_IMAGE_WEBP_PACKING_PROMISE_NO_0100', packOpts)
}) })
/** /**
* @tc.number : wbp_020 * @tc.number : SUB_GRAPHIC_IMAGE_WEBP_PACKING_PROMISE_NO_0200
* @tc.name : packing - promise-webp-no format * @tc.name : packing - promise-webp-no format
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call packing * 2.call packing
...@@ -1003,13 +1003,13 @@ describe('imageWebp', function () { ...@@ -1003,13 +1003,13 @@ describe('imageWebp', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('wbp_020', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WEBP_PACKING_PROMISE_NO_0200', 0, async function (done) {
let packOpts = { format: ["image/jpeg"] } let packOpts = { format: ["image/jpeg"] }
packingPromiseErr(done, 'wbp_020', packOpts) packingPromiseErr(done, 'SUB_GRAPHIC_IMAGE_WEBP_PACKING_PROMISE_NO_0200', packOpts)
}) })
/** /**
* @tc.number : wbp_021 * @tc.number : SUB_GRAPHIC_IMAGE_WEBP_PACKING_CALLBACK_ERROR_0100
* @tc.name : packing - callback-webp-wrong format * @tc.name : packing - callback-webp-wrong format
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call packing * 2.call packing
...@@ -1018,13 +1018,13 @@ describe('imageWebp', function () { ...@@ -1018,13 +1018,13 @@ describe('imageWebp', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('wbp_021', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WEBP_PACKING_CALLBACK_ERROR_0100', 0, async function (done) {
let packOpts = { format: ["image/gif"], quality: 100 } let packOpts = { format: ["image/gif"], quality: 100 }
packingCbErr(done, 'wbp_021', packOpts) packingCbErr(done, 'SUB_GRAPHIC_IMAGE_WEBP_PACKING_CALLBACK_ERROR_0100', packOpts)
}) })
/** /**
* @tc.number : wbp_022 * @tc.number : SUB_GRAPHIC_IMAGE_WEBP_PACKING_CALLBACK_ERROR_0200
* @tc.name : packing - callback-webp-wrong quality * @tc.name : packing - callback-webp-wrong quality
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call packing * 2.call packing
...@@ -1033,13 +1033,13 @@ describe('imageWebp', function () { ...@@ -1033,13 +1033,13 @@ describe('imageWebp', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('wbp_022', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WEBP_PACKING_CALLBACK_ERROR_0200', 0, async function (done) {
let packOpts = { format: ["image/jpeg"], quality: 112 } let packOpts = { format: ["image/jpeg"], quality: 112 }
packingCbErr(done, 'wbp_022', packOpts) packingCbErr(done, 'SUB_GRAPHIC_IMAGE_WEBP_PACKING_CALLBACK_ERROR_0200', packOpts)
}) })
/** /**
* @tc.number : wbp_023 * @tc.number : SUB_GRAPHIC_IMAGE_WEBP_PACKING_CALLBACK_NO_0100
* @tc.name : packing - callback-webp-no quality * @tc.name : packing - callback-webp-no quality
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call packing * 2.call packing
...@@ -1048,13 +1048,13 @@ describe('imageWebp', function () { ...@@ -1048,13 +1048,13 @@ describe('imageWebp', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('wbp_023', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WEBP_PACKING_CALLBACK_NO_0100', 0, async function (done) {
let packOpts = { format: ["image/jpeg"] } let packOpts = { format: ["image/jpeg"] }
packingCbErr(done, 'wbp_023', packOpts) packingCbErr(done, 'SUB_GRAPHIC_IMAGE_WEBP_PACKING_CALLBACK_NO_0100', packOpts)
}) })
/** /**
* @tc.number : wbp_024 * @tc.number : SUB_GRAPHIC_IMAGE_WEBP_PACKING_CALLBACK_NO_0200
* @tc.name : packing - callback-webp-no format * @tc.name : packing - callback-webp-no format
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call packing * 2.call packing
...@@ -1063,13 +1063,13 @@ describe('imageWebp', function () { ...@@ -1063,13 +1063,13 @@ describe('imageWebp', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('wbp_024', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WEBP_PACKING_CALLBACK_NO_0200', 0, async function (done) {
let packOpts = { quality: 90 } let packOpts = { quality: 90 }
packingCbErr(done, 'wbp_024', packOpts) packingCbErr(done, 'SUB_GRAPHIC_IMAGE_WEBP_PACKING_CALLBACK_NO_0200', packOpts)
}) })
/** /**
* @tc.number : wbp_025 * @tc.number : SUB_GRAPHIC_IMAGE_WEBP_PACKING_CALLBACK_0200
* @tc.name : packing - callback-webp-quality -1 * @tc.name : packing - callback-webp-quality -1
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call packing * 2.call packing
...@@ -1078,13 +1078,13 @@ describe('imageWebp', function () { ...@@ -1078,13 +1078,13 @@ describe('imageWebp', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('wbp_025', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WEBP_PACKING_CALLBACK_0200', 0, async function (done) {
let packOpts = { format: ["image/jpeg"], quality: -1 } let packOpts = { format: ["image/jpeg"], quality: -1 }
packingCbErr(done, 'wbp_025', packOpts) packingCbErr(done, 'SUB_GRAPHIC_IMAGE_WEBP_PACKING_CALLBACK_0200', packOpts)
}) })
/** /**
* @tc.number : wbp_026 * @tc.number : SUB_GRAPHIC_IMAGE_WEBP_PACKING_PROMISE_0300
* @tc.name : packing - promise-webp-quality -1 * @tc.name : packing - promise-webp-quality -1
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call packing * 2.call packing
...@@ -1093,14 +1093,14 @@ describe('imageWebp', function () { ...@@ -1093,14 +1093,14 @@ describe('imageWebp', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('wbp_026', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WEBP_PACKING_PROMISE_0300', 0, async function (done) {
let packOpts = { format: ["image/jpeg"], quality: -1 } let packOpts = { format: ["image/jpeg"], quality: -1 }
packingPromiseErr(done, 'wbp_026', packOpts) packingPromiseErr(done, 'SUB_GRAPHIC_IMAGE_WEBP_PACKING_PROMISE_0300', packOpts)
}) })
/** /**
* @tc.number : wbp_027 * @tc.number : SUB_GRAPHIC_IMAGE_WEBP_PACKING_CALLBACK_0300
* @tc.name : packing - callback-webp-quality 0 * @tc.name : packing - callback-webp-quality 0
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call packing * 2.call packing
...@@ -1109,13 +1109,13 @@ describe('imageWebp', function () { ...@@ -1109,13 +1109,13 @@ describe('imageWebp', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('wbp_027', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WEBP_PACKING_CALLBACK_0300', 0, async function (done) {
let packOpts = { format: ["image/jpeg"], quality: 0 } let packOpts = { format: ["image/jpeg"], quality: 0 }
packingPromise(done, 'wbp_027', packOpts) packingPromise(done, 'SUB_GRAPHIC_IMAGE_WEBP_PACKING_CALLBACK_0300', packOpts)
}) })
/** /**
* @tc.number : wbp_028 * @tc.number : SUB_GRAPHIC_IMAGE_WEBP_PACKING_PROMISE_0400
* @tc.name : packing - promise-webp-quality 0 * @tc.name : packing - promise-webp-quality 0
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.call packing * 2.call packing
...@@ -1124,8 +1124,8 @@ describe('imageWebp', function () { ...@@ -1124,8 +1124,8 @@ describe('imageWebp', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('wbp_028', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_WEBP_PACKING_PROMISE_0400', 0, async function (done) {
let packOpts = { format: ["image/jpeg"], quality: 0 } let packOpts = { format: ["image/jpeg"], quality: 0 }
packingPromise(done, 'wbp_028', packOpts) packingPromise(done, 'SUB_GRAPHIC_IMAGE_WEBP_PACKING_PROMISE_0400', packOpts)
}) })
})} })}
...@@ -308,7 +308,7 @@ describe('imageYuv', function () { ...@@ -308,7 +308,7 @@ describe('imageYuv', function () {
} }
/** /**
* @tc.number : SUB_IMAGE_yuv_pixelmap_P_001 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_0100
* @tc.name : SUB_IMAGE_yuv_pixelmap_P_001 * @tc.name : SUB_IMAGE_yuv_pixelmap_P_001
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -316,14 +316,14 @@ describe('imageYuv', function () { ...@@ -316,14 +316,14 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_pixelmap_P_001', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_0100', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 6 } };
yuvToJpegByPixelMapPromise(done, 'SUB_IMAGE_yuv_pixelmap_P_001', sourceOptions, yuvData) yuvToJpegByPixelMapPromise(done, 'SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_0100', sourceOptions, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_pixelmap_P_002 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_0200
* @tc.name : SUB_IMAGE_yuv_pixelmap_P_002 * @tc.name : SUB_IMAGE_yuv_pixelmap_P_002
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -331,14 +331,14 @@ describe('imageYuv', function () { ...@@ -331,14 +331,14 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_pixelmap_P_002', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_0200', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 6 } };
yuvToJpegByPixelMapPromise(done, 'SUB_IMAGE_yuv_pixelmap_P_002', sourceOptions, yuvData) yuvToJpegByPixelMapPromise(done, 'SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_0200', sourceOptions, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_pixelmap_P_003 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_PROMISE_0100
* @tc.name : SUB_IMAGE_yuv_pixelmap_P_003 - Promise - wrong buffer * @tc.name : SUB_IMAGE_yuv_pixelmap_P_003 - Promise - wrong buffer
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -346,14 +346,14 @@ describe('imageYuv', function () { ...@@ -346,14 +346,14 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_pixelmap_P_003', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_PROMISE_0100', 0, async function (done) {
let yuvData = new ArrayBuffer(5); let yuvData = new ArrayBuffer(5);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 6 } };
yuvToJpegByPixelMapPromise(done, 'SUB_IMAGE_yuv_pixelmap_P_003', sourceOptions, yuvData) yuvToJpegByPixelMapPromise(done, 'SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_PROMISE_0100', sourceOptions, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_pixelmap_P_004 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_PROMISE_0200
* @tc.name : SUB_IMAGE_yuv_pixelmap_P_004 - Promise - wrong width * @tc.name : SUB_IMAGE_yuv_pixelmap_P_004 - Promise - wrong width
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -361,14 +361,14 @@ describe('imageYuv', function () { ...@@ -361,14 +361,14 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_pixelmap_P_004', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_PROMISE_0200', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 5 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 5 } };
yuvToJpegByPixelMapPromise_Fail(done, 'SUB_IMAGE_yuv_pixelmap_P_004', sourceOptions, yuvData) yuvToJpegByPixelMapPromise_Fail(done, 'SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_PROMISE_0200', sourceOptions, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_pixelmap_P_005 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_PROMISE_0300
* @tc.name : SUB_IMAGE_yuv_pixelmap_P_005 - Promise - wrong buffer * @tc.name : SUB_IMAGE_yuv_pixelmap_P_005 - Promise - wrong buffer
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -376,14 +376,14 @@ describe('imageYuv', function () { ...@@ -376,14 +376,14 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_pixelmap_P_005', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_PROMISE_0300', 0, async function (done) {
let yuvData = new ArrayBuffer(5); let yuvData = new ArrayBuffer(5);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 6 } };
yuvToJpegByPixelMapPromise(done, 'SUB_IMAGE_yuv_pixelmap_P_005', sourceOptions, yuvData) yuvToJpegByPixelMapPromise(done, 'SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_PROMISE_0300', sourceOptions, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_pixelmap_P_006 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_PROMISE_0400
* @tc.name : SUB_IMAGE_yuv_pixelmap_P_006 - Promise - wrong width * @tc.name : SUB_IMAGE_yuv_pixelmap_P_006 - Promise - wrong width
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -391,14 +391,14 @@ describe('imageYuv', function () { ...@@ -391,14 +391,14 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_pixelmap_P_006', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_PROMISE_0400', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 5 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 5 } };
yuvToJpegByPixelMapPromise_Fail(done, 'SUB_IMAGE_yuv_pixelmap_P_006', sourceOptions, yuvData) yuvToJpegByPixelMapPromise_Fail(done, 'SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_PROMISE_0400', sourceOptions, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_pixelmap_P_007 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_PROMISE_0500
* @tc.name : SUB_IMAGE_yuv_pixelmap_P_007 - Promise - wrong format * @tc.name : SUB_IMAGE_yuv_pixelmap_P_007 - Promise - wrong format
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -406,14 +406,14 @@ describe('imageYuv', function () { ...@@ -406,14 +406,14 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_pixelmap_P_007', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_PROMISE_0500', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 10, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 10, sourceSize: { height: 4, width: 6 } };
yuvToJpegByPixelMapPromise_Fail(done, 'SUB_IMAGE_yuv_pixelmap_P_007', sourceOptions, yuvData) yuvToJpegByPixelMapPromise_Fail(done, 'SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_PROMISE_0500', sourceOptions, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_pixelmap_P_008 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_PROMISE_0600
* @tc.name : SUB_IMAGE_yuv_pixelmap_P_008 - Promise - format null * @tc.name : SUB_IMAGE_yuv_pixelmap_P_008 - Promise - format null
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -421,14 +421,14 @@ describe('imageYuv', function () { ...@@ -421,14 +421,14 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_pixelmap_P_008', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_PROMISE_0600', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourceSize: { height: 4, width: 6 } };
yuvToJpegByPixelMapPromise_Fail(done, 'SUB_IMAGE_yuv_pixelmap_P_008', sourceOptions, yuvData) yuvToJpegByPixelMapPromise_Fail(done, 'SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_PROMISE_0600', sourceOptions, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_imagesource_P_001 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_0100
* @tc.name : SUB_IMAGE_yuv_imagesource_P_001 * @tc.name : SUB_IMAGE_yuv_imagesource_P_001
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -438,15 +438,15 @@ describe('imageYuv', function () { ...@@ -438,15 +438,15 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_imagesource_P_001', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_0100', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 6 } };
let packOpts = { format: "image/jpeg", quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
yuvToJpegByImageSourcePromise(done, 'SUB_IMAGE_yuv_imagesource_P_001', sourceOptions, packOpts, yuvData) yuvToJpegByImageSourcePromise(done, 'SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_0100', sourceOptions, packOpts, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_imagesource_P_002 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_0200
* @tc.name : SUB_IMAGE_yuv_imagesource_P_002 * @tc.name : SUB_IMAGE_yuv_imagesource_P_002
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -456,15 +456,15 @@ describe('imageYuv', function () { ...@@ -456,15 +456,15 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_imagesource_P_002', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_0200', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 6 } };
let packOpts = { format: "image/jpeg", quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
yuvToJpegByImageSourcePromise(done, 'SUB_IMAGE_yuv_imagesource_P_002', sourceOptions, packOpts, yuvData) yuvToJpegByImageSourcePromise(done, 'SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_0200', sourceOptions, packOpts, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_imagesource_P_003 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_PROMISE_0100
* @tc.name : SUB_IMAGE_yuv_imagesource_P_003 - Promise - wrong buffer * @tc.name : SUB_IMAGE_yuv_imagesource_P_003 - Promise - wrong buffer
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -474,15 +474,15 @@ describe('imageYuv', function () { ...@@ -474,15 +474,15 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_imagesource_P_003', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_PROMISE_0100', 0, async function (done) {
let yuvData = new ArrayBuffer(5); let yuvData = new ArrayBuffer(5);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 6 } };
let packOpts = { format: "image/jpeg", quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
yuvToJpegByImageSourcePromise(done, 'SUB_IMAGE_yuv_imagesource_P_003', sourceOptions, packOpts, yuvData) yuvToJpegByImageSourcePromise(done, 'SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_PROMISE_0100', sourceOptions, packOpts, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_imagesource_P_004 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_PROMISE_0200
* @tc.name : SUB_IMAGE_yuv_imagesource_P_004 - Promise - wrong width * @tc.name : SUB_IMAGE_yuv_imagesource_P_004 - Promise - wrong width
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -492,15 +492,15 @@ describe('imageYuv', function () { ...@@ -492,15 +492,15 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_imagesource_P_004', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_PROMISE_0200', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 5 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 5 } };
let packOpts = { format: "image/jpeg", quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
yuvToJpegByImageSourcePromise_Fail(done, 'SUB_IMAGE_yuv_imagesource_P_004', sourceOptions, packOpts, yuvData) yuvToJpegByImageSourcePromise_Fail(done, 'SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_PROMISE_0200', sourceOptions, packOpts, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_imagesource_P_005 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_PROMISE_0300
* @tc.name : SUB_IMAGE_yuv_imagesource_P_005 - Promise - wrong buffer * @tc.name : SUB_IMAGE_yuv_imagesource_P_005 - Promise - wrong buffer
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -510,15 +510,15 @@ describe('imageYuv', function () { ...@@ -510,15 +510,15 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_imagesource_P_005', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_PROMISE_0300', 0, async function (done) {
let yuvData = new ArrayBuffer(5); let yuvData = new ArrayBuffer(5);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 6 } };
let packOpts = { format: "image/jpeg", quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
yuvToJpegByImageSourcePromise(done, 'SUB_IMAGE_yuv_imagesource_P_005', sourceOptions, packOpts, yuvData) yuvToJpegByImageSourcePromise(done, 'SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_PROMISE_0300', sourceOptions, packOpts, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_imagesource_P_006 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_PROMISE_0400
* @tc.name : SUB_IMAGE_yuv_imagesource_P_006 - Promise - wrong width * @tc.name : SUB_IMAGE_yuv_imagesource_P_006 - Promise - wrong width
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -528,15 +528,15 @@ describe('imageYuv', function () { ...@@ -528,15 +528,15 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_imagesource_P_006', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_PROMISE_0400', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 5 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 5 } };
let packOpts = { format: "image/jpeg", quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
yuvToJpegByImageSourcePromise_Fail(done, 'SUB_IMAGE_yuv_imagesource_P_006', sourceOptions, packOpts, yuvData) yuvToJpegByImageSourcePromise_Fail(done, 'SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_PROMISE_0400', sourceOptions, packOpts, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_imagesource_P_007 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_PROMISE_0500
* @tc.name : SUB_IMAGE_yuv_imagesource_P_007 - Promise - wrong format * @tc.name : SUB_IMAGE_yuv_imagesource_P_007 - Promise - wrong format
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -546,15 +546,15 @@ describe('imageYuv', function () { ...@@ -546,15 +546,15 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_imagesource_P_007', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_PROMISE_0500', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 10, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 10, sourceSize: { height: 4, width: 6 } };
let packOpts = { format: "image/jpeg", quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
yuvToJpegByImageSourcePromise_Fail(done, 'SUB_IMAGE_yuv_imagesource_P_007', sourceOptions, packOpts, yuvData) yuvToJpegByImageSourcePromise_Fail(done, 'SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_PROMISE_0500', sourceOptions, packOpts, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_imagesource_P_008 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_PROMISE_0600
* @tc.name : SUB_IMAGE_yuv_imagesource_P_008 - Promise - format null * @tc.name : SUB_IMAGE_yuv_imagesource_P_008 - Promise - format null
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -564,15 +564,15 @@ describe('imageYuv', function () { ...@@ -564,15 +564,15 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_imagesource_P_008', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_PROMISE_0600', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourceSize: { height: 4, width: 6 } };
let packOpts = { format: "image/jpeg", quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
yuvToJpegByImageSourcePromise_Fail(done, 'SUB_IMAGE_yuv_imagesource_P_008', sourceOptions, packOpts, yuvData) yuvToJpegByImageSourcePromise_Fail(done, 'SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_PROMISE_0600', sourceOptions, packOpts, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_pixelmap_CB_001 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_CB_0100
* @tc.name : SUB_IMAGE_yuv_pixelmap_CB_001 * @tc.name : SUB_IMAGE_yuv_pixelmap_CB_001
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -580,14 +580,14 @@ describe('imageYuv', function () { ...@@ -580,14 +580,14 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_pixelmap_CB_001', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_CB_0100', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 6 } };
yuvToJpegByPixelMapCallback(done, 'SUB_IMAGE_yuv_pixelmap_CB_001', sourceOptions, yuvData) yuvToJpegByPixelMapCallback(done, 'SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_CB_0100', sourceOptions, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_pixelmap_CB_002 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_CB_0200
* @tc.name : SUB_IMAGE_yuv_pixelmap_CB_002 * @tc.name : SUB_IMAGE_yuv_pixelmap_CB_002
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -595,14 +595,14 @@ describe('imageYuv', function () { ...@@ -595,14 +595,14 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_pixelmap_CB_002', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_CB_0200', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 6 } };
yuvToJpegByPixelMapCallback(done, 'SUB_IMAGE_yuv_pixelmap_CB_002', sourceOptions, yuvData) yuvToJpegByPixelMapCallback(done, 'SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_CB_0200', sourceOptions, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_pixelmap_CB_003 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_CB_PROMISE_0100
* @tc.name : SUB_IMAGE_yuv_pixelmap_CB_003 - Promise - wrong buffer * @tc.name : SUB_IMAGE_yuv_pixelmap_CB_003 - Promise - wrong buffer
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -610,14 +610,14 @@ describe('imageYuv', function () { ...@@ -610,14 +610,14 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_pixelmap_CB_003', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_CB_PROMISE_0100', 0, async function (done) {
let yuvData = new ArrayBuffer(5); let yuvData = new ArrayBuffer(5);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 6 } };
yuvToJpegByPixelMapCallback(done, 'SUB_IMAGE_yuv_pixelmap_CB_003', sourceOptions, yuvData) yuvToJpegByPixelMapCallback(done, 'SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_CB_PROMISE_0100', sourceOptions, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_pixelmap_CB_004 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_CB_PROMISE_0200
* @tc.name : SUB_IMAGE_yuv_pixelmap_CB_004 - Promise - wrong width * @tc.name : SUB_IMAGE_yuv_pixelmap_CB_004 - Promise - wrong width
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -625,14 +625,14 @@ describe('imageYuv', function () { ...@@ -625,14 +625,14 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_pixelmap_CB_004', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_CB_PROMISE_0200', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 5 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 5 } };
yuvToJpegByPixelMapCallback_Fail(done, 'SUB_IMAGE_yuv_pixelmap_CB_004', sourceOptions, yuvData) yuvToJpegByPixelMapCallback_Fail(done, 'SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_CB_PROMISE_0200', sourceOptions, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_pixelmap_CB_005 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_CB_PROMISE_0300
* @tc.name : SUB_IMAGE_yuv_pixelmap_CB_005 - Promise - wrong buffer * @tc.name : SUB_IMAGE_yuv_pixelmap_CB_005 - Promise - wrong buffer
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -640,14 +640,14 @@ describe('imageYuv', function () { ...@@ -640,14 +640,14 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_pixelmap_CB_005', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_CB_PROMISE_0300', 0, async function (done) {
let yuvData = new ArrayBuffer(5); let yuvData = new ArrayBuffer(5);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 6 } };
yuvToJpegByPixelMapCallback(done, 'SUB_IMAGE_yuv_pixelmap_CB_005', sourceOptions, yuvData) yuvToJpegByPixelMapCallback(done, 'SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_CB_PROMISE_0300', sourceOptions, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_pixelmap_CB_006 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_CB_PROMISE_0400
* @tc.name : SUB_IMAGE_yuv_pixelmap_CB_006 - Promise - wrong width * @tc.name : SUB_IMAGE_yuv_pixelmap_CB_006 - Promise - wrong width
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -655,14 +655,14 @@ describe('imageYuv', function () { ...@@ -655,14 +655,14 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_pixelmap_CB_006', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_CB_PROMISE_0400', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 5 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 5 } };
yuvToJpegByPixelMapCallback_Fail(done, 'SUB_IMAGE_yuv_pixelmap_CB_006', sourceOptions, yuvData) yuvToJpegByPixelMapCallback_Fail(done, 'SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_CB_PROMISE_0400', sourceOptions, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_pixelmap_CB_007 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_CB_PROMISE_0500
* @tc.name : SUB_IMAGE_yuv_pixelmap_CB_007 - Promise - wrong format * @tc.name : SUB_IMAGE_yuv_pixelmap_CB_007 - Promise - wrong format
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -670,14 +670,14 @@ describe('imageYuv', function () { ...@@ -670,14 +670,14 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_pixelmap_CB_007', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_CB_PROMISE_0500', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 10, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 10, sourceSize: { height: 4, width: 6 } };
yuvToJpegByPixelMapCallback_Fail(done, 'SUB_IMAGE_yuv_pixelmap_CB_007', sourceOptions, yuvData) yuvToJpegByPixelMapCallback_Fail(done, 'SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_CB_PROMISE_0500', sourceOptions, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_pixelmap_CB_008 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_CB_PROMISE_0600
* @tc.name : SUB_IMAGE_yuv_pixelmap_CB_008 - Promise - format null * @tc.name : SUB_IMAGE_yuv_pixelmap_CB_008 - Promise - format null
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -685,14 +685,14 @@ describe('imageYuv', function () { ...@@ -685,14 +685,14 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_pixelmap_CB_008', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_CB_PROMISE_0600', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourceSize: { height: 4, width: 6 } };
yuvToJpegByPixelMapCallback_Fail(done, 'SUB_IMAGE_yuv_pixelmap_CB_008', sourceOptions, yuvData) yuvToJpegByPixelMapCallback_Fail(done, 'SUB_GRAPHIC_IMAGE_YUV_PIXELMAP_CB_PROMISE_0600', sourceOptions, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_imagesource_CB_001 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_CB_0100
* @tc.name : SUB_IMAGE_yuv_imagesource_CB_001 * @tc.name : SUB_IMAGE_yuv_imagesource_CB_001
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -702,15 +702,15 @@ describe('imageYuv', function () { ...@@ -702,15 +702,15 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_imagesource_CB_001', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_CB_0100', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 6 } };
let packOpts = { format: "image/jpeg", quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
yuvToJpegByImageSourceCallback(done, 'SUB_IMAGE_yuv_imagesource_CB_001', sourceOptions, packOpts, yuvData) yuvToJpegByImageSourceCallback(done, 'SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_CB_0100', sourceOptions, packOpts, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_imagesource_CB_002 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_CB_0200
* @tc.name : SUB_IMAGE_yuv_imagesource_CB_002 * @tc.name : SUB_IMAGE_yuv_imagesource_CB_002
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -720,15 +720,15 @@ describe('imageYuv', function () { ...@@ -720,15 +720,15 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_imagesource_CB_002', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_CB_0200', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 6 } };
let packOpts = { format: "image/jpeg", quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
yuvToJpegByImageSourceCallback(done, 'SUB_IMAGE_yuv_imagesource_CB_002', sourceOptions, packOpts, yuvData) yuvToJpegByImageSourceCallback(done, 'SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_CB_0200', sourceOptions, packOpts, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_imagesource_CB_003 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_CB_PROMISE_0100
* @tc.name : SUB_IMAGE_yuv_imagesource_CB_003 - Promise - wrong buffer * @tc.name : SUB_IMAGE_yuv_imagesource_CB_003 - Promise - wrong buffer
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -738,15 +738,15 @@ describe('imageYuv', function () { ...@@ -738,15 +738,15 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_imagesource_CB_003', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_CB_PROMISE_0100', 0, async function (done) {
let yuvData = new ArrayBuffer(5); let yuvData = new ArrayBuffer(5);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 6 } };
let packOpts = { format: "image/jpeg", quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
yuvToJpegByImageSourceCallback(done, 'SUB_IMAGE_yuv_imagesource_CB_003', sourceOptions, packOpts, yuvData) yuvToJpegByImageSourceCallback(done, 'SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_CB_PROMISE_0100', sourceOptions, packOpts, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_imagesource_CB_004 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_CB_PROMISE_0200
* @tc.name : SUB_IMAGE_yuv_imagesource_CB_004 - Promise - wrong width * @tc.name : SUB_IMAGE_yuv_imagesource_CB_004 - Promise - wrong width
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -756,15 +756,15 @@ describe('imageYuv', function () { ...@@ -756,15 +756,15 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_imagesource_CB_004', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_CB_PROMISE_0200', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 5 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 5 } };
let packOpts = { format: "image/jpeg", quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
yuvToJpegByImageSourceCallback_Fail(done, 'SUB_IMAGE_yuv_imagesource_CB_004', sourceOptions, packOpts, yuvData) yuvToJpegByImageSourceCallback_Fail(done, 'SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_CB_PROMISE_0200', sourceOptions, packOpts, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_imagesource_CB_005 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_CB_PROMISE_0300
* @tc.name : SUB_IMAGE_yuv_imagesource_CB_005 - Promise - wrong buffer * @tc.name : SUB_IMAGE_yuv_imagesource_CB_005 - Promise - wrong buffer
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -774,15 +774,15 @@ describe('imageYuv', function () { ...@@ -774,15 +774,15 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_imagesource_CB_005', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_CB_PROMISE_0300', 0, async function (done) {
let yuvData = new ArrayBuffer(5); let yuvData = new ArrayBuffer(5);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 6 } };
let packOpts = { format: "image/jpeg", quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
yuvToJpegByImageSourceCallback(done, 'SUB_IMAGE_yuv_imagesource_CB_005', sourceOptions, packOpts, yuvData) yuvToJpegByImageSourceCallback(done, 'SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_CB_PROMISE_0300', sourceOptions, packOpts, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_imagesource_CB_006 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_CB_PROMISE_0400
* @tc.name : SUB_IMAGE_yuv_imagesource_CB_006 - Promise - wrong width * @tc.name : SUB_IMAGE_yuv_imagesource_CB_006 - Promise - wrong width
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -792,15 +792,15 @@ describe('imageYuv', function () { ...@@ -792,15 +792,15 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_imagesource_CB_006', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_CB_PROMISE_0400', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 5 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 5 } };
let packOpts = { format: "image/jpeg", quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
yuvToJpegByImageSourceCallback_Fail(done, 'SUB_IMAGE_yuv_imagesource_CB_006', sourceOptions, packOpts, yuvData) yuvToJpegByImageSourceCallback_Fail(done, 'SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_CB_PROMISE_0400', sourceOptions, packOpts, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_imagesource_CB_007 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_CB_PROMISE_0500
* @tc.name : SUB_IMAGE_yuv_imagesource_CB_007 - Promise - wrong format * @tc.name : SUB_IMAGE_yuv_imagesource_CB_007 - Promise - wrong format
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -810,15 +810,15 @@ describe('imageYuv', function () { ...@@ -810,15 +810,15 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_imagesource_CB_007', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_CB_PROMISE_0500', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 10, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 10, sourceSize: { height: 4, width: 6 } };
let packOpts = { format: "image/jpeg", quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
yuvToJpegByImageSourceCallback_Fail(done, 'SUB_IMAGE_yuv_imagesource_CB_007', sourceOptions, packOpts, yuvData) yuvToJpegByImageSourceCallback_Fail(done, 'SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_CB_PROMISE_0500', sourceOptions, packOpts, yuvData)
}) })
/** /**
* @tc.number : SUB_IMAGE_yuv_imagesource_CB_008 * @tc.number : SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_CB_PROMISE_0600
* @tc.name : SUB_IMAGE_yuv_imagesource_CB_008 - Promise - format null * @tc.name : SUB_IMAGE_yuv_imagesource_CB_008 - Promise - format null
* @tc.desc : 1.create ImageSource * @tc.desc : 1.create ImageSource
* 2.create pixelmap * 2.create pixelmap
...@@ -828,10 +828,10 @@ describe('imageYuv', function () { ...@@ -828,10 +828,10 @@ describe('imageYuv', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_yuv_imagesource_CB_008', 0, async function (done) { it('SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_CB_PROMISE_0600', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourceSize: { height: 4, width: 6 } };
let packOpts = { format: "image/jpeg", quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
yuvToJpegByImageSourceCallback_Fail(done, 'SUB_IMAGE_yuv_imagesource_CB_008', sourceOptions, packOpts, yuvData) yuvToJpegByImageSourceCallback_Fail(done, 'SUB_GRAPHIC_IMAGE_YUV_IMAGESOURCE_CB_PROMISE_0600', sourceOptions, packOpts, yuvData)
}) })
})} })}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册