/usr/share/seed-gtk4-tests/javascript/gtypes/gtype-property-construct.js is in libseed-gtk4-0 4.0.0+20161014+6c77960+dfsg1-5build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | #!/usr/bin/env seed
testsuite = imports.testsuite
Gtk = imports.gi.Gtk
GObject = imports.gi.GObject
Gtk.init(Seed.argv)
HelloWindow = new GType({
parent: Gtk.Window.type,
name: "HelloWindow",
properties: [
{
name: "test",
type: GObject.TYPE_BOOLEAN,
nick: "test property",
blurb: "A test property!",
default_value: false,
flags: (GObject.ParamFlags.CONSTRUCT | GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE)
}
],
init: function()
{
testsuite.assert(this.test == true)
}
})
w = new HelloWindow({test: true})
testsuite.assert(w.test == true)
try
{
w.test = "arst"
}
catch(e)
{
testsuite.assert(e.name == "ConversionError")
}
testsuite.checkAsserts(3)
|