aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/unittest/rbtree_test.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/unittest/rbtree_test.c b/src/plugins/unittest/rbtree_test.c
index 490be9c156e..bfab98c3cd7 100644
--- a/src/plugins/unittest/rbtree_test.c
+++ b/src/plugins/unittest/rbtree_test.c
@@ -160,7 +160,11 @@ rbtree_test_basic (vlib_main_t * vm, unformat_input_t * input)
* Delete all keys
*/
for (i = 0; i < n_keys; i++)
- rb_tree_del (rt, i);
+ {
+ rb_tree_del (rt, i);
+ if (rt->nodes[RBTREE_TNIL_INDEX].color != RBTREE_BLACK)
+ RBTREE_TEST (0, "tnil should be black");
+ }
RBTREE_TEST (rb_tree_n_nodes (rt) == 1, "number nodes %u is %u",
1, rb_tree_n_nodes (rt));