Condition Coverage

blib/lib/Geo/BUFR.pm
Criterion Covered Total %
condition 89 685 12.9


and 3 conditions

line !l l&&!r l&&r condition
190 0 52 1662 $level > $self->{'VERBOSE'} and $level > $Verbose
280 0 0 0 ref $value and not $key =~ /[BCD]_TABLE/
374 0 0 0 $bufr_edition >= 0 and $bufr_edition < 5
711 2 0 0 $compressed_data and defined $self->{'NUM_SUBSETS'}
2 0 0 $compressed_data and defined $self->{'NUM_SUBSETS'} and $self->{'NUM_SUBSETS'} == 1
1250 0 0 0 not $path and $version =~ /wmo/
1282 0 0 0 $Strict_checking and $num ne $val
1295 0 0 0 $Strict_checking and not $C_table{$table}
1369 1 0 0 $default_table and not $self->{'C_TABLE'}
1660 0 0 5 exists $self->{'START_POS'} and $self->{'BUFR_LENGTH'}
1831 11 0 0 $Strict_checking and $self->{'NUM_SUBSETS'} == 0
1832 11 0 0 $Strict_checking and ($sec3[3] & 63) != 0
1873 0 3 0 $len == 4 and substr($str, 0, 4) ne '7777'
1878 0 0 0 $len > 4 and substr($str, 0, 4) eq '7777'
0 0 0 $len == 4 and substr($str, 0, 4) ne '7777'
1985 0 0 0 substr($id, 0, 1) eq '0' and not exists $B_table->{$id}
0 0 0 substr($id, 0, 1) eq '3' and not exists $D_table->{$id}
2209 2 0 0 $self->{'LOCAL_USE'} and length $self->{'LOCAL_USE'} > 1
2219 0 0 0 defined $sec2_code_ref and ref $sec2_code_ref eq 'CODE'
2273 0 0 0 $f == 9 and $id != 999999
2315 0 0 0 $Strict_checking and $short_unit eq 'FLAG TABLE'
0 0 0 $Strict_checking and $short_unit eq 'FLAG TABLE' and $bits > 1
2316 0 0 0 $value ne 'missing' and $value % 2
2326 0 0 0 $C_table and $id != 31031
0 0 0 $C_table and $id != 31031 and $value ne 'missing'
2449 0 0 0 substr($id, 0, 1) eq '2' and $id =~ /^22[2-5]/ || $id =~ /^232/
2491 0 0 0 $Strict_checking and $short_unit eq 'FLAG TABLE'
0 0 0 $Strict_checking and $short_unit eq 'FLAG TABLE' and $bits > 1
2492 0 0 0 $value ne 'missing' and $value % 2
2501 0 0 0 $C_table and $value ne 'missing'
2548 0 0 0 defined $check_illegal and $value > $max_value
2572 0 0 0 defined $check_illegal and $txt =~ /bit $width set/
2625 2 0 0 $di + 2 == @_ and $_[$di + 1] =~ /^0310(00|01|02|11|12)$/
2696 0 0 0 $BUFR_table{'FORMAT'} eq 'ECCODES' and $self->{'LOCAL_TABLES_NOT_FOUND'}
2714 0 0 0 $need_Dtable and not $self->{'D_TABLE'}
2715 0 0 0 $BUFR_table{'FORMAT'} eq 'ECCODES' and $self->{'LOCAL_TABLES_NOT_FOUND'}
2747 0 0 0 @desc == 1 and $desc[0] =~ /^1/
2785 0 0 1 defined $width and $width =~ /\d+$/
2914 0 0 0 $Spew and $x == 0
2927 0 0 14 /^0310(00|01|02|11|12)/ and exists $B_table->{$_}
3069 782 0 0 $self->{'ADD_ASSOCIATED_FIELD'} and $id ne '031021'
3090 782 0 0 substr($id, 0, 3) eq '033' and defined $self->{'BITMAP_OPERATORS'}
782 0 0 substr($id, 0, 3) eq '033' and defined $self->{'BITMAP_OPERATORS'} and $self->{'BITMAP_OPERATORS'}[-1] eq '222000'
3117 0 0 0 $unit ne 'CCITTIA5' and not $unit =~ /^(CODE|FLAG)/
0 0 0 $unit eq 'CCITTIA5' and defined $self->{'CHANGE_CCITTIA5_WIDTH'}
3132 0 0 0 defined $self->{'NEW_REFVAL_OF'}{$id} and defined $self->{'NEW_REFVAL_OF'}{$id}{$isub}
3183 782 0 0 $id eq '031031' and $self->{'BUILD_BITMAP'}
782 0 0 $self->{'BUILD_BITMAP'} and $self->{'BITMAP_INDEX'} > 0
3198 0 0 0 $desc[$i] ne $self->{'BITMAP_OPERATORS'}[-1] and $i >= 0
3200 0 0 0 $desc[$i] > 100000 and $i >= 0
3286 0 0 0 $Spew and $x == 0
3299 0 0 0 /^0310(00|01|02|11|12)/ and exists $B_table->{$_}
3443 0 0 0 $self->{'ADD_ASSOCIATED_FIELD'} and $id ne '031021'
3501 0 0 0 substr($id, 0, 3) eq '033' and defined $self->{'BITMAP_OPERATORS'}
0 0 0 substr($id, 0, 3) eq '033' and defined $self->{'BITMAP_OPERATORS'} and $self->{'BITMAP_OPERATORS'}[-1] eq '222000'
3541 0 0 0 $unit ne 'CCITTIA5' and not $unit =~ /^(CODE|FLAG)/
0 0 0 $unit eq 'CCITTIA5' and defined $self->{'CHANGE_CCITTIA5_WIDTH'}
3583 0 0 0 $deltabytes and defined $minval
3588 0 0 0 $Strict_checking and $minval ne "\000" x $nbytes
3625 0 0 0 $Spew and defined $minval
3632 0 0 0 $deltabits and defined $minval
3637 0 0 0 $Strict_checking and defined $value
0 0 0 $Strict_checking and defined $value and $value + $minval > 2 ** $width
3650 0 0 0 $id == 999999 and not defined $value
3672 0 0 0 $id == 999999 and not defined $value
3684 0 0 0 $id eq '031031' and $self->{'BUILD_BITMAP'}
0 0 0 $self->{'BUILD_BITMAP'} and $self->{'BITMAP_INDEX'} > 0
3700 0 0 0 $desc_ref->[$i] ne $self->{'BITMAP_OPERATORS'}[-1] and $i >= 0
3702 0 0 0 $desc_ref->[$i] > 100000 and $i >= 0
3708 0 0 0 $desc_ref->[$i] > 100000 and $i >= 0
3768 0 0 0 not $lines[$i] =~ /^Section 0/ and $i < @lines - 1
4207 0 0 2 /^0310(00|01|02|11|12)/ and exists $B_table->{$_}
4209 0 0 2 @delayed_repl and /^03100(1|2)/
4256 0 0 0 $unit ne 'CCITTIA5' and not $unit =~ /^(CODE|FLAG)/
0 0 0 $unit eq 'CCITTIA5' and defined $self->{'CHANGE_CCITTIA5_WIDTH'}
4377 0 0 6 $next_id =~ /^0310(00|01|02|11|12)/ and exists $B_table->{$next_id}
4481 346 0 0 $self->{'ADD_ASSOCIATED_FIELD'} and $id ne '031021'
4506 346 0 0 substr($id, 0, 3) eq '033' and defined $self->{'BITMAP_OPERATORS'}
346 0 0 substr($id, 0, 3) eq '033' and defined $self->{'BITMAP_OPERATORS'} and $self->{'BITMAP_OPERATORS'}[-1] eq '222000'
4527 346 0 0 $id eq '031031' and $self->{'BUILD_BITMAP'}
346 0 0 $self->{'BUILD_BITMAP'} and $self->{'BITMAP_INDEX'} > 0
4532 0 0 0 defined $value and $value == 0
4542 0 0 0 $desc[$i] ne $self->{'BITMAP_OPERATORS'}[-1] and $i >= 0
4544 0 0 0 $desc[$i] > 100000 and $i >= 0
4573 346 0 0 defined $self->{'NEW_REFVAL_OF'}{$id} and defined $self->{'NEW_REFVAL_OF'}{$id}{$isub}
4581 346 0 0 $self->{'NUM_CHANGE_OPERATORS'} > 0 and $id != 999999
4582 0 0 0 $unit ne 'CCITTIA5' and not $unit =~ /^(CODE|FLAG)/
0 0 0 $unit eq 'CCITTIA5' and defined $self->{'CHANGE_CCITTIA5_WIDTH'}
4596 0 0 0 defined $self->{'NEW_REFVAL_OF'}{$id} and defined $self->{'NEW_REFVAL_OF'}{$id}{$isub}
4634 136 0 0 $Strict_checking and $unit =~ /^FLAG[ ]?TABLE/
136 0 0 $Strict_checking and $unit =~ /^FLAG[ ]?TABLE/ and $width > 1
0 0 0 $Strict_checking and $unit =~ /^FLAG[ ]?TABLE/ and $width > 1 and $value < $max_value
0 0 0 $Strict_checking and $unit =~ /^FLAG[ ]?TABLE/ and $width > 1 and $value < $max_value and $value % 2
4699 6 0 0 $self->{'NUM_CHANGE_OPERATORS'} > 0 and $id != 999999
4700 0 0 0 $unit ne 'CCITTIA5' and not $unit =~ /^(CODE|FLAG)/
0 0 0 $unit eq 'CCITTIA5' and defined $self->{'CHANGE_CCITTIA5_WIDTH'}
4714 0 0 0 defined $self->{'NEW_REFVAL_OF'}{$id} and defined $self->{'NEW_REFVAL_OF'}{$id}{$isub}
4752 6 0 0 $Strict_checking and $unit =~ /^FLAG[ ]?TABLE/
6 0 0 $Strict_checking and $unit =~ /^FLAG[ ]?TABLE/ and $width > 1
0 0 0 $Strict_checking and $unit =~ /^FLAG[ ]?TABLE/ and $width > 1 and $value < $max_value
0 0 0 $Strict_checking and $unit =~ /^FLAG[ ]?TABLE/ and $width > 1 and $value < $max_value and $value % 2
4807 0 0 0 $self->{'NUM_CHANGE_OPERATORS'} > 0 and $id != 999999
4808 0 0 0 $unit ne 'CCITTIA5' and not $unit =~ /^(CODE|FLAG)/
0 0 0 $unit eq 'CCITTIA5' and defined $self->{'CHANGE_CCITTIA5_WIDTH'}
4842 0 0 0 defined $value and $unit ne 'CCITTIA5'
0 0 0 defined $value and $unit ne 'CCITTIA5' and not &looks_like_number($value)
4847 0 0 0 defined $value and defined $first_value
4865 0 0 0 $Strict_checking and $unit =~ /^FLAG[ ]?TABLE/
0 0 0 $Strict_checking and $unit =~ /^FLAG[ ]?TABLE/ and $width > 1
4866 0 0 0 defined $value and $value ne 'missing'
0 0 0 defined $value and $value ne 'missing' and $value % 2
4930 0 0 0 defined $first_value and not &looks_like_number($first_value)
4964 0 0 0 $Strict_checking and $value + $min_value > 2 ** $width - 1
5042 0 0 0 $next_id =~ /^0310(00|01|02|11|12)/ and exists $B_table->{$next_id}
5156 0 0 0 $self->{'ADD_ASSOCIATED_FIELD'} and $id ne '031021'
5186 0 0 0 substr($id, 0, 3) eq '033' and defined $self->{'BITMAP_OPERATORS'}
0 0 0 substr($id, 0, 3) eq '033' and defined $self->{'BITMAP_OPERATORS'} and $self->{'BITMAP_OPERATORS'}[-1] eq '222000'
5205 0 0 0 $id eq '031031' and $self->{'BUILD_BITMAP'}
0 0 0 $self->{'BUILD_BITMAP'} and $self->{'BITMAP_INDEX'} > 0
5222 0 0 0 $desc[$i] ne $self->{'BITMAP_OPERATORS'}[-1] and $i >= 0
5224 0 0 0 $desc[$i] > 100000 and $i >= 0
5295 0 0 0 $bufr_edition < 4 and $actual_bytes % 2
5301 0 0 0 $bufr_edition < 4 and $comp_bytes % 2
5315 7 0 0 $Strict_checking and $str =~ /^ +$/
5328 7 0 0 $Strict_checking and $str ne ''
5374 0 0 0 $self->{'MINUTE'} == 0 and $self->{'HOUR'} == 0
0 0 0 $self->{'MINUTE'} == 0 and $self->{'HOUR'} == 0 and $self->{'DAY'} == 0
0 0 0 $self->{'MINUTE'} == 0 and $self->{'HOUR'} == 0 and $self->{'DAY'} == 0 and $self->{'MONTH'} == 0
0 0 0 $self->{'MINUTE'} == 0 and $self->{'HOUR'} == 0 and $self->{'DAY'} == 0 and $self->{'MONTH'} == 0 and $second == 0
0 0 0 $self->{'MINUTE'} == 0 and $self->{'HOUR'} == 0 and $self->{'DAY'} == 0 and $self->{'MONTH'} == 0 and $second == 0 and $year == 0 || $year == 2000
5455 0 0 0 $y == 0 and $x =~ /^[12378]$/
0 0 0 $x == 3 and $y == 255
0 0 0 $x == 22 and $y == 0
0 0 0 $x == 23 and $y == 0
0 0 0 $x == 23 and $y == 255
0 0 0 $x == 24 and $y == 0
0 0 0 $x == 24 and $y == 255
0 0 0 $x == 25 and $y == 0
0 0 0 $x == 25 and $y == 255
0 0 0 $x == 32 and $y == 0
0 0 0 $x == 32 and $y == 255
0 0 0 $x == 35 and $y == 0
0 0 0 $x == 36 and $y == 0
0 0 0 $x == 37 and $y == 0
0 0 0 $x == 37 and $y == 255
0 0 0 $x == 41 and $y == 0
0 0 0 $x == 41 and $y == 255
0 0 0 $x == 42 and $y == 0
0 0 0 $x == 42 and $y == 255
0 0 0 $x == 43 and $y == 0
0 0 0 $x == 43 and $y == 255
5458 0 0 0 $Strict_checking and not grep({$_ == $x;} @operators)
5549 0 0 0 $xx < 48 and $yy < 192
5553 0 0 0 exists $self->{'B_TABLE'}{$next_id} and (split(/\0/, $self->{'B_TABLE'}{$next_id}, 0))[-1] == $y
5612 0 0 0 defined $self->{'CURRENT_BITMAP'} || defined $self->{'REUSE_BITMAP'} and $self->{'BITMAP_OPERATORS'}[-1] eq '223000'
5635 0 0 0 defined $self->{'CURRENT_BITMAP'} || defined $self->{'REUSE_BITMAP'} and $self->{'BITMAP_OPERATORS'}[-1] eq '224000'
5658 0 0 0 defined $self->{'CURRENT_BITMAP'} || defined $self->{'REUSE_BITMAP'} and $self->{'BITMAP_OPERATORS'}[-1] eq '225000'
5688 0 0 0 defined $self->{'CURRENT_BITMAP'} || defined $self->{'REUSE_BITMAP'} and $self->{'BITMAP_OPERATORS'}[-1] eq '232000'

or 2 conditions

line l !l condition
259 2 0 shift() || 'all'
1313 1 5 shift() || ''
1345 1 0 shift() || ''
1346 0 1 shift() || ''
1348 1 0 $self->get_table_version($table) || ''
1430 0 15 $self->{'EOF'} || 0
1592 2 1 readline $filehandle || ' '
2111 0 0 shift() || {}
2113 0 0 $options->{'width'} || 15
2118 0 0 $self->get_current_ahl || ''
2235 8 0 $self->{'DESCRIPTORS_UNEXPANDED'} ||= ''
2253 0 0 shift() || 15
2263 0 0 $self->{'C_TABLE'} || ''
2406 0 0 shift() || 15
2442 0 0 $self->{'C_TABLE'} || ''
2815 0 0 $num_leading_spaces ||= 0
3740 0 0 shift() || 15

or 3 conditions

line l !l&&r !l&&!r condition
246 0 6 0 ref $class || $class
450 0 0 0 $optional_section eq '0' or $optional_section eq '1'
595 0 0 0 $month == 0 or $month > 12
610 0 0 0 $day == 0 or $day > 31
694 0 0 0 $observed_data eq '0' or $observed_data eq '1'
707 2 0 0 $compressed_data eq '0' or $compressed_data eq '1'
793 0 0 0 uc $format eq 'BUFRDC' or uc $format eq 'ECCODES'
841 0 0 2 $table =~ /wmo/ or $table =~ /local/
850 0 0 0 $table =~ /wmo/ or $table =~ /local/
868 0 0 5 $local_table_version == 0 or $local_table_version == 255
1218 0 0 535 $line eq 'NOT DEFINED' or $line eq 'RESERVED'
1224 1 0 3881 not defined $txt or $txt eq 'NOT DEFINED'
1 52 3829 not defined $txt or $txt eq 'NOT DEFINED' or $txt eq 'RESERVED'
1233 0 0 334 not defined $txt or $txt eq 'NOT DEFINED'
0 29 305 not defined $txt or $txt eq 'NOT DEFINED' or $txt eq 'RESERVED'
1319 4 2 0 $BUFR_table{"B$version"} || $self->_read_B_table_bufrdc($version)
1320 4 2 0 $BUFR_table{"D$version"} || $self->_read_D_table_bufrdc($version)
1324 0 0 0 $BUFR_table{"B$master"} || $self->_read_B_table_eccodes($master)
1325 0 0 0 $BUFR_table{"D$master"} || $self->_read_D_table_eccodes($master)
1336 0 0 0 $BUFR_table{"B$version"} || $self->_read_B_table_eccodes($version)
1337 0 0 0 $BUFR_table{"D$version"} || $self->_read_D_table_eccodes($version)
1349 1 0 0 $version or $default_table
1353 0 1 0 $BUFR_table{"C$version"} || $self->_read_C_table($version)
1357 0 0 0 $BUFR_table{"$master"} || $self->_read_C_table($master)
1365 0 0 0 $BUFR_table{"C$version"} || $self->_read_C_table_eccodes($version)
1375 0 0 0 $BUFR_table{"C$version"} || $self->_read_C_table($version)
1377 0 0 0 $BUFR_table{"C$version"} || $self->_read_C_table_eccodes($version)
1466 3 11 0 $filehandle or $in_buffer
1515 0 0 11 $edition < 2 or $edition > 4
1594 1 0 2 CORE::eof $filehandle or substr($slurp, -4) ne 'BUFR'
1652 0 0 5 $self->{'BAD_LENGTH'} or $self->{'ERROR_IN_MESSAGE'}
1656 0 5 0 $self->{'FILEHANDLE'} or $self->{'IN_BUFFER'}
1834 0 8 3 $Spew == 6 or $Nodata
1843 0 8 3 $self->{'IS_FILTERED'} or $Nodata
1873 0 0 3 $len > 4 or $len == 4 and substr($str, 0, 4) ne '7777'
1923 8 0 3 $Nodata or $self->{'IS_FILTERED'}
1985 0 0 0 substr($id, 0, 1) eq '0' and not exists $B_table->{$id} or substr($id, 0, 1) eq '3' and not exists $D_table->{$id}
2039 4 0 12 $self->{'CURRENT_MESSAGE'} == 0 or $self->{'ERROR_IN_MESSAGE'}
0 10 2 $self->{'CURRENT_MESSAGE'} == 0 or $self->{'ERROR_IN_MESSAGE'} or $self->{'CURRENT_SUBSET'} >= $self->{'NUM_SUBSETS'}
2073 8 0 3 $Nodata or $self->{'IS_FILTERED'}
2256 0 0 0 ref $width or not $width =~ /^\d+$/
2449 0 0 0 $id =~ /^22[2-5]/ || $id =~ /^232/
2728 0 0 0 $how eq 'simply' or $how eq 'partially'
2940 0 0 8 $_ eq '031011' or $_ eq '031012'
2951 0 0 14 $_ eq '031011' or $_ eq '031012'
3319 0 0 0 $_ eq '031011' or $_ eq '031012'
3871 0 0 0 /^$/ or /^Subset/
3880 0 0 0 $value eq '' or $value eq 'missing'
4211 0 0 2 not $factor =~ /^\d+$/ or $factor == 0
4358 352 0 0 $desc[$idesc] || _croak("No descriptor no. $idesc defined. Consider using --strict_checking 2" . ' or --verbose 4 to explore what went wrong in the encoding')
4396 0 0 6 $next_id eq '031011' or $next_id eq '031012'
4847 0 0 0 defined $value or defined $first_value
5062 0 0 0 $next_id eq '031011' or $next_id eq '031012'
5374 0 0 0 $year == 0 || $year == 2000
5569 0 0 0 $_ == 1 or $_ == 2
5612 0 0 0 defined $self->{'CURRENT_BITMAP'} || defined $self->{'REUSE_BITMAP'}
5635 0 0 0 defined $self->{'CURRENT_BITMAP'} || defined $self->{'REUSE_BITMAP'}
5658 0 0 0 defined $self->{'CURRENT_BITMAP'} || defined $self->{'REUSE_BITMAP'}
5688 0 0 0 defined $self->{'CURRENT_BITMAP'} || defined $self->{'REUSE_BITMAP'}