Branch Coverage

lib/Spreadsheet/Engine/Functions.pm
Criterion Covered Total %
branch 97 168 57.7


line true false branch
77 0 2604 if $@
107 18252 517 if (my $fclass = $$_reg{$fname})
122 244 273 if ($function_sub) { }
127 0 244 if ($want_args < 0 and $have_args < -$want_args or $want_args >= 0 and $have_args != $want_args)
138 273 0 if (@$operand and $$operand[@$operand - 1]{'type'} eq 'start') { }
211 0 182 if ($dbrangetype ne 'range' or $criteriarangetype ne 'range')
228 0 182 if ($fieldasnum <= 0)
246 0 218 if ($criterianum <= 0)
266 0 2840 unless $criteria
273 2209 631 unless test_criteria($$criteriasheetdata{'datavalues'}{$testcr}, $$criteriasheetdata{'valuetypes'}{$testcr} || 'b', $criteria)
279 1866 500 unless $testok
287 0 500 if ($tostype eq 'b')
291 500 0 if substr($tostype, 0, 1) eq 'n'
292 500 0 if substr($tostype, 0, 1) ne 'b'
293 0 500 if substr($tostype, 0, 1) eq 'b'
295 500 0 if (substr($tostype, 0, 1) eq 'n') { }
0 0 elsif (substr($tostype, 0, 1) eq 'e' and substr($resulttypesum, 0, 1) ne 'e') { }
298 303 23 $value1 > $maxval ? :
326 174 defined $maxval ? :
300 0 326 $value1 < $minval ? :
326 174 defined $minval ? :
302 174 326 if ($count eq 1) { }
323 94 88 if ($fname eq 'DSUM') { }
6 82 elsif ($fname eq 'DPRODUCT') { }
7 75 elsif ($fname eq 'DMIN') { }
8 67 elsif ($fname eq 'DMAX') { }
12 55 elsif ($fname eq 'DCOUNT') { }
11 44 elsif ($fname eq 'DCOUNTA') { }
13 31 elsif ($fname eq 'DAVERAGE') { }
5 26 elsif ($fname eq 'DSTDEV') { }
4 22 elsif ($fname eq 'DSTDEVP') { }
2 20 elsif ($fname eq 'DVAR') { }
1 19 elsif ($fname eq 'DVARP') { }
19 0 elsif ($fname eq 'DGET') { }
337 13 0 if ($count > 0) { }
343 5 0 if ($count > 1) { }
350 4 0 if ($count > 1) { }
357 2 0 if ($count > 1) { }
364 1 0 if ($count > 1) { }
370 10 9 if ($count == 1) { }
0 9 elsif ($count == 0) { }
399 0 12 if ($rangetype ne 'range')
410 12 0 if (scalar @$foperand)
413 0 12 if (substr($tostype, 0, 1) ne 'n' or $rowindex < 0)
417 12 0 if (scalar @$foperand) { }
420 0 12 if (substr($tostype, 0, 1) ne 'n' or $colindex < 0)
424 0 12 if (scalar @$foperand)
429 0 0 if ($nrows == 1)
436 0 12 if ($rowindex > $nrows or $colindex > $ncols)
443 0 12 if ($rowindex == 0) { }
444 0 0 if ($colindex == 0) { }
445 0 0 if ($nrows == 1 and $ncols == 1) { }
455 0 0 if ($nrows == 1) { }
467 0 12 if ($colindex == 0) { }
468 0 0 if ($ncols == 1) { }
514 29 0 if ($fname eq 'SUMIF') { }
515 5 24 if (scalar @$foperand == 1) { }
24 0 elsif (scalar @$foperand == 0) { }
531 0 29 if ($ct eq 'n') { }
0 29 elsif ($ct eq 'e') { }
0 29 elsif ($ct eq 'b') { }
539 5 24 if ($rangetype ne 'coord' and $rangetype ne 'range')
544 0 24 if ($fname eq 'SUMIF' and $sumrangetype ne 'coord' and $sumrangetype ne 'range')
565 42 26 unless test_criteria($value1, $tostype, $criteriavalue)
569 22 4 if (substr($tostype2, 0, 1) eq 'n') { }
0 8 elsif (substr($tostype2, 0, 1) eq 'e' and substr($resulttypesum, 0, 1) ne 'e') { }
582 24 0 if ($fname eq 'SUMIF') { }
0 0 elsif ($fname eq 'COUNTIF') { }
613 9 12 if ($tostype eq 'coord') { }
12 0 elsif ($tostype eq 'range') { }
623 0 12 if $c1 > $c2
624 0 12 if $r1 > $r2
626 9 3 if ($fname eq 'COLUMNS') { }
3 0 elsif ($fname eq 'ROWS') { }
663 0 0 if (substr($tostype, 0, 1) eq 't') { }
0 0 elsif (substr($tostype, 0, 1) eq 'e' and substr($resulttype, 0, 1) ne 'e') { }
672 0 0 substr($resulttype, 0, 1) eq 't' ? :
699 0 0 if (substr($tostype, 0, 1) eq 't') { }
0 0 elsif (substr($tostype, 0, 1) eq 'e' and substr($resulttype, 0, 1) ne 'e') { }
708 0 0 substr($resulttype, 0, 1) eq 't' ? :
731 0 400 if (substr($fieldtype, 0, 1) eq 'n')
732 0 0 if ($fieldname <= 0 or $fieldname > $ncols)
738 0 400 if (substr($fieldtype, 0, 1) ne 't')
753 551 400 if $value ne $fieldname