2 var list
= new GLib
.List
<string> ();
5 assert (list
.nth_data (1) == "foo");
8 var list2
= new GLib
.List
<unowned
string> ();
10 list2
.prepend ("bar");
11 assert (list2
.nth_data (1) == "foo");
16 var list
= new GLib
.SList
<string> ();
19 assert (list
.nth_data (1) == "foo");
22 var list2
= new GLib
.SList
<unowned
string> ();
23 list2
.prepend ("foo");
24 list2
.prepend ("bar");
25 assert (list2
.nth_data (1) == "foo");
30 var queue
= new GLib
.Queue
<string> ();
31 queue
.push_head ("foo");
32 queue
.push_head ("bar");
33 assert (queue
.peek_nth (1) == "foo");
36 var queue2
= new GLib
.Queue
<unowned
string> ();
37 queue2
.push_head ("foo");
38 queue2
.push_head ("bar");
39 assert (queue2
.peek_nth (1) == "foo");
44 var nodes
= new GLib
.Node
<string> ();
45 nodes
.append_data ("foo");
46 nodes
.append_data ("bar");
47 assert (nodes
.nth_child (1).data
== "bar");
50 var nodes2
= new GLib
.Node
<unowned
string> ();
51 nodes2
.append_data ("foo");
52 nodes2
.append_data ("bar");
53 assert (nodes2
.nth_child (1).data
== "bar");