seed r118 - trunk/tests
- From: racarr svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r118 - trunk/tests
- Date: Wed, 5 Nov 2008 10:05:34 +0000 (UTC)
Author: racarr
Date: Wed Nov 5 10:05:34 2008
New Revision: 118
URL: http://svn.gnome.org/viewvc/seed?rev=118&view=rev
Log:
Add test for native closures.
Added:
trunk/tests/native-closure.js (contents, props changed)
Modified:
trunk/tests/Makefile.am
Modified: trunk/tests/Makefile.am
==============================================================================
--- trunk/tests/Makefile.am (original)
+++ trunk/tests/Makefile.am Wed Nov 5 10:05:34 2008
@@ -14,7 +14,8 @@
readline.js \
run-tests.py \
signal.js \
- syntax-test.js
+ syntax-test.js \
+ native-closure.js
## File created by the gnome-build tools
Added: trunk/tests/native-closure.js
==============================================================================
--- (empty file)
+++ trunk/tests/native-closure.js Wed Nov 5 10:05:34 2008
@@ -0,0 +1,19 @@
+#!/usr/local/bin/seed
+// Returns: 0
+// STDIN:
+// STDOUT:\[object GtkLabel\]\n\[object GtkButton\]
+// STDERR:
+Seed.import_namespace("Gtk")
+Gtk.init(null, null);
+
+w = new Gtk.Window();
+vbox = new Gtk.VBox();
+
+closure = Seed.closure_native(function(widget){Seed.print(widget)},
+ Gtk.Callback);
+w.add(vbox);
+
+vbox.pack_start(new Gtk.Label());
+vbox.pack_start(new Gtk.Button());
+
+vbox.foreach(closure);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]