提交 30b4e202 编写于 作者: Q qlw

<qinliwen3@huawei.com>

Signed-off-by: Nqlw <qinliwen3@huawei.com>
上级 031e37bb
...@@ -22,6 +22,7 @@ import bundle from '@ohos.bundle' ...@@ -22,6 +22,7 @@ import bundle from '@ohos.bundle'
describe('Image', function () { describe('Image', function () {
var pathExifJpg = '/data/storage/el2/base/files/test_exif.jpg'; var pathExifJpg = '/data/storage/el2/base/files/test_exif.jpg';
var pathExifJpg1 = '/data/storage/el2/base/files/test_exif1.jpg';
let globalpixelmap; let globalpixelmap;
beforeAll(async function () { beforeAll(async function () {
await applyPermission(); await applyPermission();
...@@ -1230,7 +1231,7 @@ describe('Image', function () { ...@@ -1230,7 +1231,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_171', 0, async function (done) { it('TC_171', 0, async function (done) {
let fdNumber = fileio.openSync(pathExifJpg); let fdNumber = fileio.openSync(pathExifJpg1);
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_171 create image source failed'); console.info('TC_171 create image source failed');
...@@ -1240,7 +1241,7 @@ describe('Image', function () { ...@@ -1240,7 +1241,7 @@ describe('Image', function () {
imageSourceApi.getImageProperty("BitsPerSample") imageSourceApi.getImageProperty("BitsPerSample")
.then(data => { .then(data => {
console.info('TC_171 BitsPerSample ' + data); console.info('TC_171 BitsPerSample ' + data);
expect(data != undefined).assertTrue(); expect(data != undefined && data != '').assertTrue();
done(); done();
}) })
.catch(error => { .catch(error => {
...@@ -1526,7 +1527,7 @@ describe('Image', function () { ...@@ -1526,7 +1527,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_172', 0, async function (done) { it('TC_172', 0, async function (done) {
let fdNumber = fileio.openSync(pathExifJpg); let fdNumber = fileio.openSync(pathExifJpg1);
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_172 create image source failed'); console.info('TC_172 create image source failed');
...@@ -1540,7 +1541,7 @@ describe('Image', function () { ...@@ -1540,7 +1541,7 @@ describe('Image', function () {
done(); done();
} else { } else {
console.info('TC_172 BitsPerSample ' + data); console.info('TC_172 BitsPerSample ' + data);
expect(data != undefined).assertTrue(); expect(data != undefined && data != '').assertTrue();
done(); done();
} }
}) })
...@@ -1815,7 +1816,7 @@ describe('Image', function () { ...@@ -1815,7 +1816,7 @@ describe('Image', function () {
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('TC_173', 0, async function (done) { it('TC_173', 0, async function (done) {
let fdNumber = fileio.openSync(pathExifJpg); let fdNumber = fileio.openSync(pathExifJpg1);
const imageSourceApi = image.createImageSource(fdNumber); const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) { if (imageSourceApi == undefined) {
console.info('TC_173 create image source failed'); console.info('TC_173 create image source failed');
...@@ -1830,7 +1831,7 @@ describe('Image', function () { ...@@ -1830,7 +1831,7 @@ describe('Image', function () {
done(); done();
} else { } else {
console.info('TC_173 BitsPerSample ' + data); console.info('TC_173 BitsPerSample ' + data);
expect(data != '9999' && data != undefined).assertTrue(); expect(data != '9999' && data != undefined && data != '').assertTrue();
done(); done();
} }
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册