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

!6580 delete yuv testcase -monthly

Merge pull request !6580 from caochuan/cherry-pick-1668761707
...@@ -21,11 +21,9 @@ export default function ImageReceiver() { ...@@ -21,11 +21,9 @@ export default function ImageReceiver() {
const HEIGHT = 8; const HEIGHT = 8;
const CAPACITY = 8; const CAPACITY = 8;
const RGBA = 12; const RGBA = 12;
const YCBCR = 22; const Jpg_Stride = 1;
const Jpg_YStride = 1; const { JPEG: FORMATJPEG } = image.ImageFormat;
const UVStride = 2; const { JPEG } = image.ComponentType;
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");
}); });
...@@ -99,11 +97,7 @@ export default function ImageReceiver() { ...@@ -99,11 +97,7 @@ export default function ImageReceiver() {
}); });
expect(true).assertTrue(); expect(true).assertTrue();
}); });
if (format == FORMATJPEG) {
var dummy = receiver.test; var dummy = receiver.test;
} else {
var dummy = receiver.testYUV;
}
} }
} }
...@@ -145,11 +139,7 @@ export default function ImageReceiver() { ...@@ -145,11 +139,7 @@ export default function ImageReceiver() {
}); });
expect(true).assertTrue(); expect(true).assertTrue();
}); });
if (format == FORMATJPEG) {
var dummy = receiver.test; var dummy = receiver.test;
} else {
var dummy = receiver.testYUV;
}
} }
} }
...@@ -198,11 +188,7 @@ export default function ImageReceiver() { ...@@ -198,11 +188,7 @@ export default function ImageReceiver() {
}); });
expect(true).assertTrue(); expect(true).assertTrue();
}); });
if (format == FORMATJPEG) {
var dummy = receiver.test; var dummy = receiver.test;
} else {
var dummy = receiver.testYUV;
}
} }
async function getComponentCb(done, testNum, format, param, checkFormat, checkStride) { async function getComponentCb(done, testNum, format, param, checkFormat, checkStride) {
...@@ -247,11 +233,7 @@ export default function ImageReceiver() { ...@@ -247,11 +233,7 @@ export default function ImageReceiver() {
}); });
expect(true).assertTrue(); expect(true).assertTrue();
}); });
if (format == FORMATJPEG) {
var dummy = receiver.test; var dummy = receiver.test;
} else {
var dummy = receiver.testYUV;
}
} }
async function onErr(done, testNum, param) { async function onErr(done, testNum, param) {
...@@ -517,31 +499,6 @@ export default function ImageReceiver() { ...@@ -517,31 +499,6 @@ export default function ImageReceiver() {
} }
}); });
/**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0500
* @tc.name : createImageReceiver
* @tc.desc : 1.set width,height,format,capacity
* 2.create ImageReceiver
* 3.return ImageReceiver not empty
* @tc.size : MEDIUM
* @tc.type : Functional
* @tc.level : Level 0
*/
it("SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0500", 0, async function (done) {
var receiver = image.createImageReceiver(WIDTH, HEIGHT, YCBCR_422_SP, CAPACITY);
if (receiver == undefined) {
expect(false).assertTrue();
console.info("SUB_GRAPHIC_IMAGE_RECEIVER_CREATEIMAGERECEIVER_0500 undefined");
done();
} else {
expect(receiver.size.width == WIDTH).assertTrue();
expect(receiver.size.height == HEIGHT).assertTrue();
expect(receiver.capacity == CAPACITY).assertTrue();
expect(receiver.format == YCBCR_422_SP).assertTrue();
done();
}
});
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETRECEIVINGSURFACEID_PROMISE_0100 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETRECEIVINGSURFACEID_PROMISE_0100
* @tc.name : getReceivingSurfaceId-promise * @tc.name : getReceivingSurfaceId-promise
...@@ -810,8 +767,8 @@ export default function ImageReceiver() { ...@@ -810,8 +767,8 @@ export default function ImageReceiver() {
expect(imgformat == RGBA); expect(imgformat == RGBA);
} }
function checkStride(rowStride, pixelStride) { function checkStride(rowStride, pixelStride) {
expect(rowStride == WIDTH / Jpg_YStride); expect(rowStride == WIDTH / Jpg_Stride);
expect(pixelStride == Jpg_YStride); expect(pixelStride == Jpg_Stride);
} }
getComponentPromise( getComponentPromise(
done, done,
...@@ -823,93 +780,6 @@ export default function ImageReceiver() { ...@@ -823,93 +780,6 @@ export default function ImageReceiver() {
); );
}); });
/**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_U_0100
* @tc.name : getComponent-YUV_U
* @tc.desc : 1.create ImageReceiver
* 2.call on
* 3.readLatestImage
* 4.call getComponent
* @tc.size : MEDIUM
* @tc.type : Functional
* @tc.level : Level 0
*/
it("SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_U_0100", 0, async function (done) {
function checkFormat(imgformat) {
expect(imgformat == YCBCR);
}
function checkStride(rowStride, pixelStride) {
expect(rowStride == WIDTH / UVStride);
expect(pixelStride == UVStride);
}
getComponentPromise(
done,
"SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_U_0100",
YCBCR_422_SP,
YUV_U,
checkFormat,
checkStride
);
});
/**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_V_0100
* @tc.name : getComponent-YUV_V
* @tc.desc : 1.create ImageReceiver
* 2.call on
* 3.readLatestImage
* 4.call getComponent
* @tc.size : MEDIUM
* @tc.type : Functional
* @tc.level : Level 0
*/
it("SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_V_0100", 0, async function (done) {
function checkFormat(imgformat) {
expect(imgformat == YCBCR);
}
function checkStride(rowStride, pixelStride) {
expect(rowStride == WIDTH / UVStride);
expect(pixelStride == UVStride);
}
getComponentPromise(
done,
"SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_V_0100",
YCBCR_422_SP,
YUV_V,
checkFormat,
checkStride
);
});
/**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_Y_0100
* @tc.name : getComponent-YUV_Y
* @tc.desc : 1.create ImageReceiver
* 2.call on
* 3.readLatestImage
* 4.call getComponent
* @tc.size : MEDIUM
* @tc.type : Functional
* @tc.level : Level 0
*/
it("SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_Y_0100", 0, async function (done) {
function checkFormat(imgformat) {
expect(imgformat == YCBCR);
}
function checkStride(rowStride, pixelStride) {
expect(rowStride == WIDTH / Jpg_YStride);
expect(pixelStride == Jpg_YStride);
}
getComponentPromise(
done,
"SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_PROMISE_YUV_Y_0100",
YCBCR_422_SP,
YUV_Y,
checkFormat,
checkStride
);
});
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_JPEG_0100 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_JPEG_0100
* @tc.name : getComponent-jpeg * @tc.name : getComponent-jpeg
...@@ -926,8 +796,8 @@ export default function ImageReceiver() { ...@@ -926,8 +796,8 @@ export default function ImageReceiver() {
expect(imgformat == RGBA); expect(imgformat == RGBA);
} }
function checkStride(rowStride, pixelStride) { function checkStride(rowStride, pixelStride) {
expect(rowStride == WIDTH / Jpg_YStride); expect(rowStride == WIDTH / Jpg_Stride);
expect(pixelStride == Jpg_YStride); expect(pixelStride == Jpg_Stride);
} }
getComponentCb( getComponentCb(
done, done,
...@@ -939,93 +809,6 @@ export default function ImageReceiver() { ...@@ -939,93 +809,6 @@ export default function ImageReceiver() {
); );
}); });
/**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_Y_0100
* @tc.name : getComponent-YUV_Y
* @tc.desc : 1.create ImageReceiver
* 2.call on
* 3.readLatestImage
* 4.call getComponent
* @tc.size : MEDIUM
* @tc.type : Functional
* @tc.level : Level 0
*/
it("SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_Y_0100", 0, async function (done) {
function checkFormat(imgformat) {
expect(imgformat == YCBCR);
}
function checkStride(rowStride, pixelStride) {
expect(rowStride == WIDTH / Jpg_YStride);
expect(pixelStride == Jpg_YStride);
}
getComponentCb(
done,
"SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_Y_0100",
YCBCR_422_SP,
YUV_Y,
checkFormat,
checkStride
);
});
/**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_V_0100
* @tc.name : getComponent-YUV_V
* @tc.desc : 1.create ImageReceiver
* 2.call on
* 3.readLatestImage
* 4.call getComponent
* @tc.size : MEDIUM
* @tc.type : Functional
* @tc.level : Level 0
*/
it("SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_V_0100", 0, async function (done) {
function checkFormat(imgformat) {
expect(imgformat == YCBCR);
}
function checkStride(rowStride, pixelStride) {
expect(rowStride == WIDTH / UVStride);
expect(pixelStride == UVStride);
}
getComponentCb(
done,
"SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_V_0100",
YCBCR_422_SP,
YUV_V,
checkFormat,
checkStride
);
});
/**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_U_0100
* @tc.name : getComponent-YUV_U
* @tc.desc : 1.create ImageReceiver
* 2.call on
* 3.readLatestImage
* 4.call getComponent
* @tc.size : MEDIUM
* @tc.type : Functional
* @tc.level : Level 0
*/
it("SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_U_0100", 0, async function (done) {
function checkFormat(imgformat) {
expect(imgformat == YCBCR);
}
function checkStride(rowStride, pixelStride) {
expect(rowStride == WIDTH / UVStride);
expect(pixelStride == UVStride);
}
getComponentCb(
done,
"SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_CALLBACK_YUV_U_0100",
YCBCR_422_SP,
YUV_U,
checkFormat,
checkStride
);
});
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_RECEIVERON_0100 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_RECEIVERON_0100
* @tc.name : on * @tc.name : on
...@@ -1293,51 +1076,6 @@ export default function ImageReceiver() { ...@@ -1293,51 +1076,6 @@ export default function ImageReceiver() {
getComponentProErr(done, "SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0800", FORMATJPEG, { a: 1 }); getComponentProErr(done, "SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0800", FORMATJPEG, { a: 1 });
}); });
/**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0900
* @tc.name : getComponent-wrong format
* @tc.desc : 1.create ImageReceiver
* 2.call on
* 3.readLatestImage
* 4.call getComponent
* @tc.size : MEDIUM
* @tc.type : Functional
* @tc.level : Level 0
*/
it("SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0900", 0, async function (done) {
getComponentCbErr(done, "SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_0900", FORMATJPEG, YUV_U);
});
/**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_1000
* @tc.name : getComponent-wrong format
* @tc.desc : 1.create ImageReceiver
* 2.call on
* 3.readLatestImage
* 4.call getComponent
* @tc.size : MEDIUM
* @tc.type : Functional
* @tc.level : Level 0
*/
it("SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_1000", 0, async function (done) {
getComponentProErr(done, "SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_1000", YCBCR_422_SP, JPEG);
});
/**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_1100
* @tc.name : getComponent-wrong format
* @tc.desc : 1.create ImageReceiver
* 2.call on
* 3.readLatestImage
* 4.call getComponent
* @tc.size : MEDIUM
* @tc.type : Functional
* @tc.level : Level 0
*/
it("SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_1100", 0, async function (done) {
getComponentProErr(done, "SUB_GRAPHIC_IMAGE_RECEIVER_GETCOMPONENT_ERROR_1100", FORMATJPEG, YUV_V);
});
/** /**
* @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_ERROR_0100 * @tc.number : SUB_GRAPHIC_IMAGE_RECEIVER_IMAGERECEIVER_ON_ERROR_0100
* @tc.name : on-1 * @tc.name : on-1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册