seed r190 - trunk/tests



Author: racarr
Date: Sat Nov  8 03:43:00 2008
New Revision: 190
URL: http://svn.gnome.org/viewvc/seed?rev=190&view=rev

Log:
Add 3 new signal tests.


Added:
   trunk/tests/signal-expects.js   (contents, props changed)
   trunk/tests/signal-this.js   (contents, props changed)
   trunk/tests/signal-userdata.js   (contents, props changed)
Modified:
   trunk/tests/Makefile.am

Modified: trunk/tests/Makefile.am
==============================================================================
--- trunk/tests/Makefile.am	(original)
+++ trunk/tests/Makefile.am	Sat Nov  8 03:43:00 2008
@@ -1,6 +1,9 @@
 EXTRA_DIST = \
 	argv.js \
     compare.js \
+    signal-this.js \
+    signal-userdata.js \
+    signal-expects.js \
     gtype.js \
     json.js \
     enum.js \

Added: trunk/tests/signal-expects.js
==============================================================================
--- (empty file)
+++ trunk/tests/signal-expects.js	Sat Nov  8 03:43:00 2008
@@ -0,0 +1,17 @@
+#!/usr/local/bin/seed
+// Returns: 0
+// STDIN:
+// STDOUT:In signal
+// STDERR:
+
+Seed.import_namespace("Gtk");
+Gtk.init(null, null);
+
+function expects_test(widget, user_data)
+{
+    Seed.print("In signal");
+}
+
+w = new Gtk.Window();
+w.signal.map.connect(expects_test);
+w.show();
\ No newline at end of file

Added: trunk/tests/signal-this.js
==============================================================================
--- (empty file)
+++ trunk/tests/signal-this.js	Sat Nov  8 03:43:00 2008
@@ -0,0 +1,17 @@
+#!/usr/local/bin/seed
+// Returns: 0
+// STDIN:
+// STDOUT:\{"Hello":"World"\}
+// STDERR:
+
+Seed.import_namespace("Gtk");
+Gtk.init(null, null);
+
+function this_test(widget)
+{
+    Seed.print(JSON.stringify(this));
+}
+
+w = new Gtk.Window();
+w.signal.map.connect(this_test, {Hello: "World"});
+w.show();
\ No newline at end of file

Added: trunk/tests/signal-userdata.js
==============================================================================
--- (empty file)
+++ trunk/tests/signal-userdata.js	Sat Nov  8 03:43:00 2008
@@ -0,0 +1,17 @@
+#!/usr/local/bin/seed
+// Returns: 0
+// STDIN:
+// STDOUT:\{"Hello":"World"\}
+// STDERR:
+
+Seed.import_namespace("Gtk");
+Gtk.init(null, null);
+
+function userdata_test(widget, user_data)
+{
+    Seed.print(JSON.stringify(user_data));
+}
+
+w = new Gtk.Window();
+w.signal.map.connect(userdata_test, null, {Hello: "World"});
+w.show();
\ No newline at end of file



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