Branch Coverage

blib/lib/Test/Unit/Assert.pm
Criterion Covered Total %
branch 96 114 84.2


line true false branch
26 77 17 if (not ref $assertion or ref($assertion) =~ /ARRAY/)
27 75 2 defined $assertion ? :
35 10 7 if (eval { do { $assertion->isa('Regexp') } })
41 6 1 if (ref $assertion eq 'CODE')
53 1 0 if (not ref($assertion) =~ /^(GLOB|LVALUE|REF|SCALAR)$/) { }
56 0 1 $assertion->can('do_assertion') ? :
123 4 48 if (not defined $args[0] || defined $args[1]) { }
2 46 elsif (defined $args[0] xor defined $args[1]) { }
30 16 elsif (is_numeric($args[0])) { }
0 16 elsif (eval { do { $args[0]->isa('UNIVERSAL') if ref $args[0] } }) { }
129 0 16 if ref $args[0]
134 0 0 if (overload::Method($args[0], '==')) { }
158 4 35 if (@args == 1) { }
33 2 elsif (@args >= 2 and @args <= 3) { }
162 4 29 if (ref $args[0] eq 'CODE') { }
3 26 elsif (eval { do { $args[1]->isa('Regexp') } }) { }
188 2 35 if (not defined $args[0] || defined $args[1]) { }
4 31 elsif (defined $args[0] xor defined $args[1]) { }
26 5 elsif (is_numeric($args[0])) { }
0 5 elsif (eval { do { $args[0]->isa('UNIVERSAL') if ref $args[0] } }) { }
191 1 1 @args ? :
196 0 5 if ref $args[0]
201 0 0 if (overload::Method($args[0], '==')) { }
232 10 28 unless (ref $this and ref $that)
233 5 5 @_ ? :
241 21 7 if (not $self->_deep_check($this, $that))
242 10 11 @_ ? :
253 11 106 unless (defined $e1 and defined $e2)
254 3 2 unless defined $e1 or defined $e2
259 6 100 if defined $e1 and $e1 eq $DNE or defined $e2 and $e2 eq $DNE
262 42 58 if $e1 eq $e2
263 55 3 if (ref $e1 and ref $e2)
265 4 51 if defined $Seen_Refs{$e1} and $Seen_Refs{$e1} eq $e2_ref
269 24 30 if (UNIVERSAL::isa($e1, 'ARRAY') and UNIVERSAL::isa($e2, 'ARRAY')) { }
23 7 elsif (UNIVERSAL::isa($e1, 'HASH') and UNIVERSAL::isa($e2, 'HASH')) { }
0 7 elsif (UNIVERSAL::isa($e1, 'REF') and UNIVERSAL::isa($e2, 'REF')) { }
0 7 elsif (UNIVERSAL::isa($e1, 'SCALAR') and UNIVERSAL::isa($e2, 'SCALAR')) { }
278 0 0 if $ok
294 0 24 if $a1 eq $a2
297 2 22 $#$a1 > $#$a2 ? :
299 2 42 $_ > $#$a1 ? :
300 2 42 $_ > $#$a2 ? :
304 32 12 if $ok
306 12 32 unless $ok
314 0 23 if $a1 eq $a2
317 3 20 keys %$a1 > keys %$a2 ? :
319 45 0 exists $$a1{$k} ? :
320 43 2 exists $$a2{$k} ? :
324 32 13 if $ok
326 13 32 unless $ok
341 8 14 if ($type eq 'HASH') { }
6 8 elsif ($type eq 'ARRAY') { }
0 8 elsif ($type eq 'REF') { }
342 5 3 unless $did_arrow++
346 4 2 unless $did_arrow++
363 3 15 $val eq $DNE ? :
4 18 !defined($val) ? :