提交 5c1f4a9d 编写于 作者: C caochuan

pixelmapNdk add release

Signed
Signed-off-by: Ncaochuan <caochuan@huawei.com>
Change-Id: Ic03d8075a40ae50b8882bbd01f47701a3e4a4844
上级 cbd79560
...@@ -20,6 +20,7 @@ import ndkTest from 'libImagePixelMapNDKTest.so' ...@@ -20,6 +20,7 @@ import ndkTest from 'libImagePixelMapNDKTest.so'
export default function ImagePixelMapNDKTest() { export default function ImagePixelMapNDKTest() {
describe('ImagePixelMapNDKTest', function () { describe('ImagePixelMapNDKTest', function () {
let globalpixelmap;
const RESULT_SUCCESS = 0; const RESULT_SUCCESS = 0;
const BYTESNUMBER = 16; const BYTESNUMBER = 16;
function logger(caseName) { function logger(caseName) {
...@@ -57,7 +58,17 @@ export default function ImagePixelMapNDKTest() { ...@@ -57,7 +58,17 @@ export default function ImagePixelMapNDKTest() {
beforeEach(function () { console.info('beforeEach case'); }) 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'); }) afterAll(function () { console.info('afterAll case'); })
...@@ -100,6 +111,7 @@ export default function ImagePixelMapNDKTest() { ...@@ -100,6 +111,7 @@ export default function ImagePixelMapNDKTest() {
done(); done();
return; return;
} }
globalpixelmap = pixelmap;
let testFunction1 = functionTest(log, res, pixelmap); let testFunction1 = functionTest(log, res, pixelmap);
testFunction1.test(pixelMapInterface, testFunction1.test(pixelMapInterface,
(value) => { (value) => {
...@@ -125,6 +137,7 @@ export default function ImagePixelMapNDKTest() { ...@@ -125,6 +137,7 @@ export default function ImagePixelMapNDKTest() {
done(); done();
return; return;
} }
globalpixelmap = pixelmap;
let testFunction1 = functionTest(log, res, pixelmap); let testFunction1 = functionTest(log, res, pixelmap);
testFunction1.test(pixelMapInterface, testFunction1.test(pixelMapInterface,
(value) => { (value) => {
...@@ -156,6 +169,7 @@ export default function ImagePixelMapNDKTest() { ...@@ -156,6 +169,7 @@ export default function ImagePixelMapNDKTest() {
if (pixelmap == undefined) { if (pixelmap == undefined) {
return; return;
} }
globalpixelmap = pixelmap;
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
} catch (error) { } catch (error) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册