Condition Coverage

blib/lib/Test/Excel.pm
Criterion Covered Total %
condition 114 175 65.1


and 2 conditions

line l !l condition
256 2 1553 defined $rule and scalar keys %$rule

and 3 conditions

line !l l&&!r l&&r condition
151 40 0 0 &blessed($got) and $got->isa("Spreadsheet::Read")
156 40 0 0 &blessed($exp) and $exp->isa("Spreadsheet::Read")
209 0 0 49 defined $gotRowMax and defined $expRowMax
0 49 0 defined $gotRowMax and defined $expRowMax and $gotRowMax != $expRowMax
216 0 0 49 defined $gotColMax and defined $expColMax
0 49 0 defined $gotColMax and defined $expColMax and $gotColMax != $expColMax
240 0 1831 40 defined $spec and exists $spec->{'ALL'} && exists $spec->{'ALL'}{$col} && exists $spec->{'ALL'}{$col}{$row} && exists $spec->{'ALL'}{$col}{$row}{$IGNORE} || exists $$spec{uc $gotSheetName} && exists $$spec{uc $gotSheetName}{$col} && exists $$spec{uc $gotSheetName}{$col}{$row} && exists $$spec{uc $gotSheetName}{$col}{$row}{$IGNORE}
244 72 0 1779 defined $gotData and defined $expData
246 224 0 1555 $gotData =~ /^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/ and $expData =~ /^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/
251 1555 0 0 $gotData < $ALMOST_ZERO and $expData < $ALMOST_ZERO
260 0 12 89 defined $spec and exists $$spec{uc $gotSheetName}
12 0 89 defined $spec and exists $$spec{uc $gotSheetName} and exists $$spec{uc $gotSheetName}{$col}
0 49 40 defined $spec and exists $$spec{uc $gotSheetName} and exists $$spec{uc $gotSheetName}{$col} and exists $$spec{uc $gotSheetName}{$col}{$row}
49 0 40 defined $spec and exists $$spec{uc $gotSheetName} and exists $$spec{uc $gotSheetName}{$col} and exists $$spec{uc $gotSheetName}{$col}{$row} and exists $$spec{uc $gotSheetName}{$col}{$row}{$SPECIAL_CASE}
24 12 25 @sheets and grep /$gotSheetName/, @sheets
280 0 93 8 defined $compare_with and $compare_with < $difference
306 0 53 171 defined $spec and exists $$spec{uc $gotSheetName}
53 117 54 defined $spec and exists $$spec{uc $gotSheetName} and exists $$spec{uc $gotSheetName}{$col}
117 49 5 defined $spec and exists $$spec{uc $gotSheetName} and exists $$spec{uc $gotSheetName}{$col} and exists $$spec{uc $gotSheetName}{$col}{$row}
49 0 5 defined $spec and exists $$spec{uc $gotSheetName} and exists $$spec{uc $gotSheetName}{$col} and exists $$spec{uc $gotSheetName}{$col}{$row} and exists $$spec{uc $gotSheetName}{$col}{$row}{$REGEX_CASE}
210 6 3 exists $spec->{'ALL'}{$col} and exists $spec->{'ALL'}{$col}{$row}
6 0 3 exists $spec->{'ALL'}{$col} and exists $spec->{'ALL'}{$col}{$row} and exists $spec->{'ALL'}{$col}{$row}{$REGEX_CASE}
147 20 49 @sheets and grep /$gotSheetName/, @sheets
321 1 0 56 $gotData =~ /$exp/i and $expData =~ /$exp/i
351 1715 0 62 exists $rule->{'swap_check'} and defined $rule->{'swap_check'}
1715 0 62 exists $rule->{'swap_check'} and defined $rule->{'swap_check'} and $rule->{'swap_check'}
360 7 4 5 $error_on_sheet >= $error_limit and $error_on_sheet % 2 == 0
11 5 0 $error_on_sheet >= $error_limit and $error_on_sheet % 2 == 0 and not _is_swapping($swap)
374 268 3 7 $error_on_sheet > 0 and $error_on_sheet >= $error_limit
271 2 5 $error_on_sheet > 0 and $error_on_sheet >= $error_limit and $error_on_sheet % 2 == 0
5 5 0 $error_on_sheet > 0 and $error_on_sheet >= $error_limit and $error_on_sheet % 2 == 0 and not _is_swapping($swap)
382 35 0 9 exists $rule->{'swap_check'} and defined $rule->{'swap_check'}
35 0 9 exists $rule->{'swap_check'} and defined $rule->{'swap_check'} and $rule->{'swap_check'}
386 6 0 3 $error_on_sheet > 0 and _is_swapping($swap)
575 0 11 20 defined $sheet and $row =~ /^range\s+(.*)/i
0 7 4 defined $sheet and $row =~ /^regex\s+(.*)/i
0 1 6 defined $sheet and $row =~ /^ignorerange\s+(.*)/i
611 9 0 78 defined $hash and defined $key
651 27 8 0 $keys == 1 and exists $rule->{'message'}
670 13 13 6 exists $rule->{'spec'} and keys %$rule == 1
672 13 0 13 exists $rule->{'spec'} and defined $rule->{'spec'}
4 0 9 exists $rule->{'sheet'} and defined $rule->{'sheet'}
678 2 0 20 exists $rule->{'sheet_tolerance'} and defined $rule->{'sheet_tolerance'}
681 4 0 16 exists $rule->{'tolerance'} and defined $rule->{'tolerance'}
684 4 0 0 exists $rule->{'sheet_tolerance'} and defined $rule->{'sheet_tolerance'}
4 0 0 exists $rule->{'tolerance'} and defined $rule->{'tolerance'}
693 0 0 0 exists $rule->{'sheet'} and defined $rule->{'sheet'}
0 0 0 exists $rule->{'spec'} and defined $rule->{'spec'}

or 2 conditions

line l !l condition
152 40 0 'Spreadsheet::Read'->new($got) || die("ERROR: Couldn't create Spreadsheet::Read instance with: [$got]\n")
157 40 0 'Spreadsheet::Read'->new($exp) || die("ERROR: Couldn't create Spreadsheet::Read instance with: [$exp]\n")
277 36 0 $rule->{'tolerance'} || 0
568 15 0 'IO::File'->new($spec) || die("ERROR: Couldn't open file [$spec][$!].\n")

or 3 conditions

line l !l&&r !l&&!r condition
240 8 40 1823 exists $spec->{'ALL'} && exists $spec->{'ALL'}{$col} && exists $spec->{'ALL'}{$col}{$row} && exists $spec->{'ALL'}{$col}{$row}{$IGNORE} || exists $$spec{uc $gotSheetName} && exists $$spec{uc $gotSheetName}{$col} && exists $$spec{uc $gotSheetName}{$col}{$row} && exists $$spec{uc $gotSheetName}{$col}{$row}{$IGNORE}
260 40 25 36 defined $spec and exists $$spec{uc $gotSheetName} and exists $$spec{uc $gotSheetName}{$col} and exists $$spec{uc $gotSheetName}{$col}{$row} and exists $$spec{uc $gotSheetName}{$col}{$row}{$SPECIAL_CASE} or @sheets and grep /$gotSheetName/, @sheets
306 5 3 216 defined $spec and exists $$spec{uc $gotSheetName} and exists $$spec{uc $gotSheetName}{$col} and exists $$spec{uc $gotSheetName}{$col}{$row} and exists $$spec{uc $gotSheetName}{$col}{$row}{$REGEX_CASE} or exists $spec->{'ALL'}{$col} and exists $spec->{'ALL'}{$col}{$row} and exists $spec->{'ALL'}{$col}{$row}{$REGEX_CASE}
3 49 167 defined $spec and exists $$spec{uc $gotSheetName} and exists $$spec{uc $gotSheetName}{$col} and exists $$spec{uc $gotSheetName}{$col}{$row} and exists $$spec{uc $gotSheetName}{$col}{$row}{$REGEX_CASE} or exists $spec->{'ALL'}{$col} and exists $spec->{'ALL'}{$col}{$row} and exists $spec->{'ALL'}{$col}{$row}{$REGEX_CASE} or @sheets and grep /$gotSheetName/, @sheets
672 13 9 4 exists $rule->{'spec'} and defined $rule->{'spec'} or exists $rule->{'sheet'} and defined $rule->{'sheet'}
684 0 0 4 exists $rule->{'sheet_tolerance'} and defined $rule->{'sheet_tolerance'} or exists $rule->{'tolerance'} and defined $rule->{'tolerance'}
693 0 0 0 exists $rule->{'sheet'} and defined $rule->{'sheet'} or exists $rule->{'spec'} and defined $rule->{'spec'}