[gjs/ewlsh/enable-pending-tests] gi: Enable pending tests which are now correctly handled
- From: Evan Welsh <ewlsh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/ewlsh/enable-pending-tests] gi: Enable pending tests which are now correctly handled
- Date: Wed, 25 Aug 2021 05:07:47 +0000 (UTC)
commit d4455f6e5143fd076245e87cce312d76a9ceaea5
Author: Evan Welsh <contact evanwelsh com>
Date: Tue Aug 24 22:05:07 2021 -0700
gi: Enable pending tests which are now correctly handled
installed-tests/js/testGIMarshalling.js | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/installed-tests/js/testGIMarshalling.js b/installed-tests/js/testGIMarshalling.js
index 27e05c8a..d1defc14 100644
--- a/installed-tests/js/testGIMarshalling.js
+++ b/installed-tests/js/testGIMarshalling.js
@@ -758,10 +758,12 @@ describe('GValue', function () {
});
it('can be passed into a function and modified', function () {
- expect(() => GIMarshallingTests.gvalue_in_with_modification(42)).not.toThrow();
- // Let's assume this test doesn't expect that the modified GValue makes
- // it back to the caller; I don't see how that could be achieved.
- // See https://gitlab.gnome.org/GNOME/gjs/issues/80
+ const value = new GObject.Value();
+ value.init(GObject.TYPE_INT);
+ value.set_int(42);
+
+ expect(() => GIMarshallingTests.gvalue_in_with_modification(value)).not.toThrow();
+ expect(value.get_int()).toBe(24);
});
xit('enum can be passed into a function and packed', function () {
@@ -769,10 +771,13 @@ describe('GValue', function () {
.not.toThrow();
}).pend("GJS doesn't support native enum types");
- xit('flags can be passed into a function and packed', function () {
- expect(() => GIMarshallingTests.gvalue_in_flags(GIMarshallingTests.Flags.VALUE3))
+ it('flags can be passed into a function and packed', function () {
+ const value = new GObject.Value();
+ value.init(GIMarshallingTests.Flags);
+ value.set_flags(GIMarshallingTests.Flags.VALUE3);
+ expect(() => GIMarshallingTests.gvalue_in_flags(value))
.not.toThrow();
- }).pend("we don't know to pack flags in a GValue as flags and not gint");
+ });
it('marshals as an int64 out parameter', function () {
expect(GIMarshallingTests.gvalue_int64_out()).toEqual(Limits.int64.max);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]