Revert "tests: make check should test against version in build tree, not installed"
[gnome.seed] / tests / javascript / gtypes / gtype-property.js
1 #!/usr/bin/env seed
2
3 testsuite = imports.testsuite
4 Gtk = imports.gi.Gtk
5 GObject = imports.gi.GObject
6 Gtk.init(Seed.argv)
7
8 HelloWindow = new GType({
9     parent: Gtk.Window.type,
10     name: "HelloWindow",
11     class_init: function(klass, prototype)
12     {
13         klass.c_install_property(GObject.param_spec_boolean(
14             "test",
15             "test property",
16             "A test property!",
17             false,
18             GObject.ParamFlags.READABLE | 
19                 GObject.ParamFlags.WRITABLE))
20     },
21     init: function()
22     {
23     }
24 })
25
26 w = new HelloWindow({test: true})
27 testsuite.assert(w.test == true)
28 w = new HelloWindow()
29 testsuite.assert(w.test == false)
30