Branch Coverage

inc/lib/TestML/Run.pm
Criterion Covered Total %
branch 58 160 36.2


line true false branch
75 0 2 unless open INPUT, $file
107 60 12 unless defined $context
109 31 41 unless $self->type($expr) eq "expr"
115 35 6 if (my $call = $vtable->{$opcode}) { }
116 0 35 if ref $call eq "ARRAY"
122 0 6 if (defined(my $value = $self->{'vars'}{$name})) { }
6 0 elsif ($name =~ /^[a-z]/) { }
0 0 elsif ($name =~ /^[A-Z]/) { }
123 0 0 if (@args) { }
124 0 0 unless $self->type($value) eq "func"
148 0 0 unless defined $args
152 0 0 if (@$signature > 1 and @$args == 1 and $self->type($args) eq "list")
156 0 0 if @$signature != @$args
175 2 4 unless ($self->{'bridge'})
178 0 2 if (my $code = $self->{'ast'}{'bridge'}{'perl'}) { }
179 0 0 unless eval "use strict; use warnings;\npackage TestMLBridge;\nuse base 'TestML::Bridge';\n$code;\n1;\n"
188 0 2 unless eval "require $bridge_module; 1"
197 0 6 unless $self->{'bridge'} and $self->{'bridge'}->can($call)
203 0 6 unless @ret
211 0 0 unless ($self->{'stdlib'})
218 0 0 unless $self->{'stdlib'}->can($call)
352 12 0 if (not $self->{'error'}) { }
354 0 12 if ($self->type($call) eq 'func') { }
362 0 12 if ($@) { }
0 12 elsif ($self->{'thrown'}) { }
363 0 0 if ($ENV{'TESTML_DEVEL'})
374 0 0 if ($call->[0] eq "Catch")
381 0 6 if $self->{'error'}
393 0 0 if ($self->type($expr) eq 'func') { }
394 0 0 if (@{$expr->[1];} == 0) { }
413 0 6 if (defined $block->{'ONLY'} and not $self->{'warned_only'})
430 0 6 if (my $when = $self->{'block'}{'WHEN'})
431 0 0 if ($when =~ /^Env:(\w+)$/)
432 0 0 unless $ENV{$1}
436 6 0 if ($pick)
438 0 12 if ($point =~ /^\*/ and not exists $self->{'block'}{substr $point, 1} or $point =~ /^!*/ and exists $self->{'block'}{substr $point, 2})
450 6 0 if ($pick)
451 0 6 if ($self->type($expr) eq 'func') { }
466 0 0 unless defined $func and $self->type($func) eq "func"
486 0 0 unless @{$list->[0];}
505 0 0 if defined $self->{'vars'}{$name}
507 0 0 if ($self->type($expr) eq 'func') { }
519 0 15 unless $self->{'block'}
521 15 0 if defined $value
539 0 118 unless defined $value
541 46 72 unless (ref $value)
542 0 46 if &Scalar::Util::looks_like_number($value)
545 0 72 if &isBoolean($value)
546 72 0 if (ref $value eq "ARRAY")
547 0 72 if @$value == 0
548 7 65 if $_ = $$types{$value->[0]}
549 6 59 if ref $value->[0] eq "ARRAY"
550 0 59 if ref $value->[0] eq "HASH"
561 0 6 unless @value
563 0 6 unless defined $value
565 6 0 unless ref $value
566 0 0 if ref($value) =~ /^(?:HASH|ARRAY)$/
567 0 0 if &isBoolean($value)
568 0 0 if ref $value eq "Regexp"
569 0 0 if ref $value eq "TestMLError"
570 0 0 if ref $value eq "TestMLFunction"
579 9 7 if $type =~ /^(?:str|num|bool|null)$/
580 0 7 if $type =~ /^(?:list|hash)$/
581 0 7 if $type =~ /^(?:error|native)$/
582 0 7 if $type eq "func"
583 7 0 if ($type eq "regex")
584 0 7 ref $value->[1] eq 'Regexp' ? :
588 0 0 if $type eq "none"
600 0 6 unless $self->can($method)
607 7 3 unless defined $label_expr
617 10 0 defined $self->{'block'} && defined $self->{'block'}{'Label'} ? :
619 3 7 if ($label) { }
626 0 7 unless defined $label
646 0 0 if ($label) { }
647 0 0 if ($type =~ /^(?:list|hash)$/)
650 0 0 if ($type eq "regex")
657 0 0 if ($type =~ /^(?:list|hash)$/) { }
669 0 0 unless defined $value
675 0 0 unless $self->{'block'}
677 0 0 unless defined $value