seed r227 - trunk/tests
- From: racarr svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r227 - trunk/tests
- Date: Mon, 10 Nov 2008 13:02:18 +0000 (UTC)
Author: racarr
Date: Mon Nov 10 13:02:17 2008
New Revision: 227
URL: http://svn.gnome.org/viewvc/seed?rev=227&view=rev
Log:
Add test for attempting to invalidly define signals.
Added:
trunk/tests/gtype-signal-exception.js (contents, props changed)
Added: trunk/tests/gtype-signal-exception.js
==============================================================================
--- (empty file)
+++ trunk/tests/gtype-signal-exception.js Mon Nov 10 13:02:17 2008
@@ -0,0 +1,46 @@
+#!/usr/bin/env seed
+// Returns: 0
+// STDIN:
+// STDOUT:Signal definition needs name property\nSignal definition needs name property
+// STDERR:
+// Returns: 0
+// STDIN:
+// STDOUT:Hello\nGoodbye
+// STDERR:
+
+Seed.import_namespace("Gtk");
+Gtk.init(null, null);
+
+HelloWindowType = {
+ parent: Gtk.Window,
+ name: "HelloWindow",
+ class_init: function(klass, prototype)
+ {
+ var HelloSignalDefinition = {};
+ var GoodbyeSignalDefinition = {name: 3};
+
+ try {
+ hello_signal_id = klass.install_signal(HelloSignalDefinition);
+ }
+ catch (e){
+ Seed.print(e.message);
+ }
+ try
+ {
+ goodbye_signal_id = klass.install_signal(GoodbyeSignalDefinition);
+ hello_signal_id = klass.install_signal(HelloSignalDefinition);
+ }
+ catch (e)
+ {
+ Seed.print(e.message);
+ }
+
+ },
+ 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]