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