提交 70c30bb9 编写于 作者: L lwx1121892

<liuxueqi3@huawei.com>

Signed-off-by: Nlwx1121892 <liuxueqi3@huawei.com>
上级 81f0f3ce
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
import Image_test from './image.test.js' import image from './image.test.js'
export default function testsuite() { export default function testsuite() {
Image_test() image()
} }
...@@ -19,8 +19,8 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from ...@@ -19,8 +19,8 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from
import { testPng, testJpg } from './testImg' import { testPng, testJpg } from './testImg'
import featureAbility from '@ohos.ability.featureAbility' import featureAbility from '@ohos.ability.featureAbility'
export default function Image_test() { export default function image() {
describe('Image_test', function () { describe('image', function () {
let filePath; let filePath;
let fdNumber; let fdNumber;
let globalpixelmap; let globalpixelmap;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
*/ */
import Image_test from './colorspace.test.js' import imageColorSpace from './colorspace.test.js'
export default function testsuite() { export default function testsuite() {
Image_test() imageColorSpace()
} }
...@@ -17,8 +17,8 @@ import image from '@ohos.multimedia.image' ...@@ -17,8 +17,8 @@ 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'
import { iccbuf } from './testImg2' import { iccbuf } from './testImg2'
export default function Image_test() { export default function imageColorSpace() {
describe('Image_test', function () { describe('imageColorSpace', function () {
beforeAll(async function () { beforeAll(async function () {
console.info('beforeAll case'); console.info('beforeAll case');
}) })
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
import Image_test from './image.test.js' import imageDecodeOptions from './image.test.js'
export default function testsuite() { export default function testsuite() {
Image_test() imageDecodeOptions()
} }
...@@ -17,7 +17,7 @@ import image from '@ohos.multimedia.image' ...@@ -17,7 +17,7 @@ import image from '@ohos.multimedia.image'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
import { testPng } from '../../../../../image/src/main/js/test/testImg' import { testPng } from '../../../../../image/src/main/js/test/testImg'
describe('AddImage', function () { describe('addImage', function () {
beforeAll(async function () { beforeAll(async function () {
console.info('beforeAll case'); console.info('beforeAll case');
......
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
import image from '@ohos.multimedia.image' import image from '@ohos.multimedia.image'
import fileio from '@ohos.fileio' import fileio from '@ohos.fileio'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
import { tc_020buf, tc_020_1buf, tc_021buf, tc_021_1buf, tc_022buf } from './testImg' import { tc_020Buf, tc_020_1Buf, tc_021Buf, tc_021_1Buf, tc_022Buf } from './testImg'
import featureAbility from '@ohos.ability.featureAbility' import featureAbility from '@ohos.ability.featureAbility'
describe('Image', function () { describe('imageExif', function () {
let filePath; let filePath;
let fdNumber; let fdNumber;
let globalpixelmap; let globalpixelmap;
...@@ -111,6 +111,7 @@ describe('Image', function () { ...@@ -111,6 +111,7 @@ describe('Image', function () {
done(); done();
}) })
}) })
/** /**
* @tc.number : TC_001-2 * @tc.number : TC_001-2
* @tc.name : createpixelmap-promise (editable: true, pixelFormat: RGB_565, size: { height: 6, width: 8 },bytes = buffer) * @tc.name : createpixelmap-promise (editable: true, pixelFormat: RGB_565, size: { height: 6, width: 8 },bytes = buffer)
...@@ -161,6 +162,7 @@ describe('Image', function () { ...@@ -161,6 +162,7 @@ describe('Image', function () {
}) })
}) })
/** /**
* @tc.number : TC_001-4 * @tc.number : TC_001-4
* @tc.name : createpixelmap-promise(editable: true, pixelFormat: unkonwn, size: { height: 6, width: 8 }) * @tc.name : createpixelmap-promise(editable: true, pixelFormat: unkonwn, size: { height: 6, width: 8 })
...@@ -210,6 +212,7 @@ describe('Image', function () { ...@@ -210,6 +212,7 @@ describe('Image', function () {
done(); done();
}) })
}) })
/** /**
* @tc.number : TC_001-6 * @tc.number : TC_001-6
* @tc.name : create pixelmap-callback(editable: true, pixelFormat: RGBA_8888, size: { height: 6, width: 8 } bytes > buffer ) * @tc.name : create pixelmap-callback(editable: true, pixelFormat: RGBA_8888, size: { height: 6, width: 8 } bytes > buffer )
...@@ -331,7 +334,7 @@ describe('Image', function () { ...@@ -331,7 +334,7 @@ describe('Image', function () {
var bufferArr2 = new Uint8Array(readBuffer); var bufferArr2 = new Uint8Array(readBuffer);
var res = true; var res = true;
for (var i = 0; i < bufferArr2.length; i++) { for (var i = 0; i < bufferArr2.length; i++) {
if (bufferArr2[i] != tc_020buf[i]) { if (bufferArr2[i] != tc_020Buf[i]) {
res = false; res = false;
console.info('TC_20_buffer' + bufferArr2[i]); console.info('TC_20_buffer' + bufferArr2[i]);
console.info('TC_020 failed'); console.info('TC_020 failed');
...@@ -389,7 +392,7 @@ describe('Image', function () { ...@@ -389,7 +392,7 @@ describe('Image', function () {
var bufferArr = new Uint8Array(readBuffer); var bufferArr = new Uint8Array(readBuffer);
var res = true; var res = true;
for (var i = 0; i < bufferArr.length; i++) { for (var i = 0; i < bufferArr.length; i++) {
if (bufferArr[i] != tc_020_1buf[i]) { if (bufferArr[i] != tc_020_1Buf[i]) {
res = false; res = false;
console.info('TC_020-1 failed'); console.info('TC_020-1 failed');
expect(false).assertTrue(); expect(false).assertTrue();
...@@ -493,7 +496,7 @@ describe('Image', function () { ...@@ -493,7 +496,7 @@ describe('Image', function () {
var bufferArr2 = new Uint8Array(area.pixels); var bufferArr2 = new Uint8Array(area.pixels);
var res = true; var res = true;
for (var i = 0; i < bufferArr2.length; i++) { for (var i = 0; i < bufferArr2.length; i++) {
if (bufferArr2[i] != tc_021buf[i]) { if (bufferArr2[i] != tc_021Buf[i]) {
res = false; res = false;
console.info('TC_021 failed'); console.info('TC_021 failed');
expect(false).assertTrue(); expect(false).assertTrue();
...@@ -551,7 +554,7 @@ describe('Image', function () { ...@@ -551,7 +554,7 @@ describe('Image', function () {
var res = true; var res = true;
for (var i = 0; i < bufferArr.length; i++) { for (var i = 0; i < bufferArr.length; i++) {
console.info('TC_021-1 buffer ' + bufferArr[i]); console.info('TC_021-1 buffer ' + bufferArr[i]);
if (bufferArr[i] != tc_021_1buf[i]) { if (bufferArr[i] != tc_021_1Buf[i]) {
res = false; res = false;
console.info('TC_021-1 failed'); console.info('TC_021-1 failed');
expect(false).assertTrue(); expect(false).assertTrue();
...@@ -788,7 +791,7 @@ describe('Image', function () { ...@@ -788,7 +791,7 @@ describe('Image', function () {
var readArr = new Uint8Array(readArea.pixels); var readArr = new Uint8Array(readArea.pixels);
var res = true; var res = true;
for (var i = 0; i < readArr.length; i++) { for (var i = 0; i < readArr.length; i++) {
if (readArr[i] != tc_022buf[i]) { if (readArr[i] != tc_022Buf[i]) {
res = false; res = false;
console.info('TC_022 failed'); console.info('TC_022 failed');
expect(false).assertTrue(); expect(false).assertTrue();
...@@ -853,7 +856,7 @@ describe('Image', function () { ...@@ -853,7 +856,7 @@ describe('Image', function () {
var readArr = new Uint8Array(readArea.pixels); var readArr = new Uint8Array(readArea.pixels);
var res = true; var res = true;
for (var i = 0; i < readArr.length; i++) { for (var i = 0; i < readArr.length; i++) {
if (readArr[i] != tc_022buf[i]) { if (readArr[i] != tc_022Buf[i]) {
res = false; res = false;
console.info('TC_022-1 failed'); console.info('TC_022-1 failed');
expect(false).assertTrue(); expect(false).assertTrue();
......
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
* limitations under the License. * limitations under the License.
*/ */
let tc_020buf = new Uint8Array([0,0,0,4,0,0,0,8,1,0,0,12,1,1,1,16,1,1,1,20,2,2,2,24,3,3,3,28,4,4,4,32,5,5,5,36,6,6,6,40,7,7,7,44,9,9,8,48,10,10,10,52,12,12,12,56,14,14,13,60,16,16,15,64,18,18,17,68,20,20,19,72,22,22,22,76,25,24,24,80,27,27,27,84,30,30,29,88,33,32,32,92,36,35,35,96]) let tc_020Buf = new Uint8Array([0,0,0,4,0,0,0,8,1,0,0,12,1,1,1,16,1,1,1,20,2,2,2,24,3,3,3,28,4,4,4,32,5,5,5,36,6,6,6,40,7,7,7,44,9,9,8,48,10,10,10,52,12,12,12,56,14,14,13,60,16,16,15,64,18,18,17,68,20,20,19,72,22,22,22,76,25,24,24,80,27,27,27,84,30,30,29,88,33,32,32,92,36,35,35,96])
let tc_020_1buf = new Uint8Array([0,0,0,4,0,0,0,8,1,0,0,12,1,1,1,16,1,1,1,20,2,2,2,24,3,3,3,28,4,4,4,32,5,5,5,36,6,6,6,40,7,7,7,44,9,9,8,48,10,10,10,52,12,12,12,56,14,14,13,60,16,16,15,64,18,18,17,68,20,20,19,72,22,22,22,76,25,24,24,80,27,27,27,84,30,30,29,88,33,32,32,92,36,35,35,96]) let tc_020_1Buf = new Uint8Array([0,0,0,4,0,0,0,8,1,0,0,12,1,1,1,16,1,1,1,20,2,2,2,24,3,3,3,28,4,4,4,32,5,5,5,36,6,6,6,40,7,7,7,44,9,9,8,48,10,10,10,52,12,12,12,56,14,14,13,60,16,16,15,64,18,18,17,68,20,20,19,72,22,22,22,76,25,24,24,80,27,27,27,84,30,30,29,88,33,32,32,92,36,35,35,96])
let tc_021buf = new Uint8Array([0,0,0,4,0,0,0,8]) let tc_021Buf = new Uint8Array([0,0,0,4,0,0,0,8])
let tc_021_1buf = new Uint8Array([0,0,0,4,0,0,0,8]) let tc_021_1Buf = new Uint8Array([0,0,0,4,0,0,0,8])
let tc_022buf = new Uint8Array([0,0,0,4,0,0,0,8]) let tc_022Buf = new Uint8Array([0,0,0,4,0,0,0,8])
export {tc_020buf, tc_020_1buf, tc_021buf, tc_021_1buf, tc_022buf} export {tc_020Buf, tc_020_1Buf, tc_021Buf, tc_021_1Buf, tc_022Buf}
\ No newline at end of file \ No newline at end of file
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* 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 './modify.test.js' import imageModifyProperty from './modify.test.js'
export default function testsuite() { export default function testsuite() {
Image() imageModifyProperty()
} }
...@@ -19,8 +19,8 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from ...@@ -19,8 +19,8 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from
import {modifyBuf} from './modifyBuffer' import {modifyBuf} from './modifyBuffer'
import featureAbility from '@ohos.ability.featureAbility' import featureAbility from '@ohos.ability.featureAbility'
export default function Image() { export default function imageModifyProperty() {
describe('Image', function () { describe('imageModifyProperty', function () {
let filePath; let filePath;
let fdNumber; let fdNumber;
async function getFd(fileName) { async function getFd(fileName) {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
import Image_test from './packing.test.js' import imagePacking from './packing.test.js'
export default function testsuite() { export default function testsuite() {
Image_test() imagePacking()
} }
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
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 Image_test() { export default function imagePacking() {
describe('Image_test', function () { describe('imagePacking', function () {
beforeAll(async function () { beforeAll(async function () {
console.info('beforeAll case'); console.info('beforeAll case');
...@@ -35,7 +35,7 @@ describe('Image_test', function () { ...@@ -35,7 +35,7 @@ describe('Image_test', function () {
console.info('afterAll case'); console.info('afterAll case');
}) })
function packing_promise(done, testNum, pixFormat, arg) { function packing_Promise(done, testNum, pixFormat, arg) {
let opts; let opts;
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
if (pixFormat == 2) { if (pixFormat == 2) {
...@@ -81,7 +81,7 @@ describe('Image_test', function () { ...@@ -81,7 +81,7 @@ describe('Image_test', function () {
}) })
} }
function packing_cb(done, testNum, pixFormat, arg) { function packing_Cb(done, testNum, pixFormat, arg) {
let opts; let opts;
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
if (pixFormat == 2) { if (pixFormat == 2) {
...@@ -127,7 +127,7 @@ describe('Image_test', function () { ...@@ -127,7 +127,7 @@ describe('Image_test', function () {
}) })
} }
function packing_cb_fail(done, testNum, pixFormat, arg) { function packing_Cb_Fail(done, testNum, pixFormat, arg) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
if (pixFormat == 2) { if (pixFormat == 2) {
var opts = { editable: true, pixelFormat: 2, size: { height: 4, width: 6 } } var opts = { editable: true, pixelFormat: 2, size: { height: 4, width: 6 } }
...@@ -160,7 +160,7 @@ describe('Image_test', function () { ...@@ -160,7 +160,7 @@ describe('Image_test', function () {
}) })
} }
function packing_promise_fail(done, testNum, pixFormat, arg) { function packing_Promise_Fail(done, testNum, pixFormat, arg) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
if (pixFormat == 2) { if (pixFormat == 2) {
var opts = { editable: true, pixelFormat: 2, size: { height: 4, width: 6 } } var opts = { editable: true, pixelFormat: 2, size: { height: 4, width: 6 } }
...@@ -209,7 +209,7 @@ describe('Image_test', function () { ...@@ -209,7 +209,7 @@ describe('Image_test', function () {
*/ */
it('SUB_IMAGE_packing_P_001', 0, async function (done) { it('SUB_IMAGE_packing_P_001', 0, async function (done) {
let packOpts = { format: "image/jpeg", quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
packing_promise(done, 'SUB_IMAGE_packing_P_001', 2, packOpts) packing_Promise(done, 'SUB_IMAGE_packing_P_001', 2, packOpts)
}) })
/** /**
...@@ -224,7 +224,7 @@ describe('Image_test', function () { ...@@ -224,7 +224,7 @@ describe('Image_test', function () {
*/ */
it('SUB_IMAGE_packing_P_002', 0, async function (done) { it('SUB_IMAGE_packing_P_002', 0, async function (done) {
let packOpts = { format: "image/jpeg", quality: 123 } let packOpts = { format: "image/jpeg", quality: 123 }
packing_promise_fail(done, 'SUB_IMAGE_packing_P_002', 2, packOpts) packing_Promise_Fail(done, 'SUB_IMAGE_packing_P_002', 2, packOpts)
}) })
/** /**
...@@ -239,7 +239,7 @@ describe('Image_test', function () { ...@@ -239,7 +239,7 @@ describe('Image_test', function () {
*/ */
it('SUB_IMAGE_packing_P_003', 0, async function (done) { it('SUB_IMAGE_packing_P_003', 0, async function (done) {
let packOpts = { format: "image/jpeg" } let packOpts = { format: "image/jpeg" }
packing_promise_fail(done, 'SUB_IMAGE_packing_P_003', 2, packOpts) packing_Promise_Fail(done, 'SUB_IMAGE_packing_P_003', 2, packOpts)
}) })
/** /**
...@@ -254,7 +254,7 @@ describe('Image_test', function () { ...@@ -254,7 +254,7 @@ describe('Image_test', function () {
*/ */
it('SUB_IMAGE_packing_P_004', 0, async function (done) { it('SUB_IMAGE_packing_P_004', 0, async function (done) {
let packOpts = { quality: 99 } let packOpts = { quality: 99 }
packing_promise_fail(done, 'SUB_IMAGE_packing_P_004', 2, packOpts) packing_Promise_Fail(done, 'SUB_IMAGE_packing_P_004', 2, packOpts)
}) })
/** /**
...@@ -269,7 +269,7 @@ describe('Image_test', function () { ...@@ -269,7 +269,7 @@ describe('Image_test', function () {
*/ */
it('SUB_IMAGE_packing_P_005', 0, async function (done) { it('SUB_IMAGE_packing_P_005', 0, async function (done) {
let packOpts = { format: "image/png", quality: 99 } let packOpts = { format: "image/png", quality: 99 }
packing_promise_fail(done, 'SUB_IMAGE_packing_P_005', 2, packOpts) packing_Promise_Fail(done, 'SUB_IMAGE_packing_P_005', 2, packOpts)
}) })
/** /**
...@@ -284,7 +284,7 @@ describe('Image_test', function () { ...@@ -284,7 +284,7 @@ describe('Image_test', function () {
*/ */
it('SUB_IMAGE_packing_P_006', 0, async function (done) { it('SUB_IMAGE_packing_P_006', 0, async function (done) {
let packOpts = { format: "image/jpeg", quality: 50 } let packOpts = { format: "image/jpeg", quality: 50 }
packing_promise(done, 'SUB_IMAGE_packing_P_006', 5, packOpts) packing_Promise(done, 'SUB_IMAGE_packing_P_006', 5, packOpts)
}) })
/** /**
...@@ -299,7 +299,7 @@ describe('Image_test', function () { ...@@ -299,7 +299,7 @@ describe('Image_test', function () {
*/ */
it('SUB_IMAGE_packing_P_007', 0, async function (done) { it('SUB_IMAGE_packing_P_007', 0, async function (done) {
let packOpts = { format: "image/jpeg", quality: 123 } let packOpts = { format: "image/jpeg", quality: 123 }
packing_promise_fail(done, 'SUB_IMAGE_packing_P_007', 5, packOpts) packing_Promise_Fail(done, 'SUB_IMAGE_packing_P_007', 5, packOpts)
}) })
/** /**
...@@ -314,7 +314,7 @@ describe('Image_test', function () { ...@@ -314,7 +314,7 @@ describe('Image_test', function () {
*/ */
it('SUB_IMAGE_packing_P_008', 0, async function (done) { it('SUB_IMAGE_packing_P_008', 0, async function (done) {
let packOpts = { format: "image/jpeg" } let packOpts = { format: "image/jpeg" }
packing_promise_fail(done, 'SUB_IMAGE_packing_P_008', 5, packOpts) packing_Promise_Fail(done, 'SUB_IMAGE_packing_P_008', 5, packOpts)
}) })
/** /**
...@@ -329,7 +329,7 @@ describe('Image_test', function () { ...@@ -329,7 +329,7 @@ describe('Image_test', function () {
*/ */
it('SUB_IMAGE_packing_P_009', 0, async function (done) { it('SUB_IMAGE_packing_P_009', 0, async function (done) {
let packOpts = { quality: 99 } let packOpts = { quality: 99 }
packing_promise_fail(done, 'SUB_IMAGE_packing_P_009', 5, packOpts) packing_Promise_Fail(done, 'SUB_IMAGE_packing_P_009', 5, packOpts)
}) })
/** /**
...@@ -344,12 +344,12 @@ describe('Image_test', function () { ...@@ -344,12 +344,12 @@ describe('Image_test', function () {
*/ */
it('SUB_IMAGE_packing_P_010', 0, async function (done) { it('SUB_IMAGE_packing_P_010', 0, async function (done) {
let packOpts = { format: "image/png", quality: 99 } let packOpts = { format: "image/png", quality: 99 }
packing_promise_fail(done, 'SUB_IMAGE_packing_P_010', 5, packOpts) packing_Promise_Fail(done, 'SUB_IMAGE_packing_P_010', 5, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packing_CB_001 * @tc.number : SUB_IMAGE_packing_Cb_001
* @tc.name : SUB_IMAGE_packing_CB_001 * @tc.name : SUB_IMAGE_packing_Cb_001
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
* 3.call packing * 3.call packing
...@@ -357,14 +357,14 @@ describe('Image_test', function () { ...@@ -357,14 +357,14 @@ describe('Image_test', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_CB_001', 0, async function (done) { it('SUB_IMAGE_packing_Cb_001', 0, async function (done) {
let packOpts = { format: "image/jpeg", quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
packing_cb(done, 'SUB_IMAGE_packing_CB_001', 2, packOpts) packing_Cb(done, 'SUB_IMAGE_packing_Cb_001', 2, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packing_CB_002 * @tc.number : SUB_IMAGE_packing_Cb_002
* @tc.name : SUB_IMAGE_packing_CB_002 - callback - RGB565 quality 123 * @tc.name : SUB_IMAGE_packing_Cb_002 - callback - RGB565 quality 123
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
* 3.call packing * 3.call packing
...@@ -372,15 +372,15 @@ describe('Image_test', function () { ...@@ -372,15 +372,15 @@ describe('Image_test', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_CB_002', 0, async function (done) { it('SUB_IMAGE_packing_Cb_002', 0, async function (done) {
let packOpts = { format: "image/jpeg", quality: 123 } let packOpts = { format: "image/jpeg", quality: 123 }
packing_cb_fail(done, 'SUB_IMAGE_packing_CB_002', 2, packOpts) packing_Cb_Fail(done, 'SUB_IMAGE_packing_Cb_002', 2, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packing_CB_003 * @tc.number : SUB_IMAGE_packing_Cb_003
* @tc.name : SUB_IMAGE_packing_CB_003 - callback - RGB565 quality null * @tc.name : SUB_IMAGE_packing_Cb_003 - callback - RGB565 quality null
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
* 3.call packing * 3.call packing
...@@ -388,14 +388,14 @@ describe('Image_test', function () { ...@@ -388,14 +388,14 @@ describe('Image_test', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_CB_003', 0, async function (done) { it('SUB_IMAGE_packing_Cb_003', 0, async function (done) {
let packOpts = { format: "image/jpeg" } let packOpts = { format: "image/jpeg" }
packing_cb_fail(done, 'SUB_IMAGE_packing_CB_003', 2, packOpts) packing_Cb_Fail(done, 'SUB_IMAGE_packing_Cb_003', 2, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packing_CB_004 * @tc.number : SUB_IMAGE_packing_Cb_004
* @tc.name : SUB_IMAGE_packing_CB_004 - callback - RGB565 format null * @tc.name : SUB_IMAGE_packing_Cb_004 - callback - RGB565 format null
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
* 3.call packing * 3.call packing
...@@ -403,14 +403,14 @@ describe('Image_test', function () { ...@@ -403,14 +403,14 @@ describe('Image_test', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_CB_004', 0, async function (done) { it('SUB_IMAGE_packing_Cb_004', 0, async function (done) {
let packOpts = { quality: 99 } let packOpts = { quality: 99 }
packing_cb_fail(done, 'SUB_IMAGE_packing_CB_004', 2, packOpts) packing_Cb_Fail(done, 'SUB_IMAGE_packing_Cb_004', 2, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packing_CB_005 * @tc.number : SUB_IMAGE_packing_Cb_005
* @tc.name : SUB_IMAGE_packing_CB_005 - callback - RGB565 wrong format * @tc.name : SUB_IMAGE_packing_Cb_005 - callback - RGB565 wrong format
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
* 3.call packing * 3.call packing
...@@ -418,14 +418,14 @@ describe('Image_test', function () { ...@@ -418,14 +418,14 @@ describe('Image_test', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_CB_005', 0, async function (done) { it('SUB_IMAGE_packing_Cb_005', 0, async function (done) {
let packOpts = { format: "image/png", quality: 99 } let packOpts = { format: "image/png", quality: 99 }
packing_cb_fail(done, 'SUB_IMAGE_packing_CB_005', 2, packOpts) packing_Cb_Fail(done, 'SUB_IMAGE_packing_Cb_005', 2, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packing_CB_006 * @tc.number : SUB_IMAGE_packing_Cb_006
* @tc.name : SUB_IMAGE_packing_CB_006 * @tc.name : SUB_IMAGE_packing_Cb_006
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
* 3.call packing * 3.call packing
...@@ -433,14 +433,14 @@ describe('Image_test', function () { ...@@ -433,14 +433,14 @@ describe('Image_test', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_CB_006', 0, async function (done) { it('SUB_IMAGE_packing_Cb_006', 0, async function (done) {
let packOpts = { format: "image/jpeg", quality: 50 } let packOpts = { format: "image/jpeg", quality: 50 }
packing_cb(done, 'SUB_IMAGE_packing_CB_006', 5, packOpts) packing_Cb(done, 'SUB_IMAGE_packing_Cb_006', 5, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packing_CB_007 * @tc.number : SUB_IMAGE_packing_Cb_007
* @tc.name : SUB_IMAGE_packing_CB_007 - callback - RGB888 quality 123 * @tc.name : SUB_IMAGE_packing_Cb_007 - callback - RGB888 quality 123
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
* 3.call packing * 3.call packing
...@@ -448,15 +448,15 @@ describe('Image_test', function () { ...@@ -448,15 +448,15 @@ describe('Image_test', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_CB_007', 0, async function (done) { it('SUB_IMAGE_packing_Cb_007', 0, async function (done) {
let packOpts = { format: "image/jpeg", quality: 123 } let packOpts = { format: "image/jpeg", quality: 123 }
packing_cb_fail(done, 'SUB_IMAGE_packing_CB_007', 5, packOpts) packing_Cb_Fail(done, 'SUB_IMAGE_packing_Cb_007', 5, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packing_CB_008 * @tc.number : SUB_IMAGE_packing_Cb_008
* @tc.name : SUB_IMAGE_packing_CB_008 - callback - RGB888 quality null * @tc.name : SUB_IMAGE_packing_Cb_008 - callback - RGB888 quality null
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
* 3.call packing * 3.call packing
...@@ -464,14 +464,14 @@ describe('Image_test', function () { ...@@ -464,14 +464,14 @@ describe('Image_test', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_CB_008', 0, async function (done) { it('SUB_IMAGE_packing_Cb_008', 0, async function (done) {
let packOpts = { format: "image/jpeg" } let packOpts = { format: "image/jpeg" }
packing_cb_fail(done, 'SUB_IMAGE_packing_CB_008', 5, packOpts) packing_Cb_Fail(done, 'SUB_IMAGE_packing_Cb_008', 5, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packing_CB_009 * @tc.number : SUB_IMAGE_packing_Cb_009
* @tc.name : SUB_IMAGE_packing_CB_009 - callback - RGB888 format null * @tc.name : SUB_IMAGE_packing_Cb_009 - callback - RGB888 format null
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
* 3.call packing * 3.call packing
...@@ -479,14 +479,14 @@ describe('Image_test', function () { ...@@ -479,14 +479,14 @@ describe('Image_test', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_CB_009', 0, async function (done) { it('SUB_IMAGE_packing_Cb_009', 0, async function (done) {
let packOpts = { quality: 99 } let packOpts = { quality: 99 }
packing_cb_fail(done, 'SUB_IMAGE_packing_CB_009', 5, packOpts) packing_Cb_Fail(done, 'SUB_IMAGE_packing_Cb_009', 5, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packing_CB_010 * @tc.number : SUB_IMAGE_packing_Cb_010
* @tc.name : SUB_IMAGE_packing_CB_010 - callback - RGB888 wrong format * @tc.name : SUB_IMAGE_packing_Cb_010 - callback - RGB888 wrong format
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
* 3.call packing * 3.call packing
...@@ -494,9 +494,9 @@ describe('Image_test', function () { ...@@ -494,9 +494,9 @@ describe('Image_test', function () {
* @tc.type : Functional * @tc.type : Functional
* @tc.level : level 0 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_CB_010', 0, async function (done) { it('SUB_IMAGE_packing_Cb_010', 0, async function (done) {
let packOpts = { format: "image/png", quality: 99 } let packOpts = { format: "image/png", quality: 99 }
packing_cb_fail(done, 'SUB_IMAGE_packing_CB_010', 5, packOpts) packing_Cb_Fail(done, 'SUB_IMAGE_packing_Cb_010', 5, packOpts)
}) })
})} })}
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
*/ */
import Image_test from './framework.test.js' import imagePixelMapFramework from './framework.test.js'
export default function testsuite() { export default function testsuite() {
Image_test() imagePixelMapFramework()
} }
...@@ -17,8 +17,8 @@ import image from '@ohos.multimedia.image' ...@@ -17,8 +17,8 @@ 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'
import { base64Image, scale2x1, translate3x1, rotate90, flipH, testBmp, testGif, crop3x3, scale1x4, setAlpha8, translate1x3 } from './testImg2' import { base64Image, scale2x1, translate3x1, rotate90, flipH, testBmp, testGif, crop3x3, scale1x4, setAlpha8, translate1x3 } from './testImg2'
import { testPng, testJpg} from '../../../../../image/src/main/js/test/testImg' import { testPng, testJpg} from '../../../../../image/src/main/js/test/testImg'
export default function Image_test() { export default function imagePixelMapFramework() {
describe('Image_test', function () { describe('imagePixelMapFramework', function () {
beforeAll(async function () { beforeAll(async function () {
console.info('beforeAll case'); console.info('beforeAll case');
}) })
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
import Image_test from './webp.test.js' import imageWebp from './webp.test.js'
export default function testsuite() { export default function testsuite() {
Image_test() imageWebp()
} }
...@@ -18,8 +18,8 @@ import fileio from '@ohos.fileio' ...@@ -18,8 +18,8 @@ import fileio from '@ohos.fileio'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
import featureAbility from '@ohos.ability.featureAbility' import featureAbility from '@ohos.ability.featureAbility'
export default function Image() { export default function imageWebp() {
describe('Image', function () { describe('imageWebp', function () {
let filePath; let filePath;
let fdNumber; let fdNumber;
async function getFd(fileName) { async function getFd(fileName) {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
import Image from './yuv.test.js' import imageYuv from './yuv.test.js'
export default function testsuite() { export default function testsuite() {
Image() imageYuv()
} }
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
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 Image() { export default function imageYuv() {
describe('Image', function () { describe('imageYuv', function () {
beforeAll(async function () { beforeAll(async function () {
console.info('beforeAll case'); console.info('beforeAll case');
...@@ -98,7 +98,7 @@ describe('Image', function () { ...@@ -98,7 +98,7 @@ describe('Image', function () {
} }
} }
async function yuvToJpegByPixelMapPromise_fail(done, testNum, sourceOptions, yuvData) { async function yuvToJpegByPixelMapPromise_Fail(done, testNum, sourceOptions, yuvData) {
try { try {
let imageSource = image.createImageSource(yuvData, sourceOptions) let imageSource = image.createImageSource(yuvData, sourceOptions)
if (imageSource == undefined) { if (imageSource == undefined) {
...@@ -161,7 +161,7 @@ describe('Image', function () { ...@@ -161,7 +161,7 @@ describe('Image', function () {
} }
} }
async function yuvToJpegByPixelMapCallback_fail(done, testNum, sourceOptions, yuvData) { async function yuvToJpegByPixelMapCallback_Fail(done, testNum, sourceOptions, yuvData) {
try { try {
let imageSource = image.createImageSource(yuvData, sourceOptions); let imageSource = image.createImageSource(yuvData, sourceOptions);
if (imageSource == undefined) { if (imageSource == undefined) {
...@@ -224,7 +224,7 @@ describe('Image', function () { ...@@ -224,7 +224,7 @@ describe('Image', function () {
} }
} }
async function yuvToJpegByImageSourcePromise_fail(done, testNum, sourceOptions, arg, yuvData) { async function yuvToJpegByImageSourcePromise_Fail(done, testNum, sourceOptions, arg, yuvData) {
let imageSource = image.createImageSource(yuvData, sourceOptions); let imageSource = image.createImageSource(yuvData, sourceOptions);
if (imageSource == undefined) { if (imageSource == undefined) {
console.info(`${testNum} create ImageSource failed`); console.info(`${testNum} create ImageSource failed`);
...@@ -286,7 +286,7 @@ describe('Image', function () { ...@@ -286,7 +286,7 @@ describe('Image', function () {
} }
} }
async function yuvToJpegByImageSourceCallback_fail(done, testNum, sourceOptions, arg, yuvData) { async function yuvToJpegByImageSourceCallback_Fail(done, testNum, sourceOptions, arg, yuvData) {
let imageSource = image.createImageSource(yuvData, sourceOptions); let imageSource = image.createImageSource(yuvData, sourceOptions);
if (imageSource == undefined) { if (imageSource == undefined) {
console.info(`${testNum} create ImageSource failed`); console.info(`${testNum} create ImageSource failed`);
...@@ -364,7 +364,7 @@ describe('Image', function () { ...@@ -364,7 +364,7 @@ describe('Image', function () {
it('SUB_IMAGE_yuv_pixelmap_P_004', 0, async function (done) { it('SUB_IMAGE_yuv_pixelmap_P_004', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 5 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 5 } };
yuvToJpegByPixelMapPromise_fail(done, 'SUB_IMAGE_yuv_pixelmap_P_004', sourceOptions, yuvData) yuvToJpegByPixelMapPromise_Fail(done, 'SUB_IMAGE_yuv_pixelmap_P_004', sourceOptions, yuvData)
}) })
/** /**
...@@ -394,7 +394,7 @@ describe('Image', function () { ...@@ -394,7 +394,7 @@ describe('Image', function () {
it('SUB_IMAGE_yuv_pixelmap_P_006', 0, async function (done) { it('SUB_IMAGE_yuv_pixelmap_P_006', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 5 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 5 } };
yuvToJpegByPixelMapPromise_fail(done, 'SUB_IMAGE_yuv_pixelmap_P_006', sourceOptions, yuvData) yuvToJpegByPixelMapPromise_Fail(done, 'SUB_IMAGE_yuv_pixelmap_P_006', sourceOptions, yuvData)
}) })
/** /**
...@@ -409,7 +409,7 @@ describe('Image', function () { ...@@ -409,7 +409,7 @@ describe('Image', function () {
it('SUB_IMAGE_yuv_pixelmap_P_007', 0, async function (done) { it('SUB_IMAGE_yuv_pixelmap_P_007', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 10, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 10, sourceSize: { height: 4, width: 6 } };
yuvToJpegByPixelMapPromise_fail(done, 'SUB_IMAGE_yuv_pixelmap_P_007', sourceOptions, yuvData) yuvToJpegByPixelMapPromise_Fail(done, 'SUB_IMAGE_yuv_pixelmap_P_007', sourceOptions, yuvData)
}) })
/** /**
...@@ -424,7 +424,7 @@ describe('Image', function () { ...@@ -424,7 +424,7 @@ describe('Image', function () {
it('SUB_IMAGE_yuv_pixelmap_P_008', 0, async function (done) { it('SUB_IMAGE_yuv_pixelmap_P_008', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourceSize: { height: 4, width: 6 } };
yuvToJpegByPixelMapPromise_fail(done, 'SUB_IMAGE_yuv_pixelmap_P_008', sourceOptions, yuvData) yuvToJpegByPixelMapPromise_Fail(done, 'SUB_IMAGE_yuv_pixelmap_P_008', sourceOptions, yuvData)
}) })
/** /**
...@@ -496,7 +496,7 @@ describe('Image', function () { ...@@ -496,7 +496,7 @@ describe('Image', function () {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 5 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 5 } };
let packOpts = { format: "image/jpeg", quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
yuvToJpegByImageSourcePromise_fail(done, 'SUB_IMAGE_yuv_imagesource_P_004', sourceOptions, packOpts, yuvData) yuvToJpegByImageSourcePromise_Fail(done, 'SUB_IMAGE_yuv_imagesource_P_004', sourceOptions, packOpts, yuvData)
}) })
/** /**
...@@ -532,7 +532,7 @@ describe('Image', function () { ...@@ -532,7 +532,7 @@ describe('Image', function () {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 5 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 5 } };
let packOpts = { format: "image/jpeg", quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
yuvToJpegByImageSourcePromise_fail(done, 'SUB_IMAGE_yuv_imagesource_P_006', sourceOptions, packOpts, yuvData) yuvToJpegByImageSourcePromise_Fail(done, 'SUB_IMAGE_yuv_imagesource_P_006', sourceOptions, packOpts, yuvData)
}) })
/** /**
...@@ -550,7 +550,7 @@ describe('Image', function () { ...@@ -550,7 +550,7 @@ describe('Image', function () {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 10, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 10, sourceSize: { height: 4, width: 6 } };
let packOpts = { format: "image/jpeg", quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
yuvToJpegByImageSourcePromise_fail(done, 'SUB_IMAGE_yuv_imagesource_P_007', sourceOptions, packOpts, yuvData) yuvToJpegByImageSourcePromise_Fail(done, 'SUB_IMAGE_yuv_imagesource_P_007', sourceOptions, packOpts, yuvData)
}) })
/** /**
...@@ -568,7 +568,7 @@ describe('Image', function () { ...@@ -568,7 +568,7 @@ describe('Image', function () {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourceSize: { height: 4, width: 6 } };
let packOpts = { format: "image/jpeg", quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
yuvToJpegByImageSourcePromise_fail(done, 'SUB_IMAGE_yuv_imagesource_P_008', sourceOptions, packOpts, yuvData) yuvToJpegByImageSourcePromise_Fail(done, 'SUB_IMAGE_yuv_imagesource_P_008', sourceOptions, packOpts, yuvData)
}) })
/** /**
...@@ -628,7 +628,7 @@ describe('Image', function () { ...@@ -628,7 +628,7 @@ describe('Image', function () {
it('SUB_IMAGE_yuv_pixelmap_CB_004', 0, async function (done) { it('SUB_IMAGE_yuv_pixelmap_CB_004', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 5 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 5 } };
yuvToJpegByPixelMapCallback_fail(done, 'SUB_IMAGE_yuv_pixelmap_CB_004', sourceOptions, yuvData) yuvToJpegByPixelMapCallback_Fail(done, 'SUB_IMAGE_yuv_pixelmap_CB_004', sourceOptions, yuvData)
}) })
/** /**
...@@ -658,7 +658,7 @@ describe('Image', function () { ...@@ -658,7 +658,7 @@ describe('Image', function () {
it('SUB_IMAGE_yuv_pixelmap_CB_006', 0, async function (done) { it('SUB_IMAGE_yuv_pixelmap_CB_006', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 5 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 5 } };
yuvToJpegByPixelMapCallback_fail(done, 'SUB_IMAGE_yuv_pixelmap_CB_006', sourceOptions, yuvData) yuvToJpegByPixelMapCallback_Fail(done, 'SUB_IMAGE_yuv_pixelmap_CB_006', sourceOptions, yuvData)
}) })
/** /**
...@@ -673,7 +673,7 @@ describe('Image', function () { ...@@ -673,7 +673,7 @@ describe('Image', function () {
it('SUB_IMAGE_yuv_pixelmap_CB_007', 0, async function (done) { it('SUB_IMAGE_yuv_pixelmap_CB_007', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 10, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 10, sourceSize: { height: 4, width: 6 } };
yuvToJpegByPixelMapCallback_fail(done, 'SUB_IMAGE_yuv_pixelmap_CB_007', sourceOptions, yuvData) yuvToJpegByPixelMapCallback_Fail(done, 'SUB_IMAGE_yuv_pixelmap_CB_007', sourceOptions, yuvData)
}) })
/** /**
...@@ -688,7 +688,7 @@ describe('Image', function () { ...@@ -688,7 +688,7 @@ describe('Image', function () {
it('SUB_IMAGE_yuv_pixelmap_CB_008', 0, async function (done) { it('SUB_IMAGE_yuv_pixelmap_CB_008', 0, async function (done) {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourceSize: { height: 4, width: 6 } };
yuvToJpegByPixelMapCallback_fail(done, 'SUB_IMAGE_yuv_pixelmap_CB_008', sourceOptions, yuvData) yuvToJpegByPixelMapCallback_Fail(done, 'SUB_IMAGE_yuv_pixelmap_CB_008', sourceOptions, yuvData)
}) })
/** /**
...@@ -760,7 +760,7 @@ describe('Image', function () { ...@@ -760,7 +760,7 @@ describe('Image', function () {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 5 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 8, sourceSize: { height: 4, width: 5 } };
let packOpts = { format: "image/jpeg", quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
yuvToJpegByImageSourceCallback_fail(done, 'SUB_IMAGE_yuv_imagesource_CB_004', sourceOptions, packOpts, yuvData) yuvToJpegByImageSourceCallback_Fail(done, 'SUB_IMAGE_yuv_imagesource_CB_004', sourceOptions, packOpts, yuvData)
}) })
/** /**
...@@ -796,7 +796,7 @@ describe('Image', function () { ...@@ -796,7 +796,7 @@ describe('Image', function () {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 5 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 9, sourceSize: { height: 4, width: 5 } };
let packOpts = { format: "image/jpeg", quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
yuvToJpegByImageSourceCallback_fail(done, 'SUB_IMAGE_yuv_imagesource_CB_006', sourceOptions, packOpts, yuvData) yuvToJpegByImageSourceCallback_Fail(done, 'SUB_IMAGE_yuv_imagesource_CB_006', sourceOptions, packOpts, yuvData)
}) })
/** /**
...@@ -814,7 +814,7 @@ describe('Image', function () { ...@@ -814,7 +814,7 @@ describe('Image', function () {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 10, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourcePixelFormat: 10, sourceSize: { height: 4, width: 6 } };
let packOpts = { format: "image/jpeg", quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
yuvToJpegByImageSourceCallback_fail(done, 'SUB_IMAGE_yuv_imagesource_CB_007', sourceOptions, packOpts, yuvData) yuvToJpegByImageSourceCallback_Fail(done, 'SUB_IMAGE_yuv_imagesource_CB_007', sourceOptions, packOpts, yuvData)
}) })
/** /**
...@@ -832,6 +832,6 @@ describe('Image', function () { ...@@ -832,6 +832,6 @@ describe('Image', function () {
let yuvData = createBuffer(4, 6); let yuvData = createBuffer(4, 6);
let sourceOptions = { sourceDensity: 120, sourceSize: { height: 4, width: 6 } }; let sourceOptions = { sourceDensity: 120, sourceSize: { height: 4, width: 6 } };
let packOpts = { format: "image/jpeg", quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
yuvToJpegByImageSourceCallback_fail(done, 'SUB_IMAGE_yuv_imagesource_CB_008', sourceOptions, packOpts, yuvData) yuvToJpegByImageSourceCallback_Fail(done, 'SUB_IMAGE_yuv_imagesource_CB_008', sourceOptions, packOpts, yuvData)
}) })
})} })}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册