Condition Coverage

lib/JSON/Structure/InstanceValidator.pm
Criterion Covered Total %
condition 116 244 47.5


and 3 conditions

line !l l&&!r l&&r condition
34 0 1056 29 defined $value and builtin::blessed($value)
52 0 0 247 defined $value and not ref $value
73 0 0 97 defined $value and not ref $value
81 11 0 86 $flags & 1024 && !($flags & 768)
200 10 468 3 ref $schema eq "HASH" and exists $schema->{'$root'}
280 28 645 5 exists $schema->{'type'} and ref $schema->{'type'} eq "HASH"
673 0 5 exists $schema->{'type'} and ref $schema->{'type'} eq "HASH" and exists $schema->{'type'}{'$ref'}
460 0 0 0 defined $value && !ref($value)
468 0 0 0 defined $value && !ref($value) && &looks_like_number($value)
472 0 0 0 defined $value && !ref($value) && &looks_like_number($value) && $value == int $value
494 1 4 0 ref $value eq "" and $value eq "null"
514 0 7 97 defined $value and not ref $value
7 11 86 defined $value and not ref $value and _is_pure_string($value)
640 81 0 10 $type eq "decimal" and defined $value
81 0 10 $type eq "decimal" and defined $value and not ref $value
653 0 1 81 defined $value and not ref $value
1 10 71 defined $value and not ref $value and _is_numeric($value)
667 156 0 22 $type eq 'int64' || $type eq 'uint64' and defined $value
156 0 22 $type eq 'int64' || $type eq 'uint64' and defined $value and not ref $value
0 4 18 $type eq 'int64' || $type eq 'uint64' and defined $value and not ref $value and $value =~ /^-?\d+$/u
693 0 4 156 defined $value and not ref $value
4 14 142 defined $value and not ref $value and _is_numeric($value)
754 0 0 0 $type eq "uint128" and $num_value < 0
805 0 13 6 $mult != 0 and $value / $mult != int $value / $mult
975 0 0 0 defined $max_contains and $contains_count > $max_contains
1097 0 0 3 ref $key_schema eq "HASH" and exists $key_schema->{'pattern'}
1169 0 0 11 defined $choices and ref $choices eq "HASH"
1200 0 0 6 defined $choice_name and not ref $choice_name
1260 0 0 15 defined $value and not ref $value
1304 0 0 18 defined $value and not ref $value
1320 0 0 12 defined $value and not ref $value
1339 0 0 18 defined $value and not ref $value
1346 5 1 12 $value =~ /$DURATION_REGEX/u and $value ne "P"
6 0 12 $value =~ /$DURATION_REGEX/u and $value ne "P" and $value ne "PT"
1358 0 0 15 defined $value and not ref $value
1374 0 0 15 defined $value and not ref $value
1390 0 0 11 defined $value and not ref $value
1412 1 6 2 $valid and length($value) % 4 != 0
1417 3 1 5 $valid and $value =~ /=/u
1437 0 0 14 defined $value and not ref $value
1544 0 0 2 $if_matched and exists $schema->{'then'}
0 0 0 not $if_matched and exists $schema->{'else'}
1564 0 0 8 @segments and $segments[0] eq ""
1599 0 0 31 defined $a and defined $b
1670 14 0 0 ref $value eq "" and $value eq '0' || $value eq 'false' || $value eq ''
1673 2 5 7 _is_json_bool($value) and not $value

or 2 conditions

line l !l condition
153 67 48 $args{'extended'} // 0
0 115 $args{'allow_import'} // 0
0 115 $args{'max_validation_depth'} // 64
822 52 11 $schema->{'properties'} // {}
823 22 41 $schema->{'required'} // []
963 0 0 $schema->{'minContains'} // 1
1124 7 0 $schema->{'properties'} // {}
1125 7 0 $schema->{'tuple'} // []

or 3 conditions

line l !l&&r !l&&!r condition
262 0 10 678 not ref $schema or _is_json_bool($schema)
370 61 13 446 $type eq "number" or $type eq "float"
74 7 439 $type eq "number" or $type eq "float" or $type eq "double"
20 0 439 $type eq "number" or $type eq "float" or $type eq "double" or $type eq "float8"
7 10 429 $type eq "number" or $type eq "float" or $type eq "double" or $type eq "float8" or $type eq "decimal"
5 0 424 $type eq "integer" or exists $INT_RANGES{$type}
0 0 251 $type eq "int128" or $type eq "uint128"
449 0 0 0 $type eq "number" or $type eq "float"
0 0 0 $type eq "number" or $type eq "float" or $type eq "double"
0 0 0 $type eq "number" or $type eq "float" or $type eq "double" or $type eq "float8"
0 0 0 $type eq "number" or $type eq "float" or $type eq "double" or $type eq "float8" or $type eq "decimal"
0 0 0 $type eq "integer" or exists $INT_RANGES{$type}
0 0 0 $type eq "object" or $type eq "map"
0 0 0 $type eq "object" or $type eq "map" or $type eq "choice"
0 0 0 $type eq "array" or $type eq "set"
0 0 0 $type eq "array" or $type eq "set" or $type eq "tuple"
450 0 0 0 !defined($value) || ref $value eq '' && $value eq 'null'
453 0 0 0 _is_json_bool($value) || defined $value && !ref($value) && ($value eq 'true' || $value eq 'false' || $value =~ /^[01]$/u)
494 2 0 5 not defined $value or ref $value eq "" and $value eq "null"
643 6 3 1 _is_numeric($value) or $value =~ /^-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/u
667 13 9 156 $type eq 'int64' || $type eq 'uint64'
681 3 0 15 $big_val < $big_min or $big_val > $big_max
711 8 8 123 $value < $range->{'min'} or $value > $range->{'max'}
743 0 0 0 &looks_like_number($value) or $value =~ /^-?\d+$/u
1132 3 0 0 not defined $items or _is_false($items)
1289 0 0 7 $month < 1 or $month > 12
1290 0 0 7 $day < 1 or $day > 31
1561 0 0 8 $ref eq "" or $ref eq "/"
1596 31 0 0 defined $a or defined $b
1670 0 0 0 $value eq '0' || $value eq 'false' || $value eq ''