diff --git a/multimedia/image/image_js_standard/imagePixelMapNDK/entry/src/main/ets/test/ImagePixelMapNDKTest.ets b/multimedia/image/image_js_standard/imagePixelMapNDK/entry/src/main/ets/test/ImagePixelMapNDKTest.ets index 117c79cfc10a712cebd435376e690f35afd4c138..67231d4cf26421b273755e60d12d9e14696fa8b9 100644 --- a/multimedia/image/image_js_standard/imagePixelMapNDK/entry/src/main/ets/test/ImagePixelMapNDKTest.ets +++ b/multimedia/image/image_js_standard/imagePixelMapNDK/entry/src/main/ets/test/ImagePixelMapNDKTest.ets @@ -20,6 +20,7 @@ import ndkTest from 'libImagePixelMapNDKTest.so' export default function ImagePixelMapNDKTest() { describe('ImagePixelMapNDKTest', function () { + let globalpixelmap; const RESULT_SUCCESS = 0; const BYTESNUMBER = 16; function logger(caseName) { @@ -57,7 +58,17 @@ export default function ImagePixelMapNDKTest() { beforeEach(function () { console.info('beforeEach case'); }) - afterEach(function () { console.info('afterEach case'); }) + afterEach(async function () { + if (globalpixelmap != undefined) { + console.info('globalpixelmap release start'); + try { + await globalpixelmap.release(); + } catch (error) { + console.info('globalpixelmap release fail'); + } + } + console.info('afterEach case'); + }) afterAll(function () { console.info('afterAll case'); }) @@ -100,6 +111,7 @@ export default function ImagePixelMapNDKTest() { done(); return; } + globalpixelmap = pixelmap; let testFunction1 = functionTest(log, res, pixelmap); testFunction1.test(pixelMapInterface, (value) => { @@ -125,6 +137,7 @@ export default function ImagePixelMapNDKTest() { done(); return; } + globalpixelmap = pixelmap; let testFunction1 = functionTest(log, res, pixelmap); testFunction1.test(pixelMapInterface, (value) => { @@ -156,6 +169,7 @@ export default function ImagePixelMapNDKTest() { if (pixelmap == undefined) { return; } + globalpixelmap = pixelmap; expect(true).assertTrue(); done(); } catch (error) { @@ -405,7 +419,7 @@ export default function ImagePixelMapNDKTest() { /** * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPNDK_ERR_0100 - * @tc.name : setAlphaAble + * @tc.name : setAlphaAble_1 * @tc.desc : 1.createPixelMap * : 2.setAlphaAble * @tc.size : MEDIUM @@ -419,7 +433,7 @@ export default function ImagePixelMapNDKTest() { /** * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPNDK_ERR_0200 - * @tc.name : setAlphaAble + * @tc.name : setAlphaAble_2 * @tc.desc : 1.createPixelMap * : 2.setAlphaAble * @tc.size : MEDIUM @@ -433,7 +447,7 @@ export default function ImagePixelMapNDKTest() { /** * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPNDK_ERR_0300 - * @tc.name : setAlphaAble + * @tc.name : setAlphaAble_3 * @tc.desc : 1.createPixelMap * : 2.setAlphaAble * @tc.size : MEDIUM @@ -448,7 +462,7 @@ export default function ImagePixelMapNDKTest() { /** * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPNDK_ERR_0400 - * @tc.name : setDensity + * @tc.name : setDensity_1 * @tc.desc : 1.createPixelMap * : 2.setDensity * @tc.size : MEDIUM @@ -462,7 +476,7 @@ export default function ImagePixelMapNDKTest() { /** * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPNDK_ERR_0500 - * @tc.name : setDensity + * @tc.name : setDensity_2 * @tc.desc : 1.createPixelMap * : 2.setDensity * @tc.size : MEDIUM @@ -477,7 +491,7 @@ export default function ImagePixelMapNDKTest() { /** * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPNDK_ERR_0600 - * @tc.name : setDensity + * @tc.name : setDensity_3 * @tc.desc : 1.createPixelMap * : 2.setDensity * @tc.size : MEDIUM @@ -491,7 +505,7 @@ export default function ImagePixelMapNDKTest() { /** * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPNDK_ERR_0700 - * @tc.name : setOpacity + * @tc.name : setOpacity_1 * @tc.desc : 1.createPixelMap * : 2.setOpacity * @tc.size : MEDIUM @@ -505,7 +519,7 @@ export default function ImagePixelMapNDKTest() { /** * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPNDK_ERR_0800 - * @tc.name : setOpacity + * @tc.name : setOpacity_2 * @tc.desc : 1.createPixelMap * : 2.setOpacity * @tc.size : MEDIUM @@ -519,7 +533,7 @@ export default function ImagePixelMapNDKTest() { /** * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPNDK_ERR_0900 - * @tc.name : setOpacity + * @tc.name : setOpacity_3 * @tc.desc : 1.createPixelMap * : 2.setOpacity * @tc.size : MEDIUM @@ -534,7 +548,7 @@ export default function ImagePixelMapNDKTest() { /** * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPNDK_ERR_1000 - * @tc.name : scale + * @tc.name : scale_1 * @tc.desc : 1.createPixelMap * : 2.scale * @tc.size : MEDIUM @@ -549,7 +563,7 @@ export default function ImagePixelMapNDKTest() { /** * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPNDK_ERR_1100 - * @tc.name : scale + * @tc.name : scale_2 * @tc.desc : 1.createPixelMap * : 2.scale * @tc.size : MEDIUM @@ -563,7 +577,7 @@ export default function ImagePixelMapNDKTest() { /** * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPNDK_ERR_1200 - * @tc.name : scale + * @tc.name : scale_3 * @tc.desc : 1.createPixelMap * : 2.scale * @tc.size : MEDIUM @@ -577,7 +591,7 @@ export default function ImagePixelMapNDKTest() { /** * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPNDK_ERR_1300 - * @tc.name : translate + * @tc.name : translate_1 * @tc.desc : 1.createPixelMap * : 2.translate * @tc.size : MEDIUM @@ -592,7 +606,7 @@ export default function ImagePixelMapNDKTest() { /** * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPNDK_ERR_1400 - * @tc.name : translate + * @tc.name : translate_2 * @tc.desc : 1.createPixelMap * : 2.translate * @tc.size : MEDIUM @@ -606,7 +620,7 @@ export default function ImagePixelMapNDKTest() { /** * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPNDK_ERR_1500 - * @tc.name : translate + * @tc.name : translate_3 * @tc.desc : 1.createPixelMap * : 2.translate * @tc.size : MEDIUM @@ -620,7 +634,7 @@ export default function ImagePixelMapNDKTest() { /** * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPNDK_ERR_1600 - * @tc.name : rotate + * @tc.name : rotate_1 * @tc.desc : 1.createPixelMap * : 2.rotate * @tc.size : MEDIUM @@ -634,7 +648,7 @@ export default function ImagePixelMapNDKTest() { /** * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPNDK_ERR_1700 - * @tc.name : rotate + * @tc.name : rotate_2 * @tc.desc : 1.createPixelMap * : 2.rotate * @tc.size : MEDIUM @@ -648,7 +662,7 @@ export default function ImagePixelMapNDKTest() { /** * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPNDK_ERR_1800 - * @tc.name : rotate + * @tc.name : rotate_3 * @tc.desc : 1.createPixelMap * : 2.rotate * @tc.size : MEDIUM @@ -662,7 +676,7 @@ export default function ImagePixelMapNDKTest() { /** * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPNDK_ERR_1900 - * @tc.name : flip + * @tc.name : flip_1 * @tc.desc : 1.createPixelMap * : 2.flip * @tc.size : MEDIUM @@ -676,7 +690,7 @@ export default function ImagePixelMapNDKTest() { /** * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPNDK_ERR_2000 - * @tc.name : flip + * @tc.name : flip_2 * @tc.desc : 1.createPixelMap * : 2.flip * @tc.size : MEDIUM @@ -690,7 +704,7 @@ export default function ImagePixelMapNDKTest() { /** * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPNDK_ERR_2100 - * @tc.name : flip + * @tc.name : flip_3 * @tc.desc : 1.createPixelMap * : 2.flip * @tc.size : MEDIUM @@ -704,7 +718,7 @@ export default function ImagePixelMapNDKTest() { /** * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPNDK_ERR_2200 - * @tc.name : crop + * @tc.name : crop_1 * @tc.desc : 1.createPixelMap * : 2.crop * @tc.size : MEDIUM @@ -718,7 +732,7 @@ export default function ImagePixelMapNDKTest() { /** * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPNDK_ERR_2300 - * @tc.name : crop + * @tc.name : crop_2 * @tc.desc : 1.createPixelMap * : 2.crop * @tc.size : MEDIUM @@ -733,7 +747,7 @@ export default function ImagePixelMapNDKTest() { /** * @tc.number : SUB_GRAPHIC_IMAGE_PIXELMAPNDK_ERR_2400 - * @tc.name : crop + * @tc.name : crop_3 * @tc.desc : 1.createPixelMap * : 2.crop * @tc.size : MEDIUM