[gjs/gnome-3-34] Revert "testGObjectClass: Verify the usage of GObject classes with wrong base"



commit 3146838024f075faa392ac13205086c22e2cb733
Author: Philip Chimento <philip chimento gmail com>
Date:   Mon Nov 25 09:18:13 2019 -0800

    Revert "testGObjectClass: Verify the usage of GObject classes with wrong base"
    
    This reverts commit 7a0a2cd89a071a9ed072334b653754c7e8e38797.
    This fix doesn't just replace a cryptic error with a clear error, as
    previously thought, but it also apparently breaks a usage which may have
    been incorrect but still functioned. As such, it shouldn't be introduced
    on the stable branch yet.
    
    See: #288

 installed-tests/js/testGObjectClass.js | 16 ----------------
 1 file changed, 16 deletions(-)
---
diff --git a/installed-tests/js/testGObjectClass.js b/installed-tests/js/testGObjectClass.js
index a9d209e8..e0f40194 100644
--- a/installed-tests/js/testGObjectClass.js
+++ b/installed-tests/js/testGObjectClass.js
@@ -461,19 +461,3 @@ describe('GObject virtual function', function () {
         })).toThrow();
     });
 });
-
-describe('GObject creation using base classes without registered GType', function () {
-    it('fails when trying to instantiate a class that inherits from a GObject type', function () {
-        const BadInheritance = class extends GObject.Object {};
-        const BadDerivedInheritance = class extends Derived {};
-
-        expect(() => new BadInheritance()).toThrowError(/Tried to construct an object without a GType/);
-        expect(() => new BadDerivedInheritance()).toThrowError(/Tried to construct an object without a 
GType/);
-    });
-
-    it('fails when trying to register a GObject class that inherits from a non-GObject type', function () {
-        const BadInheritance = class extends GObject.Object {};
-        expect(() => GObject.registerClass(class BadInheritanceDerived extends BadInheritance {}))
-            .toThrowError(/Object 0x[a-f0-9]+ is not a subclass of GObject_Object, it's a Object/);
-    });
-});


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