summaryrefslogtreecommitdiff
path: root/installed-tests
diff options
context:
space:
mode:
authorPhilip Chimento <philip.chimento@gmail.com>2022-11-01 22:20:37 -0700
committerPhilip Chimento <philip.chimento@gmail.com>2022-11-01 22:20:37 -0700
commitda02ead80bc392521fc3ac1ab46c18ba7050212b (patch)
treedfcccd5c367df9fc80a847c60a3c950b266af536 /installed-tests
parent9806c5e631ca06fff4b972ddddf7eef170893d8d (diff)
downloadgjs-da02ead80bc392521fc3ac1ab46c18ba7050212b.tar.gz
GObject: Handle versions of GLib without GBindingGroup
We don't require GLib 2.72 for anything else, so it makes sense to conditionally define the override for GObject.BindingGroup.bind_full(). If GLib is too old then the override (and its tests) are skipped.
Diffstat (limited to 'installed-tests')
-rw-r--r--installed-tests/js/testGObjectClass.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/installed-tests/js/testGObjectClass.js b/installed-tests/js/testGObjectClass.js
index 459a9932..1e95e3a6 100644
--- a/installed-tests/js/testGObjectClass.js
+++ b/installed-tests/js/testGObjectClass.js
@@ -1176,6 +1176,8 @@ describe('Property bindings', function () {
});
it('can be set up as a group', function () {
+ if (GObject.BindingGroup === undefined)
+ pending('GLib version too old');
const group = new GObject.BindingGroup({source: a});
group.bind('string', b, 'string', GObject.BindingFlags.NONE);
a.string = 'foo';
@@ -1184,6 +1186,8 @@ describe('Property bindings', function () {
});
it('can be set up as a group with custom mappings', function () {
+ if (GObject.BindingGroup === undefined)
+ pending('GLib version too old');
const group = new GObject.BindingGroup({source: a});
group.bind_full('bool', b, 'string', GObject.BindingFlags.NONE,
(bind, source) => [true, `${source}`],