[gjs] tests: add array_out_param unit test
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] tests: add array_out_param unit test
- Date: Fri, 6 Jan 2017 06:01:48 +0000 (UTC)
commit ea1fc162330b97cc4ba6bb8ac4326da5b17d937d
Author: Paolo Borelli <pborelli gnome org>
Date: Mon Apr 1 09:49:07 2013 +0200
tests: add array_out_param unit test
https://bugzilla.gnome.org/show_bug.cgi?id=697020
installed-tests/js/testGIMarshalling.js | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/installed-tests/js/testGIMarshalling.js b/installed-tests/js/testGIMarshalling.js
index 99d081b..501cf41 100644
--- a/installed-tests/js/testGIMarshalling.js
+++ b/installed-tests/js/testGIMarshalling.js
@@ -556,6 +556,10 @@ function callback_return_value_and_multiple_out_parameters() {
return [48, 49, 50];
}
+function callback_array_out_parameter() {
+ return [50, 51];
+}
+
describe('Callback', function () {
it('marshals a return value', function () {
expect(GIMarshallingTests.callback_return_value_only(callback_return_value_only))
@@ -581,6 +585,11 @@ describe('Callback', function () {
expect(GIMarshallingTests.callback_return_value_and_multiple_out_parameters(callback_return_value_and_multiple_out_parameters))
.toEqual([48, 49, 50]);
});
+
+ xit('marshals an array out parameter', function () {
+ expect(GIMarshallingTests.callback_array_out_parameter(callback_array_out_parameter))
+ .toEqual([50, 51]);
+ }).pend('Function not added to gobject-introspection test suite yet');
});
const VFuncTester = new Lang.Class({
@@ -591,7 +600,8 @@ const VFuncTester = new Lang.Class({
vfunc_vfunc_one_out_parameter: callback_one_out_parameter,
vfunc_vfunc_multiple_out_parameters: callback_multiple_out_parameters,
vfunc_vfunc_return_value_and_one_out_parameter: callback_return_value_and_one_out_parameter,
- vfunc_vfunc_return_value_and_multiple_out_parameters: callback_return_value_and_multiple_out_parameters
+ vfunc_vfunc_return_value_and_multiple_out_parameters: callback_return_value_and_multiple_out_parameters,
+ vfunc_vfunc_array_out_parameter: callback_array_out_parameter,
});
describe('Virtual function', function () {
@@ -621,6 +631,10 @@ describe('Virtual function', function () {
expect(tester.vfunc_return_value_and_multiple_out_parameters())
.toEqual([48, 49, 50]);
});
+
+ it('marshals an array out parameter', function () {
+ expect(tester.vfunc_array_out_parameter()).toEqual([50, 51]);
+ });
});
describe('Interface', function () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]