Lines Matching refs:test_rbtree
16 static struct rbtree test_rbtree; variable
126 _CHECK(test_rbtree.root); in check_rb()
127 _CHECK(z_rb_is_black(test_rbtree.root)); in check_rb()
129 check_rbnode(test_rbtree.root, 0); in check_rb()
143 RB_FOR_EACH(&test_rbtree, n) { in _check_tree()
147 rb_walk(&test_rbtree, visit_node, &nwalked); in _check_tree()
167 _CHECK(get_node_mask(i) == rb_contains(&test_rbtree, &nodes[i])); in _check_tree()
177 if (test_rbtree.root) { in _check_tree()
203 (void)memset(&test_rbtree, 0, sizeof(test_rbtree)); in test_tree()
204 test_rbtree.lessthan_fn = node_lessthan; in test_tree()
213 rb_insert(&test_rbtree, &nodes[node]); in test_tree()
216 rb_remove(&test_rbtree, &nodes[node]); in test_tree()
263 (void)memset(&test_rbtree, 0, sizeof(test_rbtree)); in ZTEST()
264 test_rbtree.lessthan_fn = node_lessthan; in ZTEST()
267 zassert_true(rb_get_min(&test_rbtree) == NULL, "the tree is invalid"); in ZTEST()
270 rb_insert(&test_rbtree, &nodes[i]); in ZTEST()
273 rb_remove(&test_rbtree, &temp); in ZTEST()
276 zassert_true(rb_get_min(&test_rbtree) == &nodes[0], "the tree is invalid"); in ZTEST()
277 zassert_true(rb_get_max(&test_rbtree) == &nodes[7], "the tree is invalid"); in ZTEST()