seed r444 - trunk/tests



Author: racarr
Date: Sun Dec 14 06:29:38 2008
New Revision: 444
URL: http://svn.gnome.org/viewvc/seed?rev=444&view=rev

Log:
Add test of exception in class init.

Added:
   trunk/tests/gtype-class-init-exception.js   (contents, props changed)
Modified:
   trunk/tests/Makefile.am

Modified: trunk/tests/Makefile.am
==============================================================================
--- trunk/tests/Makefile.am	(original)
+++ trunk/tests/Makefile.am	Sun Dec 14 06:29:38 2008
@@ -1,6 +1,7 @@
 EXTRA_DIST = \
     argv.js \
     closure-finalization.js \
+    gtype-class-init-exception.js \
     compare.js \
     include-syntax.js \
     struct-nested-set.js \

Added: trunk/tests/gtype-class-init-exception.js
==============================================================================
--- (empty file)
+++ trunk/tests/gtype-class-init-exception.js	Sun Dec 14 06:29:38 2008
@@ -0,0 +1,22 @@
+#!/usr/bin/env seed
+// Returns: 0
+// STDIN:
+// STDOUT:
+// STDERR:\n\*\* \(seed:[0-9]+\): WARNING \*\*: Exception in class init closure\. Line 13 in \.\/gtype-class-init-exception\.js: ReferenceError Can't find variable: notAVariable
+Seed.import_namespace("Gtk");
+Gtk.init(null, null);
+
+HelloWindowType = {
+    parent: Gtk.Window.type,
+    name: "HelloWindow",
+    class_init: function(klass, prototype)
+    {
+		prototype = notAVariable.notAProperty;
+    },
+    instance_init: function(klass)
+    {
+    }};
+
+HelloWindow = new GType(HelloWindowType);
+w = new HelloWindow();
+	  



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