提交 620b1287 编写于 作者: Q qlw

<Image ScaleMode用例修改&新增opacity接口>

Signed-off-by: Nqlw <qinliwen3@huawei.com>
上级 35e9f3f1
/* /*
* Copyright (C) 2021 Huawei Device Co., Ltd. * Copyright (C) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
...@@ -61,7 +61,8 @@ describe('AddImage', function () { ...@@ -61,7 +61,8 @@ describe('AddImage', function () {
/** /**
* @tc.number : addImage_001 * @tc.number : addImage_001
* @tc.name : create pixelmap-promise (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 }, bytes = buffer,scaleMode: 1, alphaType: 0) * @tc.name : create pixelmap-promise (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 },
* bytes = buffer,scaleMode: 1, alphaType: 0)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
* 2.set editable,pixeFormat,size * 2.set editable,pixeFormat,size
* 3.using color and opts create newPixelMap * 3.using color and opts create newPixelMap
...@@ -77,7 +78,8 @@ describe('AddImage', function () { ...@@ -77,7 +78,8 @@ describe('AddImage', function () {
/** /**
* @tc.number : add_01_002 * @tc.number : add_01_002
* @tc.name : create pixelmap-promise (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 }, bytes = buffer,scaleMode: 1, alphaType: 1) * @tc.name : create pixelmap-promise (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 },
* bytes = buffer,scaleMode: 1, alphaType: 1)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
* 2.set editable,pixeFormat,size * 2.set editable,pixeFormat,size
* 3.using color and opts create newPixelMap * 3.using color and opts create newPixelMap
...@@ -93,7 +95,8 @@ describe('AddImage', function () { ...@@ -93,7 +95,8 @@ describe('AddImage', function () {
/** /**
* @tc.number : add_01_003 * @tc.number : add_01_003
* @tc.name : create pixelmap-promise (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 }, bytes = buffer,scaleMode: 2, alphaType: 2) * @tc.name : create pixelmap-promise (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 },
* bytes = buffer,scaleMode: 0, alphaType: 2)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
* 2.set editable,pixeFormat,size * 2.set editable,pixeFormat,size
* 3.using color and opts create newPixelMap * 3.using color and opts create newPixelMap
...@@ -103,13 +106,14 @@ describe('AddImage', function () { ...@@ -103,13 +106,14 @@ describe('AddImage', function () {
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('add_01_003', 0, async function (done) { it('add_01_003', 0, async function (done) {
let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 }, scaleMode: 2, alphaType: 2 } let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 }, scaleMode: 0, alphaType: 2 }
createPixMapPromise(done, 'add_01_003', opts); createPixMapPromise(done, 'add_01_003', opts);
}) })
/** /**
* @tc.number : add_01_004 * @tc.number : add_01_004
* @tc.name : create pixelmap-promise (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 }, bytes = buffer,scaleMode: 2, alphaType: 3) * @tc.name : create pixelmap-promise (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 },
* bytes = buffer,scaleMode: 0, alphaType: 3)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
* 2.set editable,pixeFormat,size * 2.set editable,pixeFormat,size
* 3.using color and opts create newPixelMap * 3.using color and opts create newPixelMap
...@@ -119,13 +123,14 @@ describe('AddImage', function () { ...@@ -119,13 +123,14 @@ describe('AddImage', function () {
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('add_01_004', 0, async function (done) { it('add_01_004', 0, async function (done) {
let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 }, scaleMode: 2, alphaType: 3 } let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 }, scaleMode: 0, alphaType: 3 }
createPixMapPromise(done, 'add_01_004', opts); createPixMapPromise(done, 'add_01_004', opts);
}) })
/** /**
* @tc.number : add_02_001 * @tc.number : add_02_001
* @tc.name : create pixelmap-callback (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 }, bytes = buffer,scaleMode: 2, alphaType: 0) * @tc.name : create pixelmap-callback (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 },
* bytes = buffer,scaleMode: 0, alphaType: 0)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
* 2.set editable,pixeFormat,size * 2.set editable,pixeFormat,size
* 3.using color and opts create newPixelMap * 3.using color and opts create newPixelMap
...@@ -135,13 +140,14 @@ describe('AddImage', function () { ...@@ -135,13 +140,14 @@ describe('AddImage', function () {
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('add_02_001', 0, async function (done) { it('add_02_001', 0, async function (done) {
let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 }, scaleMode: 2, alphaType: 0 } let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 }, scaleMode: 0, alphaType: 0 }
createPixMapCb(done, 'add_02_001', opts); createPixMapCb(done, 'add_02_001', opts);
}) })
/** /**
* @tc.number : add_02_002 * @tc.number : add_02_002
* @tc.name : create pixelmap-callback (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 }, bytes = buffer,scaleMode: 2, alphaType: 1) * @tc.name : create pixelmap-callback (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 },
* bytes = buffer,scaleMode: 0, alphaType: 1)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
* 2.set editable,pixeFormat,size * 2.set editable,pixeFormat,size
* 3.using color and opts create newPixelMap * 3.using color and opts create newPixelMap
...@@ -151,13 +157,14 @@ describe('AddImage', function () { ...@@ -151,13 +157,14 @@ describe('AddImage', function () {
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('add_02_002', 0, async function (done) { it('add_02_002', 0, async function (done) {
let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 }, scaleMode: 2, alphaType: 1 } let opts = { editable: true, pixelFormat: 3, size: { height: 4, width: 6 }, scaleMode: 0, alphaType: 1 }
createPixMapCb(done, 'add_02_002', opts); createPixMapCb(done, 'add_02_002', opts);
}) })
/** /**
* @tc.number : add_02_003 * @tc.number : add_02_003
* @tc.name : create pixelmap-callback (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 }, bytes = buffer,scaleMode: 1, alphaType: 2) * @tc.name : create pixelmap-callback (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 },
* bytes = buffer,scaleMode: 1, alphaType: 2)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
* 2.set editable,pixeFormat,size * 2.set editable,pixeFormat,size
* 3.using color and opts create newPixelMap * 3.using color and opts create newPixelMap
...@@ -173,7 +180,8 @@ describe('AddImage', function () { ...@@ -173,7 +180,8 @@ describe('AddImage', function () {
/** /**
* @tc.number : add_02_004 * @tc.number : add_02_004
* @tc.name : create pixelmap-callback (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 }, bytes = buffer,scaleMode: 1, alphaType: 3) * @tc.name : create pixelmap-callback (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 },
* bytes = buffer,scaleMode: 1, alphaType: 3)
* @tc.desc : 1.create InitializationOptions object * @tc.desc : 1.create InitializationOptions object
* 2.set editable,pixeFormat,size * 2.set editable,pixeFormat,size
* 3.using color and opts create newPixelMap * 3.using color and opts create newPixelMap
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册