Branch Coverage

lib/HTML/Object/DOM/NodeIteratorShared.pm
Criterion Covered Total %
branch 40 60 66.6


line true false branch
33 0 10 if scalar @_ < 1
40 4 6 if ref $_[0] eq "CODE"
42 0 10 unless $self->_is_a($root, "HTML::Object::DOM::Node")
46 0 10 unless defined $what
48 6 4 unless (defined $filterDef)
53 0 10 unless $self->_is_integer($what)
57 4 6 if (scalar keys %$opts)
62 0 0 if not defined $filterDef and !exists $opts->{'acceptNode'} || ref $opts->{'acceptNode'} ne 'CODE'
63 0 4 if exists $opts->{'acceptNode'} and ref $opts->{'acceptNode'} eq "CODE"
66 6 4 if ($self->_is_object($filterDef)) { }
68 0 6 unless $filterDef->can("acceptNode")
76 0 4 if ref $filterDef ne "CODE"
83 0 10 unless $self->SUPER::init(@_)
110 0 40 if $self->{'_pos'} >= $size
112 0 40 unless $self->_is_integer($whattoshow)
116 0 40 if (ref $filter ne "CODE")
129 5 140 if $tmpPos > $size
132 71 69 unless $self->_check_element($tmpNode)
138 34 35 if not defined $rv or $rv == 2 or $rv == 3
156 2 14 if $self->{'_pos'} <= 0
158 0 14 unless $self->_is_integer($whattoshow)
162 0 14 if (ref $filter ne "CODE")
175 0 44 if $tmpPos < 0
178 0 44 unless $self->_check_element($tmpNode)
184 30 14 if not defined $rv or $rv == 2 or $rv == 3
206 98 93 unless ($whattoshow == 4294967295)
208 41 24 if ($type == 1 and not $whattoshow & 1 or $type == 2 and not $whattoshow & 2 or $type == 3 and not $whattoshow & 4 or $type == 4 and not $whattoshow & 8 or $type == 7 and not $whattoshow & 64 or $type == 8 and not $whattoshow & 128 or $type == 9 and not $whattoshow & 256 or $type == 10 and not $whattoshow & 512 or $type == 11 and not $whattoshow & 1024 or $type == 12 and not $whattoshow & 2048 or $type == 13 and not $whattoshow & 4096)
235 0 10 unless defined $root
243 0 250 if ++$seen->{$addr} > 1
248 0 240 unless $self->_is_a($kid, "HTML::Object::DOM::Node")