Branch Coverage

blib/lib/Test/JSON/Schema/Acceptance.pm
Criterion Covered Total %
branch 80 98 81.6


line true false branch
124 1 53 unless -d $self->test_dir
129 4 54 ref $_[0] eq 'CODE' ? :
132 0 7 unless $options->{'validate_data'} or $options->{'validate_json_string'}
135 0 51 if $options->{'validate_data'} and $options->{'validate_json_string'}
137 5 53 if $options->{'skip_tests'}
141 1 57 if ($options->{'add_resource'} and -d $self->additional_resources)
148 4 5 unless $path->is_file and $path =~ /\.json$/u
153 1 4 if $topdir =~ /^draft/u and not grep(($topdir eq $_), @{$self->supported_specifications})
164 27 31 $self->_has_specification ? :
176 3 20 ref $options->{'tests'}{'file'} eq 'ARRAY' ? :
11 21 if $options->{'tests'} and $options->{'tests'}{'file'} and not grep(($_ eq $one_file->{'file'}), ref $options->{'tests'}{'file'} eq "ARRAY" ? @{$$options{"tests"}{"file"}} : $options->{'tests'}{'file'})
184 3 35 ref $options->{'tests'}{'group_description'} eq 'ARRAY' ? :
24 29 if $options->{'tests'} and $options->{'tests'}{'group_description'} and not grep(($_ eq $test_group->{'description'}), ref $options->{'tests'}{'group_description'} eq "ARRAY" ? @{$$options{"tests"}{"group_description"}} : $options->{'tests'}{'group_description'})
195 28 19 if !$o->{'file'} || grep(($_ eq $one_file->{'file'}), ref $o->{'file'} eq 'ARRAY' ? @{$$o{'file'}} : $o->{'file'}) and !$o->{'group_description'} || grep(($_ eq $test_group->{'description'}), ref $o->{'group_description'} eq 'ARRAY' ? @{$$o{'group_description'}} : $o->{'group_description'})
196 16 898 if $options->{'todo_tests'} and &any(sub {
199 0 914 if ($self->test_schemas)
200 0 0 unless $self->_has_specification
205 0 0 XXX && $test_group->{'schema'}{'$schema'} ? :
209 0 0 $options->{'validate_data'} ? :
210 0 0 unless ($result)
221 33 15 ref $options->{'tests'}{'test_description'} eq 'ARRAY' ? :
31 57 if $options->{'tests'} and $options->{'tests'}{'test_description'} and not grep(($_ eq $test->{'description'}), ref $options->{'tests'}{'test_description'} eq "ARRAY" ? @{$$options{"tests"}{"test_description"}} : $options->{'tests'}{'test_description'})
227 47 2998 if ref $options->{'skip_tests'} eq "ARRAY" and grep((($test_group->{'description'} . " - " . $test->{'description'}) =~ /$_/u), @{$$options{"skip_tests"}})
237 33 3 ref $o->{'test_description'} eq 'ARRAY' ? :
84 57 if !$o->{'file'} || grep(($_ eq $one_file->{'file'}), ref $o->{'file'} eq 'ARRAY' ? @{$$o{'file'}} : $o->{'file'}) and !$o->{'group_description'} || grep(($_ eq $test_group->{'description'}), ref $o->{'group_description'} eq 'ARRAY' ? @{$$o{'group_description'}} : $o->{'group_description'})
239 61 2984 if $options->{'todo_tests'} and &any(sub {
242 0 3045 if $schema_fails
244 34 1140 $todo ? :
1871 1174 $result ? :
253 0 58 $self->verbose ? :
257 45 13 if (not $self->test_dir =~ /\boptional\b/u and grep((!($_->{'file'} =~ m[^optional/]u) && $_->{'todo_fail'} + $_->{'fail'}), @results)) { }
357 291 19437 unless (defined $node->[1])
360 2154 17283 if (XXX) { }
8121 9162 elsif (XXX) { }
1508 7654 elsif (XXX) { }
362 0 2154 if tied @{$$node[1]}
366 2 8119 if tied %{$$node[1]}
373 8 7646 unless $flags & 1024 xor $flags & 768
445 2 623 if &any(sub {
446 24 599 unless $path->is_file
447 1 598 unless $path =~ /\.json$/u
449 11 587 unless @$data
464 0 186 unless $Test::JSON::Schema::Acceptance::a->[0] <=> $Test::JSON::Schema::Acceptance::b->[0]
477 3 31 if ($submodule_status->exists and $submodule_status->parent->subsumes($self->test_dir)) { }
0 62 elsif ($test_dir eq $orig_dir and not -d '.git') { }
488 31 3 if ($test_dir ne $orig_dir)
489 0 31 if ($orig_dir->subsumes($test_dir)) { }
31 0 elsif ('Path::Tiny'->cwd->subsumes($test_dir)) { }
497 2 32 $self->include_optional ? :