[gjs: 4/5] testGIMarshalling: Introspecting an unsupported out-caller allocated throws




commit dd49121da0279bc797b9404381215961bce44590
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Mon Sep 7 20:20:27 2020 +0200

    testGIMarshalling: Introspecting an unsupported out-caller allocated throws
    
    This is a test for issue [1], even though the actual test would be
    veryfing that the function correctly works, this is not yet supported as
    per issue [2] and so for now it's just better to check that the behavior
    previous to the arg-cache is preserved.
    
    [1] https://gitlab.gnome.org/GNOME/gjs/-/issues/344
    [2] https://gitlab.gnome.org/GNOME/gjs/-/issues/106

 installed-tests/js/testGIMarshalling.js | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/installed-tests/js/testGIMarshalling.js b/installed-tests/js/testGIMarshalling.js
index d26666268..97a0030d2 100644
--- a/installed-tests/js/testGIMarshalling.js
+++ b/installed-tests/js/testGIMarshalling.js
@@ -525,6 +525,14 @@ describe('GArray', function () {
             expect(GIMarshallingTests.garray_utf8_full_out_caller_allocated())
                 .toEqual(['0', '1', '2']);
         }).pend('https://gitlab.gnome.org/GNOME/gjs/issues/106');
+
+        // https://gitlab.gnome.org/GNOME/gjs/-/issues/344
+        // the test should be replaced with the one above when issue
+        // https://gitlab.gnome.org/GNOME/gjs/issues/106 is fixed.
+        it('marshals as a transfer-full caller-allocated out parameter throws errors', function () {
+            expect(() => GIMarshallingTests.garray_utf8_full_out_caller_allocated())
+                .toThrowError(/Unsupported type array.*\(out caller-allocates\)/);
+        });
     });
 
     it('marshals boxed structs as a transfer-full return value', function () {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]