Add regression test for BGO 593182
authorRobert Carr <racarr@gnome.org>
Thu, 17 Dec 2009 20:40:07 +0000 (15:40 -0500)
committerRobert Carr <racarr@gnome.org>
Thu, 17 Dec 2009 20:40:07 +0000 (15:40 -0500)
tests/javascript/gtypes/Makefile.am
tests/javascript/gtypes/gtype-gtype-class-init.js [new file with mode: 0755]

index a04ee6d..7347f94 100644 (file)
@@ -9,5 +9,6 @@ EXTRA_DIST = \
        gtype-property-nice.js \
        gtype-self.js \
        gtype-extraprop.js \
+       gtype-gtype-class-init.js \
        gtype-signal.js
 
diff --git a/tests/javascript/gtypes/gtype-gtype-class-init.js b/tests/javascript/gtypes/gtype-gtype-class-init.js
new file mode 100755 (executable)
index 0000000..8740bb2
--- /dev/null
@@ -0,0 +1,30 @@
+#!/usr/bin/env seed
+// Returns: 0
+// STDIN:
+// STDOUT:Class init
+// STDERR:
+Gtk = imports.gi.Gtk;
+Gtk.init(Seed.argv);
+
+HelloWindowType = {
+ parent: Gtk.Window.type,
+ name: "HelloWindow",
+ init: function(){
+  }
+};
+
+HelloWindow = new GType(HelloWindowType);
+w = new HelloWindow();
+
+InheritedWindowType = {
+ parent: HelloWindow.type,
+ name: "InheritedWindow",
+ class_init: function(klass, prototype) {print("Class init")},
+ init: function(){
+  }
+};
+
+InheritedWindow = new GType(InheritedWindowType);
+
+b = new InheritedWindow();
+