Condition Coverage

blib/lib/Geo/BUFR.pm
Criterion Covered Total %
condition 89 679 13.1


and 3 conditions

line !l l&&!r l&&r condition
183 0 52 1662 $level > $self->{'VERBOSE'} and $level > $Verbose
273 0 0 0 ref $value and not $key =~ /[BCD]_TABLE/
360 0 0 0 $bufr_edition >= 0 and $bufr_edition < 5
697 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
1236 0 0 0 not $path and $version =~ /wmo/
1268 0 0 0 $Strict_checking and $num ne $val
1281 0 0 0 $Strict_checking and not $C_table{$table}
1355 1 0 0 $default_table and not $self->{'C_TABLE'}
1646 0 0 5 exists $self->{'START_POS'} and $self->{'BUFR_LENGTH'}
1817 11 0 0 $Strict_checking and $self->{'NUM_SUBSETS'} == 0
1818 11 0 0 $Strict_checking and ($sec3[3] & 63) != 0
1859 0 3 0 $len == 4 and substr($str, 0, 4) ne '7777'
1864 0 0 0 $len > 4 and substr($str, 0, 4) eq '7777'
0 0 0 $len == 4 and substr($str, 0, 4) ne '7777'
1971 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}
2195 2 0 0 $self->{'LOCAL_USE'} and length $self->{'LOCAL_USE'} > 1
2205 0 0 0 defined $sec2_code_ref and ref $sec2_code_ref eq 'CODE'
2259 0 0 0 $f == 9 and $id != 999999
2298 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
2299 0 0 0 $value ne 'missing' and $value % 2
2309 0 0 0 $C_table and $id != 31031
0 0 0 $C_table and $id != 31031 and $value ne 'missing'
2432 0 0 0 substr($id, 0, 1) eq '2' and $id =~ /^22[2-5]/ || $id =~ /^232/
2474 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
2475 0 0 0 $value ne 'missing' and $value % 2
2484 0 0 0 $C_table and $value ne 'missing'
2531 0 0 0 defined $check_illegal and $value > $max_value
2555 0 0 0 defined $check_illegal and $txt =~ /bit $width set/
2599 2 0 0 $di + 2 == @_ and $_[$di + 1] =~ /^0310(00|01|02|11|12)$/
2670 0 0 0 $BUFR_table{'FORMAT'} eq 'ECCODES' and $self->{'LOCAL_TABLES_NOT_FOUND'}
2688 0 0 0 $need_Dtable and not $self->{'D_TABLE'}
2689 0 0 0 $BUFR_table{'FORMAT'} eq 'ECCODES' and $self->{'LOCAL_TABLES_NOT_FOUND'}
2721 0 0 0 @desc == 1 and $desc[0] =~ /^1/
2759 0 0 1 defined $width and $width =~ /\d+$/
2896 0 0 14 /^0310(00|01|02|11|12)/ and exists $B_table->{$_}
3038 782 0 0 $self->{'ADD_ASSOCIATED_FIELD'} and $id ne '031021'
3059 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'
3086 0 0 0 $unit ne 'CCITTIA5' and not $unit =~ /^(CODE|FLAG)/
0 0 0 $unit eq 'CCITTIA5' and defined $self->{'CHANGE_CCITTIA5_WIDTH'}
3101 0 0 0 defined $self->{'NEW_REFVAL_OF'}{$id} and defined $self->{'NEW_REFVAL_OF'}{$id}{$isub}
3152 782 0 0 $id eq '031031' and $self->{'BUILD_BITMAP'}
782 0 0 $self->{'BUILD_BITMAP'} and $self->{'BITMAP_INDEX'} > 0
3167 0 0 0 $desc[$i] ne $self->{'BITMAP_OPERATORS'}[-1] and $i >= 0
3169 0 0 0 $desc[$i] > 100000 and $i >= 0
3261 0 0 0 /^0310(00|01|02|11|12)/ and exists $B_table->{$_}
3405 0 0 0 $self->{'ADD_ASSOCIATED_FIELD'} and $id ne '031021'
3463 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'
3503 0 0 0 $unit ne 'CCITTIA5' and not $unit =~ /^(CODE|FLAG)/
0 0 0 $unit eq 'CCITTIA5' and defined $self->{'CHANGE_CCITTIA5_WIDTH'}
3545 0 0 0 $deltabytes and defined $minval
3550 0 0 0 $Strict_checking and $minval ne "\000" x $nbytes
3587 0 0 0 $Spew and defined $minval
3594 0 0 0 $deltabits and defined $minval
3599 0 0 0 $Strict_checking and defined $value
0 0 0 $Strict_checking and defined $value and $value + $minval > 2 ** $width
3612 0 0 0 $id == 999999 and not defined $value
3634 0 0 0 $id == 999999 and not defined $value
3646 0 0 0 $id eq '031031' and $self->{'BUILD_BITMAP'}
0 0 0 $self->{'BUILD_BITMAP'} and $self->{'BITMAP_INDEX'} > 0
3662 0 0 0 $desc_ref->[$i] ne $self->{'BITMAP_OPERATORS'}[-1] and $i >= 0
3664 0 0 0 $desc_ref->[$i] > 100000 and $i >= 0
3670 0 0 0 $desc_ref->[$i] > 100000 and $i >= 0
3730 0 0 0 not $lines[$i] =~ /^Section 0/ and $i < @lines - 1
4169 0 0 2 /^0310(00|01|02|11|12)/ and exists $B_table->{$_}
4171 0 0 2 @delayed_repl and /^03100(1|2)/
4218 0 0 0 $unit ne 'CCITTIA5' and not $unit =~ /^(CODE|FLAG)/
0 0 0 $unit eq 'CCITTIA5' and defined $self->{'CHANGE_CCITTIA5_WIDTH'}
4339 0 0 6 $next_id =~ /^0310(00|01|02|11|12)/ and exists $B_table->{$next_id}
4443 346 0 0 $self->{'ADD_ASSOCIATED_FIELD'} and $id ne '031021'
4468 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'
4489 346 0 0 $id eq '031031' and $self->{'BUILD_BITMAP'}
346 0 0 $self->{'BUILD_BITMAP'} and $self->{'BITMAP_INDEX'} > 0
4494 0 0 0 defined $value and $value == 0
4504 0 0 0 $desc[$i] ne $self->{'BITMAP_OPERATORS'}[-1] and $i >= 0
4506 0 0 0 $desc[$i] > 100000 and $i >= 0
4535 346 0 0 defined $self->{'NEW_REFVAL_OF'}{$id} and defined $self->{'NEW_REFVAL_OF'}{$id}{$isub}
4543 346 0 0 $self->{'NUM_CHANGE_OPERATORS'} > 0 and $id != 999999
4544 0 0 0 $unit ne 'CCITTIA5' and not $unit =~ /^(CODE|FLAG)/
0 0 0 $unit eq 'CCITTIA5' and defined $self->{'CHANGE_CCITTIA5_WIDTH'}
4558 0 0 0 defined $self->{'NEW_REFVAL_OF'}{$id} and defined $self->{'NEW_REFVAL_OF'}{$id}{$isub}
4596 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
4661 6 0 0 $self->{'NUM_CHANGE_OPERATORS'} > 0 and $id != 999999
4662 0 0 0 $unit ne 'CCITTIA5' and not $unit =~ /^(CODE|FLAG)/
0 0 0 $unit eq 'CCITTIA5' and defined $self->{'CHANGE_CCITTIA5_WIDTH'}
4676 0 0 0 defined $self->{'NEW_REFVAL_OF'}{$id} and defined $self->{'NEW_REFVAL_OF'}{$id}{$isub}
4714 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
4769 0 0 0 $self->{'NUM_CHANGE_OPERATORS'} > 0 and $id != 999999
4770 0 0 0 $unit ne 'CCITTIA5' and not $unit =~ /^(CODE|FLAG)/
0 0 0 $unit eq 'CCITTIA5' and defined $self->{'CHANGE_CCITTIA5_WIDTH'}
4804 0 0 0 defined $value and $unit ne 'CCITTIA5'
0 0 0 defined $value and $unit ne 'CCITTIA5' and not &looks_like_number($value)
4809 0 0 0 defined $value and defined $first_value
4827 0 0 0 $Strict_checking and $unit =~ /^FLAG[ ]?TABLE/
0 0 0 $Strict_checking and $unit =~ /^FLAG[ ]?TABLE/ and $width > 1
4828 0 0 0 defined $value and $value ne 'missing'
0 0 0 defined $value and $value ne 'missing' and $value % 2
4892 0 0 0 defined $first_value and not &looks_like_number($first_value)
4926 0 0 0 $Strict_checking and $value + $min_value > 2 ** $width - 1
5004 0 0 0 $next_id =~ /^0310(00|01|02|11|12)/ and exists $B_table->{$next_id}
5118 0 0 0 $self->{'ADD_ASSOCIATED_FIELD'} and $id ne '031021'
5148 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'
5167 0 0 0 $id eq '031031' and $self->{'BUILD_BITMAP'}
0 0 0 $self->{'BUILD_BITMAP'} and $self->{'BITMAP_INDEX'} > 0
5184 0 0 0 $desc[$i] ne $self->{'BITMAP_OPERATORS'}[-1] and $i >= 0
5186 0 0 0 $desc[$i] > 100000 and $i >= 0
5257 0 0 0 $bufr_edition < 4 and $actual_bytes % 2
5263 0 0 0 $bufr_edition < 4 and $comp_bytes % 2
5277 7 0 0 $Strict_checking and $str =~ /^ +$/
5290 7 0 0 $Strict_checking and $str ne ''
5336 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
5417 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
5420 0 0 0 $Strict_checking and not grep({$_ == $x;} @operators)
5511 0 0 0 $xx < 48 and $yy < 192
5515 0 0 0 exists $self->{'B_TABLE'}{$next_id} and (split(/\0/, $self->{'B_TABLE'}{$next_id}, 0))[-1] == $y
5574 0 0 0 defined $self->{'CURRENT_BITMAP'} || defined $self->{'REUSE_BITMAP'} and $self->{'BITMAP_OPERATORS'}[-1] eq '223000'
5597 0 0 0 defined $self->{'CURRENT_BITMAP'} || defined $self->{'REUSE_BITMAP'} and $self->{'BITMAP_OPERATORS'}[-1] eq '224000'
5620 0 0 0 defined $self->{'CURRENT_BITMAP'} || defined $self->{'REUSE_BITMAP'} and $self->{'BITMAP_OPERATORS'}[-1] eq '225000'
5650 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
252 2 0 shift() || 'all'
1299 1 5 shift() || ''
1331 1 0 shift() || ''
1332 0 1 shift() || ''
1334 1 0 $self->get_table_version($table) || ''
1416 0 15 $self->{'EOF'} || 0
1578 2 1 readline $filehandle || ' '
2097 0 0 shift() || {}
2099 0 0 $options->{'width'} || 15
2104 0 0 $self->get_current_ahl || ''
2221 8 0 $self->{'DESCRIPTORS_UNEXPANDED'} ||= ''
2239 0 0 shift() || 15
2249 0 0 $self->{'C_TABLE'} || ''
2389 0 0 shift() || 15
2425 0 0 $self->{'C_TABLE'} || ''
2789 0 0 $num_leading_spaces ||= 0
3702 0 0 shift() || 15

or 3 conditions

line l !l&&r !l&&!r condition
239 0 6 0 ref $class || $class
436 0 0 0 $optional_section eq '0' or $optional_section eq '1'
581 0 0 0 $month == 0 or $month > 12
596 0 0 0 $day == 0 or $day > 31
680 0 0 0 $observed_data eq '0' or $observed_data eq '1'
693 2 0 0 $compressed_data eq '0' or $compressed_data eq '1'
779 0 0 0 uc $format eq 'BUFRDC' or uc $format eq 'ECCODES'
827 0 0 2 $table =~ /wmo/ or $table =~ /local/
836 0 0 0 $table =~ /wmo/ or $table =~ /local/
854 0 0 5 $local_table_version == 0 or $local_table_version == 255
1204 0 0 535 $line eq 'NOT DEFINED' or $line eq 'RESERVED'
1210 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'
1219 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'
1305 4 2 0 $BUFR_table{"B$version"} || $self->_read_B_table_bufrdc($version)
1306 4 2 0 $BUFR_table{"D$version"} || $self->_read_D_table_bufrdc($version)
1310 0 0 0 $BUFR_table{"B$master"} || $self->_read_B_table_eccodes($master)
1311 0 0 0 $BUFR_table{"D$master"} || $self->_read_D_table_eccodes($master)
1322 0 0 0 $BUFR_table{"B$version"} || $self->_read_B_table_eccodes($version)
1323 0 0 0 $BUFR_table{"D$version"} || $self->_read_D_table_eccodes($version)
1335 1 0 0 $version or $default_table
1339 0 1 0 $BUFR_table{"C$version"} || $self->_read_C_table($version)
1343 0 0 0 $BUFR_table{"$master"} || $self->_read_C_table($master)
1351 0 0 0 $BUFR_table{"C$version"} || $self->_read_C_table_eccodes($version)
1361 0 0 0 $BUFR_table{"C$version"} || $self->_read_C_table($version)
1363 0 0 0 $BUFR_table{"C$version"} || $self->_read_C_table_eccodes($version)
1452 3 11 0 $filehandle or $in_buffer
1501 0 0 11 $edition < 2 or $edition > 4
1580 1 0 2 CORE::eof $filehandle or substr($slurp, -4) ne 'BUFR'
1638 0 0 5 $self->{'BAD_LENGTH'} or $self->{'ERROR_IN_MESSAGE'}
1642 0 5 0 $self->{'FILEHANDLE'} or $self->{'IN_BUFFER'}
1820 0 8 3 $Spew == 6 or $Nodata
1829 0 8 3 $self->{'IS_FILTERED'} or $Nodata
1859 0 0 3 $len > 4 or $len == 4 and substr($str, 0, 4) ne '7777'
1909 8 0 3 $Nodata or $self->{'IS_FILTERED'}
1971 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}
2025 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'}
2059 8 0 3 $Nodata or $self->{'IS_FILTERED'}
2242 0 0 0 ref $width or not $width =~ /^\d+$/
2432 0 0 0 $id =~ /^22[2-5]/ || $id =~ /^232/
2702 0 0 0 $how eq 'simply' or $how eq 'partially'
2909 0 0 8 $_ eq '031011' or $_ eq '031012'
2920 0 0 14 $_ eq '031011' or $_ eq '031012'
3281 0 0 0 $_ eq '031011' or $_ eq '031012'
3833 0 0 0 /^$/ or /^Subset/
3842 0 0 0 $value eq '' or $value eq 'missing'
4173 0 0 2 not $factor =~ /^\d+$/ or $factor == 0
4320 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')
4358 0 0 6 $next_id eq '031011' or $next_id eq '031012'
4809 0 0 0 defined $value or defined $first_value
5024 0 0 0 $next_id eq '031011' or $next_id eq '031012'
5336 0 0 0 $year == 0 || $year == 2000
5531 0 0 0 $_ == 1 or $_ == 2
5574 0 0 0 defined $self->{'CURRENT_BITMAP'} || defined $self->{'REUSE_BITMAP'}
5597 0 0 0 defined $self->{'CURRENT_BITMAP'} || defined $self->{'REUSE_BITMAP'}
5620 0 0 0 defined $self->{'CURRENT_BITMAP'} || defined $self->{'REUSE_BITMAP'}
5650 0 0 0 defined $self->{'CURRENT_BITMAP'} || defined $self->{'REUSE_BITMAP'}