提交 e9b15727 编写于 作者: F fengzewu

fix code err

Signed-off-by: Nfengzewu <fengzewu@huawei.com>
上级 3902a447
...@@ -81,7 +81,7 @@ describe('ImageCreator', function () { ...@@ -81,7 +81,7 @@ describe('ImageCreator', function () {
return return
} }
img.getComponent(JPEG, async (err, component) => { img.getComponent(JPEG, async (err, component) => {
if (err != 0) { if (err != undefined) {
expect(false).assertTrue(); expect(false).assertTrue();
console.log(`${testNum} getComponent err:` + err); console.log(`${testNum} getComponent err:` + err);
done(); done();
...@@ -462,7 +462,7 @@ describe('ImageCreator', function () { ...@@ -462,7 +462,7 @@ describe('ImageCreator', function () {
return; return;
} }
img.getComponent(JPEG, (err, component) => { img.getComponent(JPEG, (err, component) => {
if (err != 0) { if (err != undefined) {
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
return; return;
...@@ -565,7 +565,7 @@ describe('ImageCreator', function () { ...@@ -565,7 +565,7 @@ describe('ImageCreator', function () {
var creator = image.createImageCreator(WIDTH, HEIGHT, FORMAT, CAPACITY); var creator = image.createImageCreator(WIDTH, HEIGHT, FORMAT, CAPACITY);
if (creator != undefined) { if (creator != undefined) {
creator.dequeueImage((err, img) => { creator.dequeueImage((err, img) => {
if (err != 0 || img == undefined) { if (err != undefined || img == undefined) {
console.log('Creator_007 dequeueImage error:' + err); console.log('Creator_007 dequeueImage error:' + err);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
...@@ -683,7 +683,7 @@ describe('ImageCreator', function () { ...@@ -683,7 +683,7 @@ describe('ImageCreator', function () {
return; return;
} }
creator.on('imageRelease', (err) => { creator.on('imageRelease', (err) => {
if (err != 0) { if (err != undefined) {
console.info('Creator_008 on release faild' + err); console.info('Creator_008 on release faild' + err);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册