Condition Coverage

lib/Spreadsheet/Engine/Sheet.pm
Criterion Covered Total %
condition 169 431 39.2


and 3 conditions

line !l l&&!r l&&r condition
2022 0 0 0 $row >= $rowend and $cmd1 eq 'insertrow'
2034 0 0 0 $col >= $colend and $cmd1 eq 'insertcol'
2125 0 0 0 $row <= $lastrow - $rowoffset and $cmd1 eq 'deleterow'
2140 0 0 0 $col <= $lastcol - $coloffset and $cmd1 eq 'deletecol'
2403 798 0 0 $tvalue =~ /^[-+]?\$\s*\d*(?:\.)?\d*\s*$/ and $tvalue =~ /\d/
798 0 0 $tvalue =~ /^[-+]?\$\s*(\d*,\d*)+(?:\.)?\d*$/ and $tvalue =~ /\d/
2446 0 0 77 $hour < 24 and $minute < 60
2454 0 0 12 $hour < 24 and $minute < 60
0 0 12 $hour < 24 and $minute < 60 and $second < 60
2516 284 2607 17 substr($basetype, 0, 1) eq 'n' and substr($type, 0, 1) eq 't'
2526 290 0 2618 substr($type, 0, 1) eq 'n' and substr($basetype, 0, 1) eq 'n'
2628 0 18496 27694 @$operand and $$operand[@$operand - 1]{'type'} ne 'start'
3062 0 0 0 $c == $col and $coloffset < 0
0 0 0 $r == $row and $rowoffset < 0
3068 0 0 0 $c >= $col and not $sheetref
3070 0 0 0 $r >= $row and not $sheetref
3397 0 0 0 $compop eq '<' and $rawvalue < $compval
0 0 0 $compop eq '<=' and $rawvalue <= $compval
0 0 0 $compop eq '<>' and $rawvalue != $compval
0 0 0 $compop eq '>=' and $rawvalue >= $compval
0 0 0 $compop eq '>' and $rawvalue > $compval
3453 85 0 0 $scaledvalue == 0 and $fractiondigits || $integerdigits
3522 15 0 0 lc $operandstr eq 'am/pm' || lc $operandstr eq 'a/p' and not $ampmstr
3532 15 0 0 $minOK and $operandstr eq 'm' || $operandstr eq 'mm'
3553 30 0 0 $minOK and $operandstr eq 'm' || $operandstr eq 'mm'
3610 0 0 0 $fromend > 2 and $fromend % 3 == 0
3617 14 5 9 scalar @integervalue < $integerdigits and $integerdigits2 <= $integerdigits - scalar(@integervalue)
3625 0 0 0 $fromend > 2 and $fromend % 3 == 0
3634 12 0 3 $fromend > 2 and $fromend % 3 == 0
3694 0 0 0 $fromend > 2 and $fromend % 3 == 0
4160 14324 123 4838 $i >= 2 and $$parsed_token_type[$i - 1] == $token_op
14447 3555 1283 $i >= 2 and $$parsed_token_type[$i - 1] == $token_op and $$parsed_token_text[$i - 1] eq ':'
3678 0 1283 $i >= 2 and $$parsed_token_type[$i - 1] == $token_op and $$parsed_token_text[$i - 1] eq ':' and $$parsed_token_type[$i - 2] == $token_coord
3555 11 1272 $i >= 2 and $$parsed_token_type[$i - 1] == $token_op and $$parsed_token_text[$i - 1] eq ':' and $$parsed_token_type[$i - 2] == $token_coord and not $sheetref
4251 36762 0 1711 $cclass == $char_class_numstart and index($str, '.') == -1
4267 6 0 5 $chrc eq '+' || $chrc eq '-' and uc substr($str, -1) eq 'E'
4420 61034 6896 6575 $last_token_type == $char_class_op and $last_token_text ne ')'
67930 221 6354 $last_token_type == $char_class_op and $last_token_text ne ')' and $last_token_text ne '%'
4426 600 80 3635 $str eq ')' and $last_token_text eq '('
4525 0 12867 2208 @parsestack and $$parsed_token_text[$parsestack[@parsestack - 1]] ne '('
4536 0 19377 4448 @parsestack and $$parsed_token_text[$parsestack[@parsestack - 1]] ne '('
4545 182 725 18470 @parsestack and $$parsed_token_type[$parsestack[@parsestack - 1]] == $token_name
4551 12760 9827 81 @parsestack and $$parsed_token_type[$parsestack[@parsestack - 1]] == $token_name
4556 15163 0 10359 @parsestack and $$parsed_token_type[$parsestack[@parsestack - 1]] == $token_op
15163 6822 3537 @parsestack and $$parsed_token_type[$parsestack[@parsestack - 1]] == $token_op and $$parsed_token_text[$parsestack[@parsestack - 1]] ne '('
4563 113 2854 570 $tprecedence >= 0 and $tprecedence < $tstackprecedence
4733 343 29 2346 substr($tostype, 0, 1) eq 'n' and substr($tostype2, 0, 1) eq 'n'
4860 31233 1945 299 $errortext and substr($valuetype, 0, 1) ne 'e'
4867 11252 0 22225 substr($tostype, 0, 1) eq 'n' and defined $value
11252 22225 0 substr($tostype, 0, 1) eq 'n' and defined $value and $value =~ /1\.#INF/
5175 3165 0 0 $sheet1 &&= "!$sheet1"
5188 2243 0 922 $r == $r2 and $c == $c2

or 2 conditions

line l !l condition
919 0 93 $maxcol || 1
920 0 93 $maxrow || 1
1777 0 0 substr($$valuetypes{$cr}, 0, 1) || 'b'
2394 3991 17 $rawvalue || ''
2816 19634 260 $cellvtype || 'b'
3119 0 0 $$cellerrors{$cr} || $valuesubtype || 'Error in cell'
3124 0 0 $$valueformats[$$cellattribs{$cr}{'textvalueformat'} or $$sheetattribs{'defaulttextvalueformat'}] || ''
3131 0 0 html_escape("=$$dataformulas{$cr}") || ' '
3133 0 0 html_escape("'$$dataformulas{$cr}") || ' '
3135 0 0 html_escape("'$displayvalue") || ' '
3156 0 0 html_escape("=$$dataformulas{$cr}") || ' '
3158 0 0 html_escape("'$$dataformulas{$cr}") || ' '
3160 0 0 html_escape("'$displayvalue") || ' '
3165 0 0 html_escape("=$$dataformulas{$cr}") || ' '
3167 0 0 html_escape($$dataformulas{$cr}) || ' '
3169 0 0 html_escape($displayvalue) || ' '
3348 0 85 $currency_char ||= '$'
3431 24 486 $_ || 0
3463 83 2 $1 || ''
3465 3 82 $2 || ''
3684 0 63 $fractionvalue ||= ''
4058 0 0 $1 || '$'
4060 0 0 substr($bracketstr, 1) || '$'
4828 33477 0 $operand[0]{'type'} || ''
4851 1829 0 substr($tostype, 1) || 'Error value in formula'
5043 21 0 $cellvtype || 'b'
5172 2243 922 $sequence ||= 0
5175 0 3165 ($sheet1 &&= "!$sheet1") ||= ''

or 3 conditions

line l !l&&r !l&&!r condition
919 21 93 0 $$sheetattribs{'lastcol'} ||= $maxcol || 1
920 21 93 0 $$sheetattribs{'lastrow'} ||= $maxrow || 1
977 0 0 0 not $$valuetypes{$coord} or $$valuetypes{$coord} eq 'n'
985 0 0 0 not $$valuetypes{$coord} or $$valuetypes{$coord} eq 'tw'
1011 0 0 0 $t or $r
0 0 0 $t or $r or $b
0 0 0 $t or $r or $b or $l
1112 0 0 0 not $$clipvaluetypes{$coord} or $$clipvaluetypes{$coord} eq 'n'
1120 0 0 0 not $$clipvaluetypes{$coord} or $$clipvaluetypes{$coord} eq 'tw'
1146 0 0 0 $t or $r
0 0 0 $t or $r or $b
0 0 0 $t or $r or $b or $l
1244 0 0 4 $cmd1 eq 'insertcol' or $cmd1 eq 'insertrow'
0 0 4 $cmd1 eq 'deletecol' or $cmd1 eq 'deleterow'
1247 0 0 0 $attrib eq 'defaultcolor' or $attrib eq 'defaultbgcolor'
0 0 0 $attrib eq 'defaulttextformat' or $attrib eq 'defaultnontextformat'
0 0 0 $attrib eq 'defaulttextvalueformat' or $attrib eq 'defaultnontextvalueformat'
1374 0 0 1 $attrib eq 'color' or $attrib eq 'bgcolor'
0 0 1 $attrib eq 'textvalueformat' or $attrib eq 'nontextvalueformat'
1539 0 0 2 $cmd1 eq 'fillright' or $cmd1 eq 'filldown'
1 0 1 $cmd1 eq 'copy' or $cmd1 eq 'cut'
1587 0 0 0 $rest eq 'all' or $rest eq 'formats'
1596 0 0 0 $rest eq 'all' or $rest eq 'formulas'
1637 3 0 0 $rest eq 'all' or $rest eq 'formats'
1647 3 0 0 $rest eq 'all' or $rest eq 'formulas'
1700 3 0 0 $rest eq 'all' or $rest eq 'formats'
1709 3 0 0 $rest eq 'all' or $rest eq 'formulas'
2260 1 1 7 not $linetype or $linetype =~ /^#/
2 1 6 not $linetype or $linetype =~ /^#/ or not $linetype =~ /\S/
2313 0 0 0 $$headerdata{'editlog'} ||= ()
2528 0 1865 119 $comparitor eq '=' or $comparitor eq 'none'
3012 0 0 0 $r < 1 or $c < 1
3019 0 0 0 $token_op_expansion{$ttext} || $ttext
3057 0 0 0 $token_op_expansion{$ttext} || $ttext
3062 0 0 0 $c == $col and $coloffset < 0 or $r == $row and $rowoffset < 0
3075 0 0 0 $r < 1 or $c < 1
3202 0 0 0 not $valueformat or $valueformat eq 'General'
3273 0 63 22 $valueformat eq 'Auto' or length $valueformat == 0
3397 0 0 0 $compop eq '<' and $rawvalue < $compval or $compop eq '<=' and $rawvalue <= $compval
0 0 0 $compop eq '<' and $rawvalue < $compval or $compop eq '<=' and $rawvalue <= $compval or $compop eq '<>' and $rawvalue != $compval
0 0 0 $compop eq '<' and $rawvalue < $compval or $compop eq '<=' and $rawvalue <= $compval or $compop eq '<>' and $rawvalue != $compval or $compop eq '>=' and $rawvalue >= $compval
0 0 0 $compop eq '<' and $rawvalue < $compval or $compop eq '<=' and $rawvalue <= $compval or $compop eq '<>' and $rawvalue != $compval or $compop eq '>=' and $rawvalue >= $compval or $compop eq '>' and $rawvalue > $compval
3453 0 0 0 $fractiondigits || $integerdigits
3522 0 0 15 lc $operandstr eq 'am/pm' || lc $operandstr eq 'a/p'
3532 0 0 0 $operandstr eq 'm' || $operandstr eq 'mm'
3553 0 0 0 $operandstr eq 'm' || $operandstr eq 'mm'
3620 4 0 5 $operandstr eq '0' or $operandstr eq '?'
3642 0 0 0 $operandstr eq '0' or $operandstr eq '?'
3712 1 0 14 $operandstrlc eq 'y' or $operandstrlc eq 'yy'
0 0 0 $operandstrlc eq 'am/pm' or $operandstrlc eq 'a/p'
3942 0 0 0 'am/pm' =~ /^$ampmstr/i or 'a/p' =~ /^$ampmstr/i
3943 0 0 0 'am/pm' eq lc $ampmstr or 'a/p' eq lc $ampmstr
3952 12 20 35 $ch eq '#' or $ch eq '0'
32 0 35 $ch eq '#' or $ch eq '0' or $ch eq '?'
4109 1857 54978 50015 not $$Sheet{'datatypes'}{$coord} or $$Sheet{'datatypes'}{$coord} ne 'f'
4143 198 0 0 $cr2 ||= $cr1
4267 2 3 6 $chrc eq '+' || $chrc eq '-'
4294 18124 0 26 $cclass == $char_class_op or $cclass == $char_class_numstart
18124 11 15 $cclass == $char_class_op or $cclass == $char_class_numstart or $cclass == $char_class_space
11 0 15 $cclass == $char_class_op or $cclass == $char_class_numstart or $cclass == $char_class_space or $cclass == $char_class_eof
4318 12760 0 7458 $cclass == $char_class_op or $cclass == $char_class_numstart
12760 7281 177 $cclass == $char_class_op or $cclass == $char_class_numstart or $cclass == $char_class_eof
4345 0 0 0 $cclass == $char_class_num or $cclass == $char_class_alpha
0 0 0 $cclass == $char_class_op or $cclass == $char_class_numstart
0 0 0 $cclass == $char_class_op or $cclass == $char_class_numstart or $cclass == $char_class_space
0 0 0 $cclass == $char_class_op or $cclass == $char_class_numstart or $cclass == $char_class_space or $cclass == $char_class_eof
4386 36758 4 157657 $cclass == $char_class_num or $cclass == $char_class_numstart
38361 7 119289 $cclass == $char_class_alpha or $cclass == $char_class_incoord
4399 143 23 13471 $last_token_text eq '<' or $last_token_text eq '>'
4420 254 0 74505 @$parsed_token_type == 0 or $last_token_type == $char_class_op and $last_token_text ne ')' and $last_token_text ne '%'
4515 36713 19263 104198 $ttype == $token_num or $ttype == $token_coord
55976 6248 97950 $ttype == $token_num or $ttype == $token_coord or $ttype == $token_string
4851 116 1829 0 $errortext ||= substr($tostype, 1) || 'Error value in formula'