提交 2796b31d 编写于 作者: C caochuan

modify receiver-yuv testcase

Signed-off-by: Ncaochuan <caochuan@huawei.com>
上级 ba50f67c
...@@ -12,41 +12,39 @@ ...@@ -12,41 +12,39 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import image from '@ohos.multimedia.image' import image from "@ohos.multimedia.image";
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium";
export default function ImageReceiver() { export default function ImageReceiver() {
describe('ImageReceiver', function () { describe("ImageReceiver", function () {
const YUV_Y = 1;
const YUV_U = 2;
const YUV_V = 3;
const JPEG = 4;
const WIDTH = 8192; const WIDTH = 8192;
const HEIGHT = 8; const HEIGHT = 8;
const FORMAT = 4;
const CAPACITY = 8; const CAPACITY = 8;
const YCBCR_422_SP = 1000; const RGBA = 12;
const FORMATJPEG = 2000; const { JPEG: FORMATJPEG, YCBCR_422_SP } = image.ImageFormat;
const { YUV_Y, YUV_U, YUV_V, JPEG } = image.ComponentType;
beforeAll(async function () { beforeAll(async function () {
console.info('beforeAll case'); console.info("beforeAll case");
}) });
beforeEach(function () { beforeEach(function () {
console.info('beforeEach case'); console.info("beforeEach case");
}) });
afterEach(async function () { afterEach(async function () {
console.info('afterEach case'); console.info("afterEach case");
}) });
afterAll(async function () { afterAll(async function () {
console.info('afterAll case'); console.info("afterAll case");
}) });
async function sleep(times = 200) { async function sleep(times = 200) {
await new Promise(res => setTimeout(() => { res() }, times)); await new Promise((res) =>
setTimeout(() => {
res();
}, times)
);
} }
async function createRecriver(done, testNum, wid, hei, fmt, cap) { async function createRecriver(done, testNum, wid, hei, fmt, cap) {
...@@ -62,13 +60,13 @@ describe('ImageReceiver', function () { ...@@ -62,13 +60,13 @@ describe('ImageReceiver', function () {
} }
async function getComponentProErr(done, testNum, param) { async function getComponentProErr(done, testNum, param) {
var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMAT, CAPACITY); var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMATJPEG, CAPACITY);
let once = false; let once = false;
if (receiver == undefined) { if (receiver == undefined) {
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
receiver.on('imageArrival', () => { receiver.on("imageArrival", () => {
if (once) { if (once) {
return; return;
} }
...@@ -80,7 +78,7 @@ describe('ImageReceiver', function () { ...@@ -80,7 +78,7 @@ describe('ImageReceiver', function () {
} else { } else {
expect(img.size.width == WIDTH).assertTrue(); expect(img.size.width == WIDTH).assertTrue();
expect(img.size.height == HEIGHT).assertTrue(); expect(img.size.height == HEIGHT).assertTrue();
expect(img.format == 12).assertTrue(); expect(img.format == RGBA).assertTrue();
expect(img.clipRect.size.width == WIDTH).assertTrue(); expect(img.clipRect.size.width == WIDTH).assertTrue();
expect(img.clipRect.size.height == HEIGHT).assertTrue(); expect(img.clipRect.size.height == HEIGHT).assertTrue();
expect(img.clipRect.x == 0).assertTrue(); expect(img.clipRect.x == 0).assertTrue();
...@@ -88,27 +86,28 @@ describe('ImageReceiver', function () { ...@@ -88,27 +86,28 @@ describe('ImageReceiver', function () {
try { try {
await img.getComponent(param); await img.getComponent(param);
expect(false).assertTrue(); expect(false).assertTrue();
done();
} catch (error) { } catch (error) {
expect(error.code == 1).assertTrue(); expect(error.code == 1).assertTrue();
console.log(`${testNum} error msg: ` + error); console.log(`${testNum} error msg: ` + error);
done(); done();
} }
} }
}) });
expect(true).assertTrue(); expect(true).assertTrue();
}) });
var dummy = receiver.test; var dummy = receiver.test;
} }
} }
async function getComponentCbErr(done, testNum, param) { async function getComponentCbErr(done, testNum, param) {
var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMAT, CAPACITY); var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMATJPEG, CAPACITY);
let once = false; let once = false;
if (receiver == undefined) { if (receiver == undefined) {
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
receiver.on('imageArrival', () => { receiver.on("imageArrival", () => {
if (once) { if (once) {
return; return;
} }
...@@ -120,7 +119,7 @@ describe('ImageReceiver', function () { ...@@ -120,7 +119,7 @@ describe('ImageReceiver', function () {
} else { } else {
expect(img.size.width == WIDTH).assertTrue(); expect(img.size.width == WIDTH).assertTrue();
expect(img.size.height == HEIGHT).assertTrue(); expect(img.size.height == HEIGHT).assertTrue();
expect(img.format == 12).assertTrue(); expect(img.format == RGBA).assertTrue();
expect(img.clipRect.size.width == WIDTH).assertTrue(); expect(img.clipRect.size.width == WIDTH).assertTrue();
expect(img.clipRect.size.height == HEIGHT).assertTrue(); expect(img.clipRect.size.height == HEIGHT).assertTrue();
expect(img.clipRect.x == 0).assertTrue(); expect(img.clipRect.x == 0).assertTrue();
...@@ -128,29 +127,29 @@ describe('ImageReceiver', function () { ...@@ -128,29 +127,29 @@ describe('ImageReceiver', function () {
try { try {
img.getComponent(param, (err, component) => { img.getComponent(param, (err, component) => {
expect(false).assertTrue(); expect(false).assertTrue();
}) done();
});
} catch (error) { } catch (error) {
expect(error.code == 1).assertTrue(); expect(error.code == 1).assertTrue();
console.log(`${testNum} error msg: ` + error); console.log(`${testNum} error msg: ` + error);
done(); done();
} }
} }
}) });
expect(true).assertTrue(); expect(true).assertTrue();
}) });
var dummy = receiver.test; var dummy = receiver.test;
} }
} }
async function getComponentP(done, testNum, param) { async function getComponentPromise(done, testNum, param) {
var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMAT, CAPACITY); var receiver = image.createImageReceiver(WIDTH, HEIGHT, YCBCR_422_SP, CAPACITY);
let once = false; let once = false;
if (receiver == undefined) { if (receiver == undefined) {
expect(false).assertTrue(); expect(false).assertTrue();
done();
return; return;
} }
receiver.on('imageArrival', () => { receiver.on("imageArrival", () => {
if (once) { if (once) {
return; return;
} }
...@@ -162,45 +161,45 @@ describe('ImageReceiver', function () { ...@@ -162,45 +161,45 @@ describe('ImageReceiver', function () {
} else { } else {
expect(img.size.width == WIDTH).assertTrue(); expect(img.size.width == WIDTH).assertTrue();
expect(img.size.height == HEIGHT).assertTrue(); expect(img.size.height == HEIGHT).assertTrue();
expect(img.format == 12).assertTrue(); expect(img.format == RGBA).assertTrue();
expect(img.clipRect.size.width == WIDTH).assertTrue(); expect(img.clipRect.size.width == WIDTH).assertTrue();
expect(img.clipRect.size.height == HEIGHT).assertTrue(); expect(img.clipRect.size.height == HEIGHT).assertTrue();
expect(img.clipRect.x == 0).assertTrue(); expect(img.clipRect.x == 0).assertTrue();
expect(img.clipRect.y == 0).assertTrue(); expect(img.clipRect.y == 0).assertTrue();
img.getComponent(param)
img.getComponent(param).then(component => { .then((component) => {
if (component == undefined) { if (component == undefined) {
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { return;
}
expect(component.componentType == param).assertTrue(); expect(component.componentType == param).assertTrue();
expect(component.byteBuffer != undefined).assertTrue(); expect(component.byteBuffer != undefined).assertTrue();
expect(component.rowStride == 0).assertTrue(); expect(component.rowStride == 8192).assertTrue();
expect(component.pixelStride == 0).assertTrue(); expect(component.pixelStride == 1).assertTrue();
done(); done();
} })
}).catch(error => { .catch((error) => {
console.log(`${testNum} error:` + error) console.log(`${testNum} error:` + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
}) });
} }
}) });
expect(true).assertTrue(); expect(true).assertTrue();
}) });
var dummy = receiver.test; var dummy = receiver.test;
} }
async function getComponentCb(done, testNum, param) { async function getComponentCb(done, testNum, param) {
var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMAT, CAPACITY); var receiver = image.createImageReceiver(WIDTH, HEIGHT, YCBCR_422_SP, CAPACITY);
let once = false; let once = false;
if (receiver == undefined) { if (receiver == undefined) {
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
return; return;
} }
receiver.on("imageArrival", () => {
receiver.on('imageArrival', () => {
if (once) { if (once) {
return; return;
} }
...@@ -212,34 +211,34 @@ describe('ImageReceiver', function () { ...@@ -212,34 +211,34 @@ describe('ImageReceiver', function () {
} else { } else {
expect(img.size.width == WIDTH).assertTrue(); expect(img.size.width == WIDTH).assertTrue();
expect(img.size.height == HEIGHT).assertTrue(); expect(img.size.height == HEIGHT).assertTrue();
expect(img.format == 12).assertTrue(); expect(img.format == RGBA).assertTrue();
expect(img.clipRect.size.width == WIDTH).assertTrue(); expect(img.clipRect.size.width == WIDTH).assertTrue();
expect(img.clipRect.size.height == HEIGHT).assertTrue(); expect(img.clipRect.size.height == HEIGHT).assertTrue();
expect(img.clipRect.x == 0).assertTrue(); expect(img.clipRect.x == 0).assertTrue();
expect(img.clipRect.y == 0).assertTrue(); expect(img.clipRect.y == 0).assertTrue();
img.getComponent(param, (err, component) => { img.getComponent(param, (err, component) => {
if (err) { if (err) {
expect(false).assertTrue(); expect(false).assertTrue();
console.log(`${testNum} geterror: ` + err) console.log(`${testNum} geterror: ` + err);
done();
} else { } else {
expect(component != undefined).assertTrue(); expect(component != undefined).assertTrue();
expect(component.componentType == param).assertTrue(); expect(component.componentType == param).assertTrue();
expect(component.byteBuffer != undefined).assertTrue(); expect(component.byteBuffer != undefined).assertTrue();
expect(component.rowStride == 0).assertTrue(); expect(component.rowStride == 8192).assertTrue();
expect(component.pixelStride == 0).assertTrue(); expect(component.pixelStride == 1).assertTrue();
done(); done();
} }
}) });
} }
}) });
expect(true).assertTrue(); expect(true).assertTrue();
}) });
var dummy = receiver.test; var dummy = receiver.test;
} }
async function onErr(done, testNum, param) { async function onErr(done, testNum, param) {
var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMAT, CAPACITY) var receiver = image.createImageReceiver(WIDTH, HEIGHT, FORMATJPEG, CAPACITY);
expect(receiver != undefined).assertTrue(); expect(receiver != undefined).assertTrue();
if (receiver == undefined) { if (receiver == undefined) {
expect(false).assertTrue(); expect(false).assertTrue();
...@@ -248,7 +247,7 @@ describe('ImageReceiver', function () { ...@@ -248,7 +247,7 @@ describe('ImageReceiver', function () {
try { try {
receiver.on(param, () => { receiver.on(param, () => {
expect(false).assertTrue(); expect(false).assertTrue();
}) });
} catch (error) { } catch (error) {
expect(error.code == 1).assertTrue(); expect(error.code == 1).assertTrue();
console.log(`${testNum} error msg: ` + error); console.log(`${testNum} error msg: ` + error);
...@@ -256,11 +255,10 @@ describe('ImageReceiver', function () { ...@@ -256,11 +255,10 @@ describe('ImageReceiver', function () {
} }
var dummy = receiver.test; var dummy = receiver.test;
} }
} }
function isString(value) { function isString(value) {
return typeof value === 'string'; return typeof value === "string";
} }
/** /**
...@@ -273,20 +271,20 @@ describe('ImageReceiver', function () { ...@@ -273,20 +271,20 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0100', 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, FORMATJPEG, CAPACITY);
if (receiver == undefined) { if (receiver == undefined) {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('receiver_001 undefined') console.info("receiver_001 undefined");
done(); done();
} else { } else {
expect(receiver.size.width == WIDTH).assertTrue(); expect(receiver.size.width == WIDTH).assertTrue();
expect(receiver.size.height == HEIGHT).assertTrue(); expect(receiver.size.height == HEIGHT).assertTrue();
expect(receiver.capacity == CAPACITY).assertTrue(); expect(receiver.capacity == CAPACITY).assertTrue();
expect(receiver.format == FORMAT).assertTrue(); expect(receiver.format == FORMATJPEG).assertTrue();
done(); done();
} }
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0200 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0200
...@@ -298,9 +296,16 @@ describe('ImageReceiver', function () { ...@@ -298,9 +296,16 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0200', 0, async function (done) { it("SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0200", 0, async function (done) {
createRecriver(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0200', WIDTH, HEIGHT, FORMAT, 'hd!') createRecriver(
}) done,
"SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0200",
WIDTH,
HEIGHT,
FORMATJPEG,
"hd!"
);
});
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0100 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0100
...@@ -312,9 +317,16 @@ describe('ImageReceiver', function () { ...@@ -312,9 +317,16 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0100', 0, async function (done) { it("SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0100", 0, async function (done) {
createRecriver(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0100', WIDTH, HEIGHT, null, CAPACITY) createRecriver(
}) done,
"SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0100",
WIDTH,
HEIGHT,
null,
CAPACITY
);
});
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0200 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0200
...@@ -326,9 +338,16 @@ describe('ImageReceiver', function () { ...@@ -326,9 +338,16 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0200', 0, async function (done) { it("SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0200", 0, async function (done) {
createRecriver(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0200', WIDTH, null, FORMAT, CAPACITY) createRecriver(
}) done,
"SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0200",
WIDTH,
null,
FORMATJPEG,
CAPACITY
);
});
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0300 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0300
...@@ -340,9 +359,16 @@ describe('ImageReceiver', function () { ...@@ -340,9 +359,16 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0300', 0, async function (done) { it("SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0300", 0, async function (done) {
createRecriver(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0300', null, HEIGHT, FORMAT, CAPACITY) createRecriver(
}) done,
"SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0300",
null,
HEIGHT,
FORMATJPEG,
CAPACITY
);
});
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0400 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0400
...@@ -354,9 +380,16 @@ describe('ImageReceiver', function () { ...@@ -354,9 +380,16 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0400', 0, async function (done) { it("SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0400", 0, async function (done) {
createRecriver(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0400', WIDTH, HEIGHT, FORMAT, null) createRecriver(
}) done,
"SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0400",
WIDTH,
HEIGHT,
FORMATJPEG,
null
);
});
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0500 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0500
...@@ -368,9 +401,16 @@ describe('ImageReceiver', function () { ...@@ -368,9 +401,16 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0500', 0, async function (done) { it("SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0500", 0, async function (done) {
createRecriver(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0500', false, HEIGHT, FORMAT, CAPACITY) createRecriver(
}) done,
"SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0500",
false,
HEIGHT,
FORMATJPEG,
CAPACITY
);
});
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0600 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0600
...@@ -382,9 +422,16 @@ describe('ImageReceiver', function () { ...@@ -382,9 +422,16 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0600', 0, async function (done) { it("SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0600", 0, async function (done) {
createRecriver(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0600', { a: 10 }, HEIGHT, FORMAT, CAPACITY) createRecriver(
}) done,
"SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0600",
{ a: 10 },
HEIGHT,
FORMATJPEG,
CAPACITY
);
});
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0300 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0300
...@@ -396,9 +443,16 @@ describe('ImageReceiver', function () { ...@@ -396,9 +443,16 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0300', 0, async function (done) { it("SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0300", 0, async function (done) {
createRecriver(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0300', WIDTH, false, FORMAT, CAPACITY) createRecriver(
}) done,
"SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0300",
WIDTH,
false,
FORMATJPEG,
CAPACITY
);
});
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0700 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0700
...@@ -410,9 +464,16 @@ describe('ImageReceiver', function () { ...@@ -410,9 +464,16 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0700', 0, async function (done) { it("SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0700", 0, async function (done) {
createRecriver(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0700', WIDTH, HEIGHT, 'form.', CAPACITY) createRecriver(
}) done,
"SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_ERROR_0700",
WIDTH,
HEIGHT,
"form.",
CAPACITY
);
});
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0400 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0400
...@@ -424,11 +485,11 @@ describe('ImageReceiver', function () { ...@@ -424,11 +485,11 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0400', 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('SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0400 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();
...@@ -437,7 +498,7 @@ describe('ImageReceiver', function () { ...@@ -437,7 +498,7 @@ describe('ImageReceiver', function () {
expect(receiver.format == FORMATJPEG).assertTrue(); expect(receiver.format == FORMATJPEG).assertTrue();
done(); done();
} }
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0500 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0500
...@@ -449,11 +510,11 @@ describe('ImageReceiver', function () { ...@@ -449,11 +510,11 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0500', 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('SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0500 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();
...@@ -462,7 +523,7 @@ describe('ImageReceiver', function () { ...@@ -462,7 +523,7 @@ describe('ImageReceiver', function () {
expect(receiver.format == YCBCR_422_SP).assertTrue(); expect(receiver.format == YCBCR_422_SP).assertTrue();
done(); done();
} }
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETRECEIVINGSURFACEID_PROMISE_0100 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETRECEIVINGSURFACEID_PROMISE_0100
...@@ -474,23 +535,30 @@ describe('ImageReceiver', function () { ...@@ -474,23 +535,30 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_GETRECEIVINGSURFACEID_PROMISE_0100', 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, FORMATJPEG, CAPACITY);
if (receiver != undefined) { if (receiver != undefined) {
receiver.getReceivingSurfaceId().then(id => { receiver
console.info('SUB_GRAPHIC_IMAGE_RECEIVER_GETRECEIVINGSURFACEID_PROMISE_0100 getReceivingSurfaceId [' + id + "]"); .getReceivingSurfaceId()
.then((id) => {
console.info(
"SUB_GRAPHIC_IMAGE_RECEIVER_GETRECEIVINGSURFACEID_PROMISE_0100 getReceivingSurfaceId [" +
id +
"]"
);
expect(isString(id)).assertTrue(); expect(isString(id)).assertTrue();
done(); done();
}).catch(error => { })
console.log('SUB_GRAPHIC_IMAGE_RECEIVER_GETRECEIVINGSURFACEID_PROMISE_0100 error: ' + error); .catch((error) => {
console.log("SUB_GRAPHIC_IMAGE_RECEIVER_GETRECEIVINGSURFACEID_PROMISE_0100 error: " + error);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
}) });
} else { } else {
expect(false).assertTrue(); expect(false).assertTrue();
done() done();
} }
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETRECEIVINGSURFACEID_CALLBACK_0100 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETRECEIVINGSURFACEID_CALLBACK_0100
...@@ -502,20 +570,24 @@ describe('ImageReceiver', function () { ...@@ -502,20 +570,24 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_GETRECEIVINGSURFACEID_CALLBACK_0100', 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, FORMATJPEG, CAPACITY);
if (receiver != undefined) { if (receiver != undefined) {
receiver.getReceivingSurfaceId((err, id) => { receiver.getReceivingSurfaceId((err, id) => {
console.info('SUB_GRAPHIC_IMAGE_RECEIVER_GETRECEIVINGSURFACEID_CALLBACK_0100 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('SUB_GRAPHIC_IMAGE_RECEIVER_GETRECEIVINGSURFACEID_CALLBACK_0100 finished'); console.info("SUB_GRAPHIC_IMAGE_RECEIVER_GETRECEIVINGSURFACEID_CALLBACK_0100 finished");
done() done();
} }
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_PROMISE_0100 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_PROMISE_0100
...@@ -526,23 +598,26 @@ describe('ImageReceiver', function () { ...@@ -526,23 +598,26 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_PROMISE_0100', 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, FORMATJPEG, CAPACITY);
if (receiver != undefined) { if (receiver != undefined) {
receiver.release().then(() => { receiver
console.info('SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_PROMISE_0100 release '); .release()
.then(() => {
console.info("SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_PROMISE_0100 release ");
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
}).catch(error => { })
.catch((error) => {
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
}) });
} else { } else {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_PROMISE_0100 finished'); console.info("SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_PROMISE_0100 finished");
done() done();
} }
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_CALLBACK_0100 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_CALLBACK_0100
...@@ -553,26 +628,26 @@ describe('ImageReceiver', function () { ...@@ -553,26 +628,26 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_CALLBACK_0100', 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, FORMATJPEG, 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('SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_CALLBACK_0100 release fail'); console.info("SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_CALLBACK_0100 release fail");
done() done();
} else { } else {
console.info('SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_CALLBACK_0100 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('SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_CALLBACK_0100 finished'); console.info("SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_CALLBACK_0100 finished");
done() done();
} }
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_READLATESTIMAGE_PROMISE_0100 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_READLATESTIMAGE_PROMISE_0100
...@@ -584,25 +659,28 @@ describe('ImageReceiver', function () { ...@@ -584,25 +659,28 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_READLATESTIMAGE_PROMISE_0100', 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, FORMATJPEG, CAPACITY);
var dummy = receiver.test; var dummy = receiver.test;
if (receiver != undefined) { if (receiver != undefined) {
receiver.readLatestImage().then(img => { receiver
console.info('SUB_GRAPHIC_IMAGE_RECEIVER_READLATESTIMAGE_PROMISE_0100 readLatestImage Success'); .readLatestImage()
.then((img) => {
console.info("SUB_GRAPHIC_IMAGE_RECEIVER_READLATESTIMAGE_PROMISE_0100 readLatestImage Success");
expect(img != undefined).assertTrue(); expect(img != undefined).assertTrue();
done(); done();
}).catch(error => { })
console.log('SUB_GRAPHIC_IMAGE_RECEIVER_READLATESTIMAGE_PROMISE_0100 error: ' + error); .catch((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('SUB_GRAPHIC_IMAGE_RECEIVER_READLATESTIMAGE_PROMISE_0100 finished'); console.info("SUB_GRAPHIC_IMAGE_RECEIVER_READLATESTIMAGE_PROMISE_0100 finished");
done() done();
} }
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_READLATESTIMAGE_CALLBACK_0100 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_READLATESTIMAGE_CALLBACK_0100
...@@ -614,21 +692,23 @@ describe('ImageReceiver', function () { ...@@ -614,21 +692,23 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_READLATESTIMAGE_CALLBACK_0100', 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, FORMATJPEG, 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('SUB_GRAPHIC_IMAGE_RECEIVER_READLATESTIMAGE_CALLBACK_0100 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('SUB_GRAPHIC_IMAGE_RECEIVER_READLATESTIMAGE_CALLBACK_0100 finished'); console.info("SUB_GRAPHIC_IMAGE_RECEIVER_READLATESTIMAGE_CALLBACK_0100 finished");
done(); done();
} }
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_READNEXTIMAGE_PROMISE_0100 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_READNEXTIMAGE_PROMISE_0100
...@@ -640,26 +720,29 @@ describe('ImageReceiver', function () { ...@@ -640,26 +720,29 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_READNEXTIMAGE_PROMISE_0100', 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, FORMATJPEG, 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
console.info('SUB_GRAPHIC_IMAGE_RECEIVER_READNEXTIMAGE_PROMISE_0100 readNextImage Success'); .readNextImage()
.then((img) => {
console.info("SUB_GRAPHIC_IMAGE_RECEIVER_READNEXTIMAGE_PROMISE_0100 readNextImage Success");
expect(img != undefined).assertTrue(); expect(img != undefined).assertTrue();
done()
}).catch(error => {
console.log('SUB_GRAPHIC_IMAGE_RECEIVER_READNEXTIMAGE_PROMISE_0100 error: ' + error);
expect(false).assertTrue();
done(); done();
}) })
.catch((error) => {
console.log("SUB_GRAPHIC_IMAGE_RECEIVER_READNEXTIMAGE_PROMISE_0100 error: " + error);
expect(false).assertTrue();
done();
});
} else { } else {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('SUB_GRAPHIC_IMAGE_RECEIVER_READNEXTIMAGE_PROMISE_0100 finished'); console.info("SUB_GRAPHIC_IMAGE_RECEIVER_READNEXTIMAGE_PROMISE_0100 finished");
done(); done();
} }
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_READNEXTIMAGE_CALLBACK_0100 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_READNEXTIMAGE_CALLBACK_0100
...@@ -671,26 +754,28 @@ describe('ImageReceiver', function () { ...@@ -671,26 +754,28 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_READNEXTIMAGE_CALLBACK_0100', 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, FORMATJPEG, CAPACITY);
var dummy = receiver.test; var dummy = receiver.test;
if (receiver != undefined) { if (receiver != undefined) {
receiver.readNextImage((err, img) => { receiver.readNextImage((err, img) => {
if (err) { if (err) {
expect(false).assertTrue(); expect(false).assertTrue();
done();
} else { } else {
console.info('SUB_GRAPHIC_IMAGE_RECEIVER_READNEXTIMAGE_CALLBACK_0100 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();
} }
});
})
} else { } else {
expect(false).assertTrue(); expect(false).assertTrue();
console.info('SUB_GRAPHIC_IMAGE_RECEIVER_READNEXTIMAGE_CALLBACK_0100 finished'); console.info("SUB_GRAPHIC_IMAGE_RECEIVER_READNEXTIMAGE_CALLBACK_0100 finished");
done(); done();
} }
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_JPEG_0100 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_JPEG_0100
...@@ -703,9 +788,9 @@ describe('ImageReceiver', function () { ...@@ -703,9 +788,9 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_JPEG_0100', 0, async function (done) { it("SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_JPEG_0100", 0, async function (done) {
getComponentP(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_JPEG_0100', JPEG) getComponentPromise(done, "SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_JPEG_0100", JPEG);
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_U_0100 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_U_0100
...@@ -718,9 +803,9 @@ describe('ImageReceiver', function () { ...@@ -718,9 +803,9 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_U_0100', 0, async function (done) { it("SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_U_0100", 0, async function (done) {
getComponentP(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_U_0100', YUV_U) getComponentPromise(done, "SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_U_0100", YUV_U);
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_V_0100 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_V_0100
...@@ -733,9 +818,9 @@ describe('ImageReceiver', function () { ...@@ -733,9 +818,9 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_V_0100', 0, async function (done) { it("SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_V_0100", 0, async function (done) {
getComponentP(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_V_0100', YUV_V) getComponentPromise(done, "SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_V_0100", YUV_V);
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_Y_0100 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_Y_0100
...@@ -748,9 +833,9 @@ describe('ImageReceiver', function () { ...@@ -748,9 +833,9 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_Y_0100', 0, async function (done) { it("SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_Y_0100", 0, async function (done) {
getComponentP(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_Y_0100', YUV_Y) getComponentPromise(done, "SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_Y_0100", YUV_Y);
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_JPEG_0100 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_JPEG_0100
...@@ -763,9 +848,9 @@ describe('ImageReceiver', function () { ...@@ -763,9 +848,9 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_JPEG_0100', 0, async function (done) { it("SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_JPEG_0100", 0, async function (done) {
getComponentCb(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_JPEG_0100', JPEG) getComponentCb(done, "SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_JPEG_0100", JPEG);
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_Y_0100 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_Y_0100
...@@ -778,9 +863,9 @@ describe('ImageReceiver', function () { ...@@ -778,9 +863,9 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_Y_0100', 0, async function (done) { it("SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_Y_0100", 0, async function (done) {
getComponentCb(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_Y_0100', YUV_Y) getComponentCb(done, "SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_Y_0100", YUV_Y);
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_V_0100 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_V_0100
...@@ -793,9 +878,9 @@ describe('ImageReceiver', function () { ...@@ -793,9 +878,9 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_V_0100', 0, async function (done) { it("SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_V_0100", 0, async function (done) {
getComponentCb(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_V_0100', YUV_V) getComponentCb(done, "SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_V_0100", YUV_V);
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_U_0100 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_U_0100
...@@ -808,9 +893,9 @@ describe('ImageReceiver', function () { ...@@ -808,9 +893,9 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_U_0100', 0, async function (done) { it("SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_U_0100", 0, async function (done) {
getComponentCb(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_U_0100', YUV_U) getComponentCb(done, "SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_U_0100", YUV_U);
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_RECEIVERON_0100 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_RECEIVERON_0100
...@@ -821,30 +906,30 @@ describe('ImageReceiver', function () { ...@@ -821,30 +906,30 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_RECEIVERON_0100', 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, FORMATJPEG, CAPACITY);
if (receiver == undefined) { if (receiver == undefined) {
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
let pass = false; let pass = false;
receiver.on('imageArrival', (err) => { receiver.on("imageArrival", (err) => {
if (err) { if (err) {
console.info('SUB_GRAPHIC_IMAGE_RECEIVER_RECEIVERON_0100 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('SUB_GRAPHIC_IMAGE_RECEIVER_RECEIVERON_0100 on call back IN'); console.info("SUB_GRAPHIC_IMAGE_RECEIVER_RECEIVERON_0100 on call back IN");
} }
}) });
var dummy = receiver.test var dummy = receiver.test;
await sleep(2000) await sleep(2000);
expect(pass).assertTrue(); expect(pass).assertTrue();
done(); done();
} }
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_PROMISE_0200 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_PROMISE_0200
...@@ -858,48 +943,53 @@ describe('ImageReceiver', function () { ...@@ -858,48 +943,53 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_PROMISE_0200', 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, FORMATJPEG, CAPACITY);
if (receiver == undefined) { if (receiver == undefined) {
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
return; return;
} }
receiver.on('imageArrival', () => { receiver.on("imageArrival", () => {
expect(true).assertTrue(); expect(true).assertTrue();
}) });
var dummy = receiver.test var dummy = receiver.test;
receiver.readLatestImage().then(img => { receiver
.readLatestImage()
.then((img) => {
if (img == undefined) { if (img == undefined) {
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
} else { } else {
expect(img.size.width == WIDTH).assertTrue(); expect(img.size.width == WIDTH).assertTrue();
expect(img.size.height == HEIGHT).assertTrue(); expect(img.size.height == HEIGHT).assertTrue();
expect(img.format == 12).assertTrue(); expect(img.format == RGBA).assertTrue();
expect(img.clipRect.size.width == WIDTH).assertTrue(); expect(img.clipRect.size.width == WIDTH).assertTrue();
expect(img.clipRect.size.height == HEIGHT).assertTrue(); expect(img.clipRect.size.height == HEIGHT).assertTrue();
expect(img.clipRect.x == 0).assertTrue(); expect(img.clipRect.x == 0).assertTrue();
expect(img.clipRect.y == 0).assertTrue(); expect(img.clipRect.y == 0).assertTrue();
img.release().then(() => { img.release()
.then(() => {
expect(true).assertTrue(); expect(true).assertTrue();
done()
}).catch(error => {
console.log('SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_PROMISE_0200 err' + error)
expect(false).assertTrue();
done(); done();
}) })
} .catch((error) => {
}).catch(error => { console.log("SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_PROMISE_0200 err" + error);
console.log('SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_PROMISE_0200 readLatestImage err' + error)
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
});
}
}) })
}) .catch((error) => {
console.log("SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_PROMISE_0200 readLatestImage err" + error);
expect(false).assertTrue();
done();
});
});
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_CALLBACK_0200 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_CALLBACK_0200
...@@ -913,30 +1003,30 @@ describe('ImageReceiver', function () { ...@@ -913,30 +1003,30 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_RELEASE_CALLBACK_0200', 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, FORMATJPEG, CAPACITY);
if (receiver == undefined) { if (receiver == undefined) {
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
return; return;
} }
receiver.on('imageArrival', () => { receiver.on("imageArrival", () => {
expect(true).assertTrue(); expect(true).assertTrue();
}) });
var dummy = receiver.test var dummy = receiver.test;
receiver.readLatestImage((err, img) => { receiver.readLatestImage((err, img) => {
if (img == undefined) { if (img == undefined) {
expect(false).assertTrue(); expect(false).assertTrue();
done() done();
return; return;
} }
expect(img.size.width == WIDTH).assertTrue(); expect(img.size.width == WIDTH).assertTrue();
expect(img.size.height == HEIGHT).assertTrue(); expect(img.size.height == HEIGHT).assertTrue();
expect(img.format == 12).assertTrue(); expect(img.format == RGBA).assertTrue();
expect(img.clipRect.size.width == WIDTH).assertTrue(); expect(img.clipRect.size.width == WIDTH).assertTrue();
expect(img.clipRect.size.height == HEIGHT).assertTrue(); expect(img.clipRect.size.height == HEIGHT).assertTrue();
expect(img.clipRect.x == 0).assertTrue(); expect(img.clipRect.x == 0).assertTrue();
...@@ -950,9 +1040,9 @@ describe('ImageReceiver', function () { ...@@ -950,9 +1040,9 @@ describe('ImageReceiver', function () {
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} }
}) });
}) });
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0100 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0100
...@@ -965,9 +1055,9 @@ describe('ImageReceiver', function () { ...@@ -965,9 +1055,9 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0100', 0, async function (done) { it("SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0100", 0, async function (done) {
getComponentCbErr(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0100', null) getComponentCbErr(done, "SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0100", null);
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0200 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0200
...@@ -980,9 +1070,9 @@ describe('ImageReceiver', function () { ...@@ -980,9 +1070,9 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0200', 0, async function (done) { it("SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0200", 0, async function (done) {
getComponentCbErr(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0200', 'ab') getComponentCbErr(done, "SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0200", "ab");
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0300 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0300
...@@ -995,9 +1085,9 @@ describe('ImageReceiver', function () { ...@@ -995,9 +1085,9 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0300', 0, async function (done) { it("SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0300", 0, async function (done) {
getComponentCbErr(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0300', 0.1) getComponentCbErr(done, "SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0300", 0.1);
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0400 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0400
...@@ -1010,9 +1100,9 @@ describe('ImageReceiver', function () { ...@@ -1010,9 +1100,9 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0400', 0, async function (done) { it("SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0400", 0, async function (done) {
getComponentCbErr(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0400', { a: 1 }) getComponentCbErr(done, "SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0400", { a: 1 });
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0500 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0500
...@@ -1025,9 +1115,9 @@ describe('ImageReceiver', function () { ...@@ -1025,9 +1115,9 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0500', 0, async function (done) { it("SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0500", 0, async function (done) {
getComponentProErr(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0500', null) getComponentProErr(done, "SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0500", null);
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0600 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0600
...@@ -1040,9 +1130,9 @@ describe('ImageReceiver', function () { ...@@ -1040,9 +1130,9 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0600', 0, async function (done) { it("SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0600", 0, async function (done) {
getComponentProErr(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0600', 'ab') getComponentProErr(done, "SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0600", "ab");
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0700 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0700
...@@ -1055,9 +1145,9 @@ describe('ImageReceiver', function () { ...@@ -1055,9 +1145,9 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0700', 0, async function (done) { it("SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0700", 0, async function (done) {
getComponentProErr(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0700', 0.1) getComponentProErr(done, "SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0700", 0.1);
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0800 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0800
...@@ -1070,9 +1160,9 @@ describe('ImageReceiver', function () { ...@@ -1070,9 +1160,9 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0800', 0, async function (done) { it("SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0800", 0, async function (done) {
getComponentProErr(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0800', { a: 1 }) getComponentProErr(done, "SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0800", { a: 1 });
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_ERROR_0100 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_ERROR_0100
...@@ -1083,9 +1173,9 @@ describe('ImageReceiver', function () { ...@@ -1083,9 +1173,9 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_ERROR_0100', 0, async function (done) { it("SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_ERROR_0100", 0, async function (done) {
onErr(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_ERROR_0100', 1) onErr(done, "SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_ERROR_0100", 1);
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_ERROR_0200 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_ERROR_0200
...@@ -1096,9 +1186,9 @@ describe('ImageReceiver', function () { ...@@ -1096,9 +1186,9 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_ERROR_0200', 0, async function (done) { it("SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_ERROR_0200", 0, async function (done) {
onErr(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_ERROR_0200', null) onErr(done, "SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_ERROR_0200", null);
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_ERROR_0300 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_ERROR_0300
...@@ -1109,9 +1199,9 @@ describe('ImageReceiver', function () { ...@@ -1109,9 +1199,9 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_ERROR_0300', 0, async function (done) { it("SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_ERROR_0300", 0, async function (done) {
onErr(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_ERROR_0300', { a: 1 }) onErr(done, "SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_ERROR_0300", { a: 1 });
}) });
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_ERROR_0400 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_ERROR_0400
...@@ -1122,8 +1212,8 @@ describe('ImageReceiver', function () { ...@@ -1122,8 +1212,8 @@ describe('ImageReceiver', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_ERROR_0400', 0, async function (done) { it("SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_ERROR_0400", 0, async function (done) {
onErr(done, 'SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_ERROR_0400', 'a') onErr(done, "SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_ERROR_0400", "a");
}) });
}) });
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册