[seed] fix most of #660644 - except function-info.js (my gdb is broken)



commit 6d38e2b5601f8097e3a99da647b46d2048ce160d
Author: Alan Knowles <alan akbkhome com>
Date:   Mon Oct 3 15:10:08 2011 +0800

    fix most of #660644 - except function-info.js (my gdb is broken)

 tests/javascript/Makefile.am                  |    2 -
 tests/javascript/everything.js                |   71 -------------------------
 tests/javascript/function-info.js             |    4 +-
 tests/javascript/gdk-event.js                 |   11 ++--
 tests/javascript/gvalue-argument.js           |    9 ++--
 tests/javascript/introspect.js                |    4 +-
 tests/javascript/native-closure-exception.js  |    2 +-
 tests/javascript/object-info.js               |   12 ++---
 tests/javascript/structs/struct-enumerate.js  |   13 +++--
 tests/javascript/structs/struct-nested-set.js |   15 +++---
 10 files changed, 36 insertions(+), 107 deletions(-)
---
diff --git a/tests/javascript/Makefile.am b/tests/javascript/Makefile.am
index c718637..1283f95 100644
--- a/tests/javascript/Makefile.am
+++ b/tests/javascript/Makefile.am
@@ -11,7 +11,6 @@ EXTRA_DIST = \
     constructor-args.js \
     constructor-prototype.js \
     enum.js \
-    everything.js \
     fork.js \
     function-info.js \
     gdk-event.js \
@@ -49,7 +48,6 @@ TESTS = \
     constructor-args.js \
     constructor-prototype.js \
     enum.js \
-    everything.js \
     fork.js \
     function-info.js \
     gdk-event.js \
diff --git a/tests/javascript/function-info.js b/tests/javascript/function-info.js
index 60c6a43..29cf6ea 100755
--- a/tests/javascript/function-info.js
+++ b/tests/javascript/function-info.js
@@ -4,6 +4,6 @@ testsuite = imports.testsuite
 Gtk = imports.gi.Gtk
 GIRepository = imports.gi.GIRepository
 
-f = Gtk.Window.prototype.resize.info
+f = Gtk.Window.prototype.resize.info;
 
-testsuite.assert(GIRepository.base_info_get_name(f) == "resize")
+testsuite.assert(f.get_name() == "resize")
diff --git a/tests/javascript/gdk-event.js b/tests/javascript/gdk-event.js
index e71c4ed..e91b404 100755
--- a/tests/javascript/gdk-event.js
+++ b/tests/javascript/gdk-event.js
@@ -5,12 +5,13 @@ Gtk = imports.gi.Gtk
 Gdk = imports.gi.Gdk
 Gtk.init(Seed.argv)
 
-function paint(wdg, evt)
+function paint(wdg, cr)
 {
-    testsuite.assert(evt.expose.window instanceof Gdk.Window)
+    
+    
     testsuite.assert(wdg.window instanceof Gdk.Window)
-    testsuite.assert(evt.expose.window == wdg.window)
-    testsuite.assert(evt.expose.area.width == 200)
+    var sz = wdg.get_size();
+    testsuite.assert(sz.width == 200)
 
 	Gtk.main_quit()
 
@@ -18,7 +19,7 @@ function paint(wdg, evt)
 }
 
 var win = new Gtk.Window()
-win.signal.expose_event.connect(paint)
+win.signal.draw.connect(paint)
 win.resize(200,200)
 win.show()
 
diff --git a/tests/javascript/gvalue-argument.js b/tests/javascript/gvalue-argument.js
index b3a6462..3386b4c 100755
--- a/tests/javascript/gvalue-argument.js
+++ b/tests/javascript/gvalue-argument.js
@@ -7,8 +7,9 @@ Gtk.init(Seed.argv);
 var s = new Gtk.ListStore();
 
 s.set_column_types(2, [GObject.TYPE_STRING, GObject.TYPE_INT]);
-var iter = new Gtk.TreeIter();
 
-s.append(iter);
-s.set_value(iter, 0, "Hi");
-s.set_value(iter, 1, [GObject.TYPE_INT, 10]);
+var ret = {};
+
+s.append(ret);
+s.set_value(ret.iter, 0, "Hi");
+s.set_value(ret.iter, 1, [GObject.TYPE_INT, 10] );
diff --git a/tests/javascript/introspect.js b/tests/javascript/introspect.js
index b02f991..4bca378 100755
--- a/tests/javascript/introspect.js
+++ b/tests/javascript/introspect.js
@@ -9,7 +9,7 @@ Gtk.init(Seed.argv)
 win = new Gtk.Window()
 
 info = Seed.introspect(win.set_opacity)
-
+ 
 testsuite.assert(info.name == "set_opacity")
 testsuite.assert(info.return_type == "void")
-testsuite.assert(info.args[0].type == "double")
+testsuite.assert(info.args[0].type == "gdouble")
diff --git a/tests/javascript/native-closure-exception.js b/tests/javascript/native-closure-exception.js
index 3820025..4dd8ef7 100755
--- a/tests/javascript/native-closure-exception.js
+++ b/tests/javascript/native-closure-exception.js
@@ -25,4 +25,4 @@ catch(e)
 }
 
 //testsuite.checkAsserts
-print("This test doesn't work yet...")
+print("This test doesn't work yet... since callbacks might be async - should it ever work?")
diff --git a/tests/javascript/object-info.js b/tests/javascript/object-info.js
index 36b8c9d..f9e178b 100755
--- a/tests/javascript/object-info.js
+++ b/tests/javascript/object-info.js
@@ -4,21 +4,19 @@ testsuite = imports.testsuite
 Gtk = imports.gi.Gtk
 GIRepository = imports.gi.GIRepository
 
-gir = GIRepository.IRepository.get_default()
+gir = GIRepository.Repository.get_default()
 
 info = gir.find_by_gtype(Gtk.Window.type)
-testsuite.assert(GIRepository.base_info_get_name(info) == "Window")
+testsuite.assert(info.get_name() == "Window")
 
 n = GIRepository.object_info_get_n_interfaces(info)
 for (i = 0; i < n; i++)
 {
     property = GIRepository.object_info_get_interface(info, i)
-    propertyname = GIRepository.base_info_get_name(property)
+    propertyname = property.get_name();
     testsuite.assert(propertyname == "Buildable" ||
                      propertyname == "ImplementorIface")
-    GIRepository.base_info_unref(property)
-}
-
-GIRepository.base_info_unref(info)
+ }
 
+ 
 testsuite.checkAsserts(3)
diff --git a/tests/javascript/structs/struct-enumerate.js b/tests/javascript/structs/struct-enumerate.js
index 4ddc1c9..73ce71b 100755
--- a/tests/javascript/structs/struct-enumerate.js
+++ b/tests/javascript/structs/struct-enumerate.js
@@ -1,13 +1,14 @@
 #!/usr/bin/env seed
 
-testsuite = imports.testsuite
-Gdk = imports.gi.Gdk
+testsuite = imports.testsuite;
+Gdk = imports.gi.Gdk;
+cairo = imports.gi.cairo;
 
-r = new Gdk.Rectangle()
+r = new cairo.RectangleInt()
 for (prop in r)
-{
+{ 
 	testsuite.assert(prop == "x" || prop == "y" || prop == "width" || 
-	                 prop == "height" || prop == "intersect" || prop == "union")
+	                 prop == "height")
 }
 
-testsuite.checkAsserts(6)
+testsuite.checkAsserts(4)
diff --git a/tests/javascript/structs/struct-nested-set.js b/tests/javascript/structs/struct-nested-set.js
index 7787fe9..abf50ff 100755
--- a/tests/javascript/structs/struct-nested-set.js
+++ b/tests/javascript/structs/struct-nested-set.js
@@ -1,15 +1,16 @@
 #!/usr/bin/env seed
 
-testsuite = imports.testsuite
-Gdk = imports.gi.Gdk
+testsuite = imports.testsuite;
+Gdk = imports.gi.Gdk;
+cairo = imports.gi.cairo;
 
-e = new Gdk.Event()
-testsuite.assert(e.toString() == "[object seed_union]")
+e = new Gdk.Event();
+testsuite.assert(e.toString() == "[object seed_union]");
 
-e.type = Gdk.EventType.EXPOSE
-testsuite.assert(Gdk.EventType.EXPOSE == e.type)
+e.type = Gdk.EventType.EXPOSE;
+testsuite.assert(Gdk.EventType.EXPOSE == e.type);
 
-r = new Gdk.Rectangle()
+r = new cairo.RectangleInt()
 r.x = 300
 e.rectangle = r
 testsuite.assert(e.rectangle.x == 300)



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