Lines Matching full:parent
36 struct parent { struct
51 struct parent parent, tmp; in test_xorg_list_init() argument
53 memset(&parent, 0, sizeof(parent)); in test_xorg_list_init()
54 parent.a = 0xa5a5a5; in test_xorg_list_init()
55 parent.b = ~0xa5a5a5; in test_xorg_list_init()
57 tmp = parent; in test_xorg_list_init()
59 xorg_list_init(&parent.children); in test_xorg_list_init()
62 assert(parent.a == tmp.a); in test_xorg_list_init()
63 assert(parent.b == tmp.b); in test_xorg_list_init()
65 assert(xorg_list_is_empty(&parent.children)); in test_xorg_list_init()
71 struct parent parent = { 0 }; in test_xorg_list_add() local
75 xorg_list_init(&parent.children); in test_xorg_list_add()
77 xorg_list_add(&child[0].node, &parent.children); in test_xorg_list_add()
78 assert(!xorg_list_is_empty(&parent.children)); in test_xorg_list_add()
80 c = xorg_list_first_entry(&parent.children, struct child, node); in test_xorg_list_add()
85 xorg_list_add(&child[1].node, &parent.children); in test_xorg_list_add()
86 c = xorg_list_first_entry(&parent.children, struct child, node); in test_xorg_list_add()
90 xorg_list_add(&child[2].node, &parent.children); in test_xorg_list_add()
91 c = xorg_list_first_entry(&parent.children, struct child, node); in test_xorg_list_add()
99 struct parent parent = { 0 }; in test_xorg_list_append() local
104 xorg_list_init(&parent.children); in test_xorg_list_append()
106 xorg_list_append(&child[0].node, &parent.children); in test_xorg_list_append()
107 assert(!xorg_list_is_empty(&parent.children)); in test_xorg_list_append()
109 c = xorg_list_first_entry(&parent.children, struct child, node); in test_xorg_list_append()
112 c = xorg_list_last_entry(&parent.children, struct child, node); in test_xorg_list_append()
116 xorg_list_append(&child[1].node, &parent.children); in test_xorg_list_append()
117 c = xorg_list_first_entry(&parent.children, struct child, node); in test_xorg_list_append()
120 c = xorg_list_last_entry(&parent.children, struct child, node); in test_xorg_list_append()
124 xorg_list_append(&child[2].node, &parent.children); in test_xorg_list_append()
125 c = xorg_list_first_entry(&parent.children, struct child, node); in test_xorg_list_append()
128 c = xorg_list_last_entry(&parent.children, struct child, node); in test_xorg_list_append()
133 xorg_list_for_each_entry(c, &parent.children, node) { in test_xorg_list_append()
141 struct parent parent = { 0 }; in test_xorg_list_del() local
145 xorg_list_init(&parent.children); in test_xorg_list_del()
147 xorg_list_add(&child[0].node, &parent.children); in test_xorg_list_del()
148 assert(!xorg_list_is_empty(&parent.children)); in test_xorg_list_del()
150 xorg_list_del(&parent.children); in test_xorg_list_del()
151 assert(xorg_list_is_empty(&parent.children)); in test_xorg_list_del()
153 xorg_list_add(&child[0].node, &parent.children); in test_xorg_list_del()
155 assert(xorg_list_is_empty(&parent.children)); in test_xorg_list_del()
157 xorg_list_add(&child[0].node, &parent.children); in test_xorg_list_del()
158 xorg_list_add(&child[1].node, &parent.children); in test_xorg_list_del()
160 c = xorg_list_first_entry(&parent.children, struct child, node); in test_xorg_list_del()
166 assert(!xorg_list_is_empty(&parent.children)); in test_xorg_list_del()
168 c = xorg_list_first_entry(&parent.children, struct child, node); in test_xorg_list_del()
173 xorg_list_add(&child[1].node, &parent.children); in test_xorg_list_del()
175 c = xorg_list_first_entry(&parent.children, struct child, node); in test_xorg_list_del()
180 xorg_list_add(&child[0].node, &parent.children); in test_xorg_list_del()
181 xorg_list_del(&parent.children); in test_xorg_list_del()
182 assert(xorg_list_is_empty(&parent.children)); in test_xorg_list_del()
190 struct parent parent = { 0 }; in test_xorg_list_for_each() local
195 xorg_list_init(&parent.children); in test_xorg_list_for_each()
197 xorg_list_add(&child[2].node, &parent.children); in test_xorg_list_for_each()
198 xorg_list_add(&child[1].node, &parent.children); in test_xorg_list_for_each()
199 xorg_list_add(&child[0].node, &parent.children); in test_xorg_list_for_each()
201 xorg_list_for_each_entry(c, &parent.children, node) { in test_xorg_list_for_each()
207 xorg_list_del(&parent.children); in test_xorg_list_for_each()
208 assert(xorg_list_is_empty(&parent.children)); in test_xorg_list_for_each()
210 xorg_list_for_each_entry(c, &parent.children, node) { in test_xorg_list_for_each()