Branch Coverage

blib/lib/Language/LispPerl/BuiltIns.pm
Criterion Covered Total %
branch 167 282 59.2


line true false branch
161 497 263 if $straight_func
163 30 233 if ($function_name =~ /^(\.|->)(\S*)$/)
197 0 15 if $size < 2
198 0 1 if $ast->second->type ne 'symbol' and $ast->second->type ne 'keyword' and $ast->second->type ne 'string'
206 3 12 if ($perl_func eq 'require') { }
207 0 3 if $size != 3
209 0 3 if ($m->type eq 'keyword' or $m->type eq 'symbol') { }
3 0 elsif ($m->type eq 'string') { }
222 0 3 if (my $err = $@)
229 6 6 if defined $ast->third and $ast->third->type eq 'meta'
233 6 6 defined $meta ? :
234 1 11 if $blessed eq '->'
243 1 1 if $ast->size != 2
245 0 1 if $s->type ne 'string'
253 0 4 if $ast->size != 2
259 0 4 if $ast->size != 2
266 0 4 if $ast->size != 3
268 0 4 if $label->type ne 'symbol'
272 0 4 if $msg->type ne 'string'
289 0 3 if $ast->size != 3
291 0 3 if $handler->type ne 'function'
299 3 0 if ($@)
301 0 3 unless (defined $e)
308 0 3 if $e->type ne 'exception'
325 0 1 if $ast->size != 2
327 0 1 if $e->type ne 'exception'
335 0 1 if $ast->size != 2
337 0 1 if $e->type ne 'exception'
351 0 36 if $size > 4 or $size < 3
353 35 1 if ($size == 3)
354 0 35 if $ast->second->type ne 'symbol'
359 0 35 if $self->evaler->word_is_reserved($name)
371 0 1 if $meta->type ne 'meta'
376 0 1 if $ast->third->type ne 'symbol'
382 0 1 if $self->evaler->word_is_reserved($name)
396 0 8 if $ast->size != 3
397 0 8 if $ast->second->type ne 'symbol'
403 0 8 unless defined $self->evaler->var($name)
416 0 3 if $ast->size < 3
419 0 3 if $vars->type ne 'vector'
423 0 3 if $varssize % 2 != 0
437 0 4 if $n->type ne 'symbol'
456 0 39 if $ast->size < 3
460 0 39 if $argstype ne 'vector'
467 0 56 if $arg->type ne 'symbol'
470 0 3 if ($arg->value eq '&' and $argssize != $i + 2 || $$argsvalue[$i + 1]->value eq '&')
490 0 2 if $ast->size != 3
492 0 2 if $f->type ne 'function' and not $f->type eq 'symbol' && $self->has_function($f->value)
503 0 2 if $l->type ne 'list'
519 0 22 if $ast->size < 4
522 0 22 if $args->type ne 'vector'
526 0 62 if $arg->type ne 'symbol'
529 0 17 if ($arg->value eq '&' and $args->size != $i + 2 || $args->value->[$i + 1]->value eq '&')
549 0 1 if $ast->size > 2
551 1 0 if ($ast->size == 2) { }
553 0 1 if $pre->type ne 'string'
565 0 3 unless ($ast)
568 0 3 if $ast->size != 2
570 2 1 unless ($m->type eq 'symbol' or $m->type eq 'keyword')
572 0 2 if $m->type ne 'string'
580 0 1 if $ast->size != 2
582 0 1 if $f->type ne 'string'
589 0 10 if $ast->size == 1
600 0 1 if $ast->size != 2
602 0 1 if $v->type ne 'list'
610 0 1 if $ast->size != 2
612 0 1 if $v->type ne 'list'
614 0 1 if $v->size == 0
623 0 1 if $ast->size != 3
626 0 1 if $rvs->type ne 'list'
630 1 0 if $rvs->size > 0
640 0 7 if $size > 4 or $size < 3
642 0 7 unless $cond->type eq 'bool'
646 4 3 if ($cond->value eq 'true') { }
2 1 elsif ($size == 4) { }
660 0 1 if $size < 3
668 0 6 if $cond->type ne 'bool'
673 1 5 unless ($cond->value eq 'true')
687 0 2 if $size < 2
714 6 3 if ($res->value)
726 0 29 unless my $num_func = $NUM_FUNCTIONS->{$fn}
729 0 29 if $size != 3
734 0 29 if $v1->type ne 'number' or $v2->type ne 'number'
756 0 4 unless my $str_func = $STRING_FUNCTIONS->{$fn}
759 0 4 if $size != 3
762 0 4 if $v1->type ne 'string' or $v2->type ne 'string'
769 3 1 &$str_func($v1->value, $v2->value) ? :
776 0 5 if $ast->size != 3
781 1 4 if ($v1->type ne $v2->type)
786 2 1 if ($type eq 'string' or $type eq 'keyword' or $type eq 'quotation' or $type eq 'bool' or $type eq 'nil')
787 2 1 $v1->value eq $v2->value ? :
790 1 0 if ($type eq 'number')
791 1 0 $v1->value == $v2->value ? :
794 0 0 $v1->value eq $v2->value ? :
800 0 2 if $ast->size != 2
802 0 2 if $v->type ne 'bool'
805 1 1 $v->value eq 'true' ? :
811 0 3 if $ast->size != 3
813 0 3 if $v1->type ne 'bool'
816 1 2 if $v1->value eq 'false'
820 0 2 if $v2->type ne 'bool'
823 1 1 $v2->value eq 'true' ? :
829 0 4 if $ast->size != 3
831 0 4 if $v1->type ne 'bool'
834 2 2 if $v1->value eq 'true'
838 0 2 if $v2->type ne 'bool'
841 1 1 $v2->value eq 'true' ? :
846 0 4 if $ast->size != 2
849 1 3 if ($v->type eq 'string')
854 2 0 if ($v->type eq 'list' or $v->type eq 'vector' or $v->type eq 'xml')
861 0 0 if ($v->type eq 'map')
872 0 5 if $ast->size != 2
875 2 3 if ($v->type eq 'string')
879 1 2 if ($v->type eq 'list')
886 2 0 if ($v->type eq 'vector' or $v->type eq 'xml')
899 0 6 if $ast->size != 3
905 0 2 if $v1type ne $v2type or $v1type ne 'string' and $v1type ne 'list' and $v1type ne 'vector' and $v1type ne 'map'
917 3 3 if ($v1type eq 'string')
922 2 1 if ($v1type eq 'list' or $v1type eq 'vector')
926 1 1 if ($v1type eq 'list') { }
941 0 1 if $ast->size != 2
944 0 1 if $v->type ne 'xml'
952 0 1 if $ast->size != 2
954 0 1 if $v->type ne 'map'
965 0 2 if $ast->size != 2
967 1 1 unless ($v->type eq 'symbol' or $v->type eq 'keyword')
970 0 1 if $v->type ne 'string'
980 0 2 if $ast->size != 1
987 0 1 if $ast->size != 2
994 0 11 if $ast->size != 2
1003 0 2 if $size < 2 or $size > 3
1005 1 1 if ($size == 3)
1007 0 1 if $vm->type ne 'meta'
1014 0 2 unless defined $m
1021 0 1 if $ast->size != 2
1030 0 5 if $ast->size != 2
1037 0 1 if $ast->size != 1
1044 0 0 if $ast->size != 2
1046 0 0 if $v->type ne 'perlobject'
1054 0 1 if $ast->size != 2
1056 0 1 if $o->type ne 'perlobject'