Lines Matching full:node

14 	sys_sfnode_t node;  member
25 sys_sfnode_t *node; in verify_emptyness() local
48 SYS_SFLIST_FOR_EACH_NODE(list, node) { in verify_emptyness()
56 SYS_SFLIST_FOR_EACH_NODE_SAFE(list, node, s_node) { in verify_emptyness()
65 SYS_SFLIST_FOR_EACH_CONTAINER(list, cnode, node) { in verify_emptyness()
74 SYS_SFLIST_FOR_EACH_CONTAINER_SAFE(list, cnode, s_cnode, node) { in verify_emptyness()
87 sys_sfnode_t *node; in verify_content_amount() local
110 SYS_SFLIST_FOR_EACH_NODE(list, node) { in verify_content_amount()
119 SYS_SFLIST_FOR_EACH_NODE_SAFE(list, node, s_node) { in verify_content_amount()
128 SYS_SFLIST_FOR_EACH_CONTAINER(list, cnode, node) { in verify_content_amount()
137 SYS_SFLIST_FOR_EACH_CONTAINER_SAFE(list, cnode, s_cnode, node) { in verify_content_amount()
196 /* Appending node 1 */ in ZTEST()
197 sys_sflist_append(&test_list, &test_node_1.node); in ZTEST()
201 zassert_true((verify_tail_head(&test_list, &test_node_1.node, in ZTEST()
202 &test_node_1.node, true)), in ZTEST()
205 /* Finding and removing node 1 */ in ZTEST()
206 sys_sflist_find_and_remove(&test_list, &test_node_1.node); in ZTEST()
210 /* Prepending node 1 */ in ZTEST()
211 sys_sflist_prepend(&test_list, &test_node_1.node); in ZTEST()
215 zassert_true((verify_tail_head(&test_list, &test_node_1.node, in ZTEST()
216 &test_node_1.node, true)), in ZTEST()
219 /* Removing node 1 */ in ZTEST()
220 sys_sflist_remove(&test_list, NULL, &test_node_1.node); in ZTEST()
224 /* Appending node 1 */ in ZTEST()
225 sys_sflist_append(&test_list, &test_node_1.node); in ZTEST()
226 /* Prepending node 2 */ in ZTEST()
227 sys_sflist_prepend(&test_list, &test_node_2.node); in ZTEST()
232 zassert_true((verify_tail_head(&test_list, &test_node_2.node, in ZTEST()
233 &test_node_1.node, false)), in ZTEST()
236 /* Appending node 3 */ in ZTEST()
237 sys_sflist_append(&test_list, &test_node_3.node); in ZTEST()
242 zassert_true((verify_tail_head(&test_list, &test_node_2.node, in ZTEST()
243 &test_node_3.node, false)), in ZTEST()
246 zassert_true((sys_sflist_peek_next(&test_node_2.node) == in ZTEST()
247 &test_node_1.node), in ZTEST()
248 "test_list node links are wrong"); in ZTEST()
250 /* Inserting node 4 after node 2, peek with nocheck variant */ in ZTEST()
251 sys_sflist_insert(&test_list, &test_node_2.node, &test_node_4.node); in ZTEST()
253 zassert_true((verify_tail_head(&test_list, &test_node_2.node, in ZTEST()
254 &test_node_3.node, false)), in ZTEST()
257 zassert_true((sys_sflist_peek_next_no_check(&test_node_2.node) == in ZTEST()
258 &test_node_4.node), in ZTEST()
259 "test_list node links are wrong"); in ZTEST()
261 /* Finding and removing node 1 */ in ZTEST()
262 sys_sflist_find_and_remove(&test_list, &test_node_1.node); in ZTEST()
266 zassert_true((verify_tail_head(&test_list, &test_node_2.node, in ZTEST()
267 &test_node_3.node, false)), in ZTEST()
270 /* Removing node 3 */ in ZTEST()
271 sys_sflist_remove(&test_list, &test_node_4.node, &test_node_3.node); in ZTEST()
275 zassert_true((verify_tail_head(&test_list, &test_node_2.node, in ZTEST()
276 &test_node_4.node, false)), in ZTEST()
279 /* Removing node 4 */ in ZTEST()
280 sys_sflist_remove(&test_list, &test_node_2.node, &test_node_4.node); in ZTEST()
284 zassert_true((verify_tail_head(&test_list, &test_node_2.node, in ZTEST()
285 &test_node_2.node, true)), in ZTEST()
288 /* Removing node 2 */ in ZTEST()
289 sys_sflist_remove(&test_list, NULL, &test_node_2.node); in ZTEST()
293 /* test iterator from a node */ in ZTEST()
295 sys_sfnode_t node; in ZTEST() member
305 sys_sfnode_t *node = NULL; in ZTEST() local
311 sys_sflist_append(&test_list, &data_node[ii].node); in ZTEST()
315 SYS_SFLIST_ITERATE_FROM_NODE(&test_list, node) { in ZTEST()
317 if (((struct data_node *)node)->data == 2) { in ZTEST()
324 SYS_SFLIST_ITERATE_FROM_NODE(&test_list, node) { in ZTEST()
326 if (((struct data_node *)node)->data == 3) { in ZTEST()
333 SYS_SFLIST_ITERATE_FROM_NODE(&test_list, node) { in ZTEST()
340 node = sys_sflist_get_not_empty(&test_list); in ZTEST()
341 zassert_equal(((struct data_node *)node)->data, ii, ""); in ZTEST()
345 sys_sflist_append(&test_list, &data_node[ii].node); in ZTEST()
348 node = sys_sflist_get(&test_list); in ZTEST()
349 zassert_equal(((struct data_node *)node)->data, ii, ""); in ZTEST()
351 node = sys_sflist_get(&test_list); in ZTEST()
352 zassert_equal(node, NULL, ""); in ZTEST()
366 sys_sflist_append(&test_list, &data_node[ii].node); in ZTEST()
367 /* Build append_list so that the node pointers are correct */ in ZTEST()
368 sys_sflist_append(&append_list, &data_node_append[ii].node); in ZTEST()
370 sys_sflist_append_list(&test_list, &data_node_append[0].node, in ZTEST()
371 &data_node_append[5].node); in ZTEST()
373 node = sys_sflist_get(&test_list); in ZTEST()
374 zassert_equal(((struct data_node *)node)->data, ii, in ZTEST()
376 ((struct data_node *)node)->data); in ZTEST()
384 sys_sflist_append(&test_list, &data_node[ii].node); in ZTEST()
385 sys_sflist_append(&append_list, &data_node_append[ii].node); in ZTEST()
389 node = sys_sflist_get(&test_list); in ZTEST()
390 zassert_equal(((struct data_node *)node)->data, ii, in ZTEST()
392 ((struct data_node *)node)->data); in ZTEST()
403 sys_sfnode_init(&data_node[ii].node, ii); in ZTEST()
404 sys_sflist_append(&test_list, &data_node[ii].node); in ZTEST()
407 node = sys_sflist_get(&test_list); in ZTEST()
408 zassert_equal(sys_sfnode_flags_get(node), ii, in ZTEST()
413 sys_sfnode_flags_set(node, 3 - ii); in ZTEST()
414 sys_sflist_append(&test_list, node); in ZTEST()
417 node = sys_sflist_get(&test_list); in ZTEST()
418 zassert_equal(sys_sfnode_flags_get(node), ii, in ZTEST()