summaryrefslogtreecommitdiff
path: root/tests/annotations/description.vala
blob: 3556bbb6a477a6af69be2cdd005e8d281a716204 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
class Foo : Object {
	[Description (nick = "foo's nick", blurb = "foo's blurb")]
	public int foo { get; set; }
}

void main () {
	var foo = new Foo ();
	(unowned ParamSpec)[] properties = foo.get_class ().list_properties ();
	foreach (unowned ParamSpec p in properties) {
		assert (p.get_name () == "foo");
		assert (p.get_nick () == "foo's nick");
		assert (p.get_blurb () == "foo's blurb");
	}
}