Branch Coverage

lib/JavaScript/Duktape.pm
Criterion Covered Total %
branch 137 166 82.5


line true false branch
139 2 72 if ($timeout)
140 1 1 unless JavaScript::Duktape::Vm::duk_sv_is_number($timeout)
143 6 67 if ($max_memory)
144 1 5 unless JavaScript::Duktape::Vm::duk_sv_is_number($max_memory)
145 1 4 if $max_memory < 262144
191 2 44 if ($name =~ /\./)
197 0 2 if ($duk->peval_string($others) != 0)
202 0 2 if ($type != 6)
223 0 1 if ($duk->peval != 0)
236 0 6 if ($duk->peval != 0)
250 9 22 if ($duk->peval_string($string) != 0)
274 0 71 unless $duk
281 71 0 if ($self->{'pid'} and $self->{'pid'} == $$)
311 0 56 $^O eq 'MSWin32' ? :
346 100 152022 if (my $ref = ref $val) { }
347 1 99 if ($ref eq 'JavaScript::Duktape::NULL') { }
6 93 elsif ($BOOL_PACKAGES->{$ref}) { }
12 81 elsif ($ref eq 'ARRAY') { }
16 65 elsif ($ref eq 'HASH') { }
46 19 elsif ($ref eq 'CODE') { }
11 8 elsif ($ref eq 'JavaScript::Duktape::Object') { }
0 8 elsif ($ref eq 'JavaScript::Duktape::Function') { }
0 8 elsif ($ref eq 'JavaScript::Duktape::Pointer') { }
6 2 elsif ($ref eq 'JavaScript::Duktape::Buffer') { }
2 0 elsif ($ref eq 'SCALAR') { }
352 3 3 if ($val) { }
365 2 30 if ($$stash{$val->[$idx]}) { }
380 1 28 if ($v and $stash->{$v}) { }
407 5 1 defined $$val ? :
413 1 1 $$val ? :
421 3 152019 if (not defined $val) { }
151589 430 elsif (duk_sv_is_number($val)) { }
437 0 237 unless ($heapptr)
455 173 12161 if ($type == 1) { }
8505 3656 elsif ($type == 5) { }
2318 1338 elsif ($type == 4) { }
5 1333 elsif ($type == 7) { }
1288 45 elsif ($type == 6) { }
39 6 elsif ($type == 3) { }
3 3 elsif ($type == 2) { }
3 0 elsif ($type == 8) { }
474 444 844 if ($self->is_function($index))
483 5 4 if ($self->pcall_method($len) == 1)
495 0 844 if ($stash->{$heapptr}) { }
499 30 814 $isArray ? :
510 1309 4441 if ($self->get_type(-1) == 6) { }
512 63 1246 if ($stash->{$heapptr}) { }
525 133 5617 if ($isArray) { }
538 31 8 if ($bool == 1) { }
578 151580 108 unless ($heap)
617 22 151679 if ($err)
638 38 151710 if (my $error = $@)
639 22 16 if ($error =~ /^Duk::Error/i) { }
649 151710 0 defined $ret ? :
653 151710 38 defined $ret ? :
660 1 3 unless duk_sv_is_number($timeout)
668 0 2 unless duk_sv_is_number($max_memory)
669 1 1 if $max_memory < 262144
723 28 15 ${$_[0];} ? :
730 0 56 $use_boolean ? :
731 0 56 $use_boolean ? :
737 1 1 ${$_[0];} ? :
747 0 5 ${$_[0];} ? :
789 0 521 if $method eq 'DESTROY'
798 17 232 unless $refcount
826 0 0 if $method eq 'DESTROY'
847 0 521 if ($method eq 'new')
852 0 0 if ($duk->pnew($len) != 0)
864 378 143 if ($type == 6 or $type == 7) { }
868 378 0 if ($duk->is_function(-1)) { }
871 376 2 if (@_) { }
873 3 373 if ref $_[0] eq 'NOARGS'
904 136 378 if ($ref eq 'NEW') { }
0 378 elsif ($ref eq 'HEAP') { }
0 378 elsif ($ref eq 'DUK') { }
917 378 136 unless $isNew
919 211 331 if (ref $val eq 'CODE') { }
927 136 378 if ($isNew) { }
928 0 136 if ($duk->pnew($len) != 0)
933 0 378 if ($duk->pcall_method($len) != 0)
941 205 309 if ($type == 6 or $type == 7) { }
953 376 7 if $doCall
986 5 232 if ($duk->is_function(-1))