Branch Coverage

blib/lib/Carp/Assert/More.pm
Criterion Covered Total %
branch 266 274 97.0


line true false branch
121 7 3 if $condition
142 6 2 if (defined $string) { }
143 4 2 if defined $match and $string eq $match
146 1 1 unless defined $match
168 2 6 if defined $string xor defined $unmatch
170 1 4 if defined $string and defined $unmatch and $string ne $unmatch
242 1 112 if (not defined $op) { }
13 99 elsif ($op eq '==') { }
13 86 elsif ($op eq '!=') { }
17 69 elsif ($op eq '<') { }
17 52 elsif ($op eq '<=') { }
18 34 elsif ($op eq '>') { }
17 17 elsif ($op eq '>=') { }
2 15 elsif ($op eq 'lt') { }
2 13 elsif ($op eq 'le') { }
2 11 elsif ($op eq 'gt') { }
2 9 elsif ($op eq 'ge') { }
246 5 6 if &looks_like_number($x) and &looks_like_number($y) and $x == $y
249 5 6 if &looks_like_number($x) and &looks_like_number($y) and $x != $y
252 7 8 if &looks_like_number($x) and &looks_like_number($y) and $x < $y
255 7 8 if &looks_like_number($x) and &looks_like_number($y) and $x <= $y
258 7 9 if &looks_like_number($x) and &looks_like_number($y) and $x > $y
261 7 8 if &looks_like_number($x) and &looks_like_number($y) and $x >= $y
264 1 1 if defined $x and defined $y and $x lt $y
267 1 1 if defined $x and defined $y and $x le $y
270 1 1 if defined $x and defined $y and $x gt $y
273 1 1 if defined $x and defined $y and $x ge $y
299 6 1 if (defined $string and not ref $string)
300 5 1 if (ref $regex)
301 3 2 if $string =~ /$regex/
323 2 5 unless defined $string
325 3 2 if (ref $regex eq "Regexp")
326 1 2 unless $string =~ /$regex/
341 7 2 if defined $_[0]
355 1 3 unless defined $_[0]
372 2 5 if (not defined $this) { }
376 1 4 if (ref $this) { }
380 2 2 if $this ne ""
425 1 4 if $x and $y
443 3 2 if $x or $y
460 1 3 if $x and not $y
461 1 2 if $y and not $x
481 12 9 if &Scalar::Util::looks_like_number($n)
503 18 2 if (defined $this)
504 6 12 if $this =~ /$INTEGER/
526 5 5 if (&Scalar::Util::looks_like_number($this))
527 4 1 if $this != 0
549 5 5 if (&Scalar::Util::looks_like_number($this))
550 3 2 if $this + 0 > 0
574 5 5 if (&Scalar::Util::looks_like_number($this))
575 4 1 if $this >= 0
598 1 9 if defined $this and $this + 0 < 0
619 3 7 if (defined $this and $this =~ /$INTEGER/)
620 2 1 if $this != 0
643 409 9 if (defined $this and $this =~ /$INTEGER/)
644 407 2 if $this > 0
666 3 7 if (defined $this and $this =~ /$INTEGER/)
667 2 1 if $this >= 0
689 3 8 if (defined $this and $this =~ /$INTEGER/)
690 1 2 if $this < 0
715 5 2 if (&Scalar::Util::looks_like_number($n))
716 4 1 if $lo <= $n and $n <= $hi
741 4 3 if (defined $n and $n =~ /$INTEGER/)
742 3 1 if $lo <= $n and $n <= $hi
767 2 4 if builtin::blessed($this) and $this->isa($type)
768 1 3 if ref $this eq $type
788 12 5 if (builtin::blessed($obj))
790 9 3 if $obj->isa($_)
823 6 7 if (builtin::blessed($ref)) { }
832 5 8 if ($underlying_type eq 'HASH') { }
5 3 elsif ($underlying_type eq 'ARRAY') { }
833 2 3 if scalar keys %{$ref;} == 0
838 2 3 if @{$ref;} == 0
846 3 6 if $n and $n > 1
878 4 9 if (builtin::blessed($ref)) { }
887 4 9 if ($underlying_type eq 'HASH') { }
4 5 elsif ($underlying_type eq 'ARRAY') { }
888 2 2 if scalar keys %{$ref;} > 0
892 2 2 if scalar @{$ref;} > 0
915 3 1 unless ref $this
947 3 4 if (ref $ref eq "HASH" or builtin::blessed($ref) and $ref->isa("HASH"))
967 6 4 if (ref $ref eq "HASH" or builtin::blessed($ref) and $ref->isa("HASH"))
968 3 3 if scalar keys %{$ref;} > 0
996 5 8 if (ref $ref eq "ARRAY" or builtin::blessed($ref) and $ref->isa("ARRAY"))
1016 7 4 if (ref $ref eq "ARRAY" or builtin::blessed($ref) and $ref->isa("ARRAY"))
1017 4 3 if scalar @{$ref;} > 0
1045 6 4 if (ref $ref eq "ARRAY" or builtin::blessed($ref) and $ref->isa("ARRAY"))
1048 2 7 unless (builtin::blessed($i) and $i->isa($type) or ref $i eq $type)
1056 6 4 unless ($ok)
1083 6 4 if (ref $ref eq "ARRAY" or builtin::blessed($ref) and $ref->isa("ARRAY"))
1084 4 2 if (scalar @{$ref;} > 0) { }
1087 2 7 unless (builtin::blessed($i) and $i->isa($type) or ref $i eq $type)
1099 8 2 unless ($ok)
1133 6 4 if (ref $aref eq 'ARRAY' or builtin::blessed($aref) and $aref->isa('ARRAY')) { }
1134 4 2 if (@{$aref;}) { }
1135 2 2 defined $name ? :
1150 6 2 if (@why)
1172 4 4 if (ref $ref eq "ARRAY" or builtin::blessed($ref) and $ref->isa("ARRAY"))
1175 2 0 unless (ref $val eq "HASH" or builtin::blessed($val) and $val->isa("HASH"))
1182 2 6 if $ok
1199 12 6 if (ref $ref eq "CODE" or builtin::blessed($ref) and $ref->isa("CODE"))
1220 6 9 if (ref $ref eq "Regexp")
1241 0 0 if (ref $ref eq "DateTime" or builtin::blessed($ref) and $ref->isa("DateTime"))
1270 12 0 unless (ref $needle)
1273 10 2 if (ref $haystack eq "ARRAY" or builtin::blessed($haystack) and $haystack->isa("ARRAY"))
1278 1 27 if (ref $element)
1285 9 1 if ($elements_ok)
1286 7 2 if (defined $needle) { }
1288 5 12 if ($needle eq $element)
1296 1 4 unless (defined $element)
1306 6 6 if $found
1334 10 0 if (ref $hash eq "HASH" or builtin::blessed($hash) and $hash->isa("HASH"))
1335 9 1 if (defined $key)
1336 5 4 if (ref $key eq 'ARRAY') { }
3 1 elsif (not ref $key) { }
1339 2 5 unless (exists $hash->{$_})
1354 4 6 if $ok
1382 6 0 if (ref $hash eq "HASH" or builtin::blessed($hash) and $hash->isa("HASH"))
1383 6 0 if (defined $key)
1384 4 2 if (ref $key eq 'ARRAY') { }
2 0 elsif (not ref $key) { }
1387 1 5 if (exists $hash->{$_})
1402 3 3 if $ok
1428 8 1 if (ref $hash eq 'HASH' or builtin::blessed($hash) and $hash->isa('HASH')) { }
1429 7 1 if (ref $keys eq 'ARRAY') { }
1433 9 9 unless (exists $keys{$key})
1447 3 6 if $ok
1467 14 1 if (ref $hash eq 'HASH' or builtin::blessed($hash) and $hash->isa('HASH')) { }
1468 13 1 if (ref $keys eq 'ARRAY') { }
1474 16 17 unless (exists $keys{$key})
1482 21 17 unless (exists $hash->{$key})
1496 3 12 if $ok
1538 4 3 if defined $wantarray
1580 2 5 unless defined $wantarray
1622 2 5 if defined $wantarray and not $wantarray
1663 2 5 if $wantarray
1693 64 288 if defined $name