From 8b70e00315129530a97d1e89fcf065bf9a481666 Mon Sep 17 00:00:00 2001 From: fengzewu Date: Thu, 18 Aug 2022 18:01:11 +0800 Subject: [PATCH] fix testcase Signed-off-by: fengzewu --- .../imageRGBA/src/main/js/test/RGBA.test.js | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/multimedia/image/image_js_standard/imageRGBA/src/main/js/test/RGBA.test.js b/multimedia/image/image_js_standard/imageRGBA/src/main/js/test/RGBA.test.js index 777a6143a..dc96fee00 100644 --- a/multimedia/image/image_js_standard/imageRGBA/src/main/js/test/RGBA.test.js +++ b/multimedia/image/image_js_standard/imageRGBA/src/main/js/test/RGBA.test.js @@ -332,15 +332,15 @@ describe('Image', function () { const Color = new ArrayBuffer(96); let opts = { editable: true, pixelFormat: 0, size: { height: -1, width: 8 } } image.createPixelMap(Color, opts, (err, pixelmap) => { - if (err != undefined) { + if (err) { console.info('RGBA_011 err: ' + err); - expect(false).assertTrue(); + expect(pixelmap == undefined).assertTrue(); + console.info('RGBA_011 pass'); + done(); + } else { + expect(true).assertTrue(); done(); - return; } - expect(pixelmap == undefined).assertTrue(); - console.info('RGBA_011 pass'); - done(); }) }) @@ -359,15 +359,15 @@ describe('Image', function () { const Color = new ArrayBuffer(96); let opts = { editable: true, pixelFormat: 1, size: { height: 6, width: -1 } } image.createPixelMap(Color, opts, (err, pixelmap) => { - if (err != undefined) { + if (err) { console.info('RGBA_012 err: ' + err); - expect(false).assertTrue(); + expect(pixelmap == undefined).assertTrue(); + console.info('RGBA_012 pass'); + done(); + } else { + expect(true).assertTrue(); done(); - return; } - expect(pixelmap == undefined).assertTrue(); - console.info('RGBA_012 pass'); - done(); }) }) -- GitLab