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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
/*
* Copyright (C) 2012 Jens Georg <mail@jensge.org>
*
* Author: Jens Georg <mail@jensge.org>
*
* This file is part of Rygel.
*
* Rygel is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* Rygel is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
private class Rygel.Regression {
private MainLoop loop;
public static int main (string[] args) {
var test = new Regression ();
test.run ();
return 0;
}
public void run () {
this.loop = new MainLoop ();
test_661482.begin ();
loop.run ();
}
public async void test_661482 () {
var container = new SimpleContainer ("0", null, "0");
var item_1 = new ImageItem ("Z", container, "Z");
var item_2 = new ImageItem ("M", container, "M");
var item_3 = new ImageItem ("A", container, "A");
container.add_child_item (item_1);
container.add_child_item (item_2);
container.add_child_item (item_3);
try {
var list = yield container.get_children (0, 3, "+dc:title", null);
for (var i = 0; i < 3; ++i) {
var children = yield container.get_children (i,
1,
"+dc:title",
null);
assert (children[0].title == list[i].title);
}
} catch (Error error) { assert_not_reached (); }
loop.quit ();
}
}
|