From 30b4e202f3c30429a5ba252324670b5d96b81ab0 Mon Sep 17 00:00:00 2001 From: qlw Date: Wed, 13 Jul 2022 21:01:22 +0800 Subject: [PATCH] Signed-off-by: qlw --- .../imageExif/src/main/js/test/image.test.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/multimedia/image/image_js_standard/imageExif/src/main/js/test/image.test.js b/multimedia/image/image_js_standard/imageExif/src/main/js/test/image.test.js index 69c0c9c6f..f99c804ac 100644 --- a/multimedia/image/image_js_standard/imageExif/src/main/js/test/image.test.js +++ b/multimedia/image/image_js_standard/imageExif/src/main/js/test/image.test.js @@ -22,6 +22,7 @@ import bundle from '@ohos.bundle' describe('Image', function () { var pathExifJpg = '/data/storage/el2/base/files/test_exif.jpg'; + var pathExifJpg1 = '/data/storage/el2/base/files/test_exif1.jpg'; let globalpixelmap; beforeAll(async function () { await applyPermission(); @@ -1230,7 +1231,7 @@ describe('Image', function () { * @tc.level : Level 1 */ it('TC_171', 0, async function (done) { - let fdNumber = fileio.openSync(pathExifJpg); + let fdNumber = fileio.openSync(pathExifJpg1); const imageSourceApi = image.createImageSource(fdNumber); if (imageSourceApi == undefined) { console.info('TC_171 create image source failed'); @@ -1240,7 +1241,7 @@ describe('Image', function () { imageSourceApi.getImageProperty("BitsPerSample") .then(data => { console.info('TC_171 BitsPerSample ' + data); - expect(data != undefined).assertTrue(); + expect(data != undefined && data != '').assertTrue(); done(); }) .catch(error => { @@ -1526,7 +1527,7 @@ describe('Image', function () { * @tc.level : Level 1 */ it('TC_172', 0, async function (done) { - let fdNumber = fileio.openSync(pathExifJpg); + let fdNumber = fileio.openSync(pathExifJpg1); const imageSourceApi = image.createImageSource(fdNumber); if (imageSourceApi == undefined) { console.info('TC_172 create image source failed'); @@ -1540,7 +1541,7 @@ describe('Image', function () { done(); } else { console.info('TC_172 BitsPerSample ' + data); - expect(data != undefined).assertTrue(); + expect(data != undefined && data != '').assertTrue(); done(); } }) @@ -1815,7 +1816,7 @@ describe('Image', function () { * @tc.level : Level 1 */ it('TC_173', 0, async function (done) { - let fdNumber = fileio.openSync(pathExifJpg); + let fdNumber = fileio.openSync(pathExifJpg1); const imageSourceApi = image.createImageSource(fdNumber); if (imageSourceApi == undefined) { console.info('TC_173 create image source failed'); @@ -1830,7 +1831,7 @@ describe('Image', function () { done(); } else { console.info('TC_173 BitsPerSample ' + data); - expect(data != '9999' && data != undefined).assertTrue(); + expect(data != '9999' && data != undefined && data != '').assertTrue(); done(); } }) -- GitLab