Branch Coverage

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


line true false branch
139 2 72 if ($timeout)
140 1 1 unless JavaScript::Embedded::Vm::duk_sv_is_number($timeout)
143 6 67 if ($max_memory)
144 1 5 unless JavaScript::Embedded::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 104 162374 if (my $ref = ref $val) { }
347 1 103 if ($ref eq 'JavaScript::Embedded::NULL') { }
6 97 elsif ($BOOL_PACKAGES->{$ref}) { }
12 85 elsif ($ref eq 'ARRAY') { }
16 69 elsif ($ref eq 'HASH') { }
46 23 elsif ($ref eq 'CODE') { }
15 8 elsif ($ref eq 'JavaScript::Embedded::Object') { }
0 8 elsif ($ref eq 'JavaScript::Embedded::Function') { }
0 8 elsif ($ref eq 'JavaScript::Embedded::Pointer') { }
6 2 elsif ($ref eq 'JavaScript::Embedded::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 162371 if (not defined $val) { }
161941 430 elsif (duk_sv_is_number($val)) { }
437 0 245 unless ($heapptr)
455 173 12177 if ($type == 1) { }
8513 3664 elsif ($type == 5) { }
2326 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 161931 108 unless ($heap)
617 21 162031 if ($err)
638 37 162062 if (my $error = $@)
639 22 15 if ($error =~ /^Duk::Error/i) { }
649 162062 0 defined $ret ? :
653 162062 37 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 525 if $method eq "DESTROY"
798 17 240 unless $refcount
826 0 0 if $method eq "DESTROY"
847 0 525 if ($method eq "new")
852 0 0 if ($duk->pnew($len) != 0)
864 382 143 if ($type == 6 or $type == 7) { }
868 382 0 if ($duk->is_function(-1)) { }
871 380 2 if (@_) { }
873 3 377 if ref $_[0] eq "NOARGS"
904 136 382 if ($ref eq 'NEW') { }
0 382 elsif ($ref eq 'HEAP') { }
0 382 elsif ($ref eq 'DUK') { }
917 382 136 unless $isNew
919 211 335 if (ref $val eq 'CODE') { }
927 136 382 if ($isNew) { }
928 0 136 if ($duk->pnew($len) != 0)
933 0 382 if ($duk->pcall_method($len) != 0)
941 205 313 if ($type == 6 or $type == 7) { }
953 380 7 if $doCall
986 5 240 if ($duk->is_function(-1))