Branch Coverage

blib/lib/Tree/RedBlack.pm
Criterion Covered Total %
branch 65 94 69.1


line true false branch
107 2 0 if ($_[0]{'root'})
126 1 9 $cmp ? :
3 7 if ($cmp ? &$cmp($key, $node->key) < 0 : $key lt $node->key) { }
132 6 2 if ($parent) { }
134 1 5 $cmp ? :
1 5 if ($cmp ? &$cmp($parent->key, $key) == 0 : $parent->key eq $key)
140 1 4 $$this{'cmp'} ? :
2 3 if ($$this{'cmp'} ? $$this{'cmp'}($key, $parent->key) < 0 : $key lt $parent->key) { }
151 1 2 if (defined $node->parent->parent->left and $node->parent == $node->parent->parent->left) { }
153 0 1 if ($uncle and $uncle->color) { }
159 1 0 if ($node == $node->parent->right)
169 1 1 if ($uncle and $uncle->color) { }
175 0 1 if (defined $node->parent->left and $node == $node->parent->left)
193 1 2 if ($child->left)
197 1 2 if ($node->parent) { }
198 1 0 if ($node == $node->parent->left) { }
214 0 1 if ($child->right)
218 1 0 if ($node->parent) { }
219 1 0 if ($node == $node->parent->right) { }
234 0 1 if (ref $node_or_key and $node_or_key->isa('Tree::RedBlack::Node')) { }
237 0 1 unless $node = $this->node($node_or_key)
240 1 0 if (not $node->left && $node->right) { }
245 0 1 if ($successor->left) { }
251 0 1 if (not $successor_child && $successor_child->parent) { }
1 0 elsif ($successor == $successor->parent->left) { }
258 0 1 if ($successor != $node)
262 1 0 unless ($successor->color)
265 0 1 unless ($successor_child->parent)
274 1 0 if ($x == $x->parent->left) { }
276 0 1 if ($w->color)
281 0 1 if (not $w->left->color || $w->right->color) { }
285 0 1 unless ($w->right->color)
299 0 0 if ($w->color)
304 0 0 if (not $w->left->color || $w->right->color) { }
308 0 0 unless ($w->left->color)
327 5 1 if ($$this{'root'})
328 4 1 if ($$this{'root'}->left) { }
339 5 1 if ($$this{'root'})
340 2 3 if ($$this{'root'}->right) { }
354 0 8 $cmp ? :
0 4 $cmp ? :
4 4 if ($cmp ? &$cmp($key, $node->key) == 0 : $key eq $node->key) { }
1 3 elsif ($cmp ? &$cmp($key, $node->key) < 0 : $key lt $node->key) { }
371 3 7 $cmp ? :
1 5 $cmp ? :
4 6 if ($cmp ? &$cmp($key, $node->key) == 0 : $key eq $node->key) { }
4 2 elsif ($cmp ? &$cmp($key, $node->key) < 0 : $key lt $node->key) { }