blib/lib/JSON/Schema/Modern/Vocabulary/Validation.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 98 | 125 | 78.4 |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
71 | 260 | 24 | 9 | $_ eq "boolean" and $state->{'scalarref_booleans'} |
24 | 7 | 2 | $_ eq "boolean" and $state->{'scalarref_booleans'} and $type eq "reference to SCALAR" | |
289 | 5 | 0 | $_ eq "number" and $type eq "integer" | |
214 | 72 | 8 | $type eq "string" and $state->{'stringy_numbers'} | |
72 | 4 | 4 | $type eq "string" and $state->{'stringy_numbers'} and &looks_like_number($data) | |
76 | 4 | 0 | $type eq "string" and $state->{'stringy_numbers'} and &looks_like_number($data) and $_ eq 'number' || $_ eq 'integer' && $data == int $data | |
79 | 1243 | 171 | 244 | $schema->{'type'} eq "number" and $type eq "integer" |
883 | 527 | 4 | $type eq "string" and $state->{'stringy_numbers'} | |
527 | 2 | 2 | $type eq "string" and $state->{'stringy_numbers'} and &looks_like_number($data) | |
529 | 2 | 0 | $type eq "string" and $state->{'stringy_numbers'} and &looks_like_number($data) and $schema->{'type'} eq 'number' || $schema->{'type'} eq 'integer' && $data == int $data | |
1290 | 114 | 9 | $schema->{'type'} eq "boolean" and $state->{'scalarref_booleans'} | |
114 | 7 | 2 | $schema->{'type'} eq "boolean" and $state->{'scalarref_booleans'} and $type eq "reference to SCALAR" | |
116 | 206 | 0 | 2 | $state->{'stringy_numbers'} and is_type("string", $data) |
206 | 0 | 2 | $state->{'stringy_numbers'} and is_type("string", $data) and &looks_like_number($data) | |
0 | 0 | 2 | $state->{'stringy_numbers'} and is_type("string", $data) and &looks_like_number($data) and do { | |
142 | 211 | 0 | 1 | $state->{'stringy_numbers'} and is_type("string", $data) |
211 | 0 | 1 | $state->{'stringy_numbers'} and is_type("string", $data) and &looks_like_number($data) | |
151 | 205 | 0 | 1 | $state->{'stringy_numbers'} and is_type("string", $data) |
205 | 0 | 1 | $state->{'stringy_numbers'} and is_type("string", $data) and &looks_like_number($data) | |
160 | 220 | 0 | 1 | $state->{'stringy_numbers'} and is_type("string", $data) |
220 | 0 | 1 | $state->{'stringy_numbers'} and is_type("string", $data) and &looks_like_number($data) | |
169 | 205 | 0 | 1 | $state->{'stringy_numbers'} and is_type("string", $data) |
205 | 0 | 1 | $state->{'stringy_numbers'} and is_type("string", $data) and &looks_like_number($data) | |
193 | 0 | 1 | 989 | assert_keyword_type($state, $schema, "string") and assert_pattern($state, $schema->{'pattern'}) |
line | l | !l | condition |
---|---|---|---|
52 | 0 | 2 | $type // "<null>" |
2149 | 14 | $type // "" | |
59 | 4 | 0 | $schema->{'type'} // "<null>" |
26221 | 0 | $schema->{'type'} // "" |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
71 | 1407 | 0 | 294 | $type eq $_ or $_ eq "number" and $type eq "integer" |
1 | 0 | 3 | $_ eq 'number' || $_ eq 'integer' && $data == int $data | |
0 | 0 | 294 | $type eq $_ or $_ eq "number" and $type eq "integer" or $type eq "string" and $state->{'stringy_numbers'} and &looks_like_number($data) and $_ eq 'number' || $_ eq 'integer' && $data == int $data | |
79 | 3758 | 244 | 1414 | $type eq $schema->{'type'} or $schema->{'type'} eq "number" and $type eq "integer" |
1 | 0 | 1 | $schema->{'type'} eq 'number' || $schema->{'type'} eq 'integer' && $data == int $data | |
244 | 0 | 1414 | $type eq $schema->{'type'} or $schema->{'type'} eq "number" and $type eq "integer" or $type eq "string" and $state->{'stringy_numbers'} and &looks_like_number($data) and $schema->{'type'} eq 'number' || $schema->{'type'} eq 'integer' && $data == int $data | |
0 | 20 | 1393 | $type eq $schema->{'type'} or $schema->{'type'} eq "number" and $type eq "integer" or $type eq "string" and $state->{'stringy_numbers'} and &looks_like_number($data) and $schema->{'type'} eq 'number' || $schema->{'type'} eq 'integer' && $data == int $data or $schema->{'type'} eq "boolean" and $state->{'scalarref_booleans'} and $type eq "reference to SCALAR" | |
116 | 698 | 4 | 204 | is_type("number", $data) or $state->{'stringy_numbers'} and is_type("string", $data) and &looks_like_number($data) and do { |
119 | 30 | 18 | 652 | ref($data) =~ /^Math::Big(?:Int|Float)$/u or ref($schema->{'multipleOf'}) =~ /^Math::Big(?:Int|Float)$/u |
48 | 0 | 652 | ref($data) =~ /^Math::Big(?:Int|Float)$/u or ref($schema->{'multipleOf'}) =~ /^Math::Big(?:Int|Float)$/u or get_type($data) eq "number" | |
18 | 4 | 648 | ref($data) =~ /^Math::Big(?:Int|Float)$/u or ref($schema->{'multipleOf'}) =~ /^Math::Big(?:Int|Float)$/u or get_type($data) eq "number" or get_type($schema->{'multipleOf'}) eq "number" | |
142 | 479 | 2 | 210 | is_type("number", $data) or $state->{'stringy_numbers'} and is_type("string", $data) and &looks_like_number($data) |
151 | 308 | 2 | 204 | is_type("number", $data) or $state->{'stringy_numbers'} and is_type("string", $data) and &looks_like_number($data) |
160 | 546 | 2 | 219 | is_type("number", $data) or $state->{'stringy_numbers'} and is_type("string", $data) and &looks_like_number($data) |
169 | 247 | 2 | 204 | is_type("number", $data) or $state->{'stringy_numbers'} and is_type("string", $data) and &looks_like_number($data) |