未验证 提交 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);
} }
}) })
}) })
......
...@@ -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)
}) })
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册