Condition Coverage

blib/lib/Geo/BUFR.pm
Criterion Covered Total %
condition 94 695 13.5


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
1247 0 0 0 not $path and $version =~ /wmo/
1279 0 0 0 $Strict_checking and $num ne $val
1292 0 0 0 $Strict_checking and not $C_table{$table}
1366 1 0 0 $default_table and not $self->{'C_TABLE'}
1573 9 0 2 $filehandle and not $self->{'BAD_LENGTH'}
1574 2 0 0 read($filehandle, $gts_eom, 4) == 4 and $gts_eom eq "\r\r\n\3"
1682 0 0 5 exists $self->{'START_POS'} and $self->{'BUFR_LENGTH'}
1853 11 0 0 $Strict_checking and $self->{'NUM_SUBSETS'} == 0
1854 11 0 0 $Strict_checking and ($sec3[3] & 63) != 0
1895 0 3 0 $len == 4 and substr($str, 0, 4) ne 7777
1900 0 0 0 $len > 4 and substr($str, 0, 4) eq 7777
0 0 0 $len == 4 and substr($str, 0, 4) ne 7777
2007 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}
2231 2 0 0 $self->{'LOCAL_USE'} and length $self->{'LOCAL_USE'} > 1
2241 0 0 0 defined $sec2_code_ref and ref $sec2_code_ref eq "CODE"
2295 0 0 0 $f == 9 and $id != 999999
2337 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
2338 0 0 0 $value ne "missing" and $value % 2
2348 0 0 0 $C_table and $id != 31031
0 0 0 $C_table and $id != 31031 and $value ne "missing"
2471 0 0 0 substr($id, 0, 1) eq 2 and $id =~ /^22[2-5]/ || $id =~ /^232/
2513 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
2514 0 0 0 $value ne "missing" and $value % 2
2523 0 0 0 $C_table and $value ne "missing"
2570 0 0 0 defined $check_illegal and $value > $max_value
2594 0 0 0 defined $check_illegal and $txt =~ /bit $width set/
2647 2 0 0 $di + 2 == @_ and $_[$di + 1] =~ /^0310(00|01|02|11|12)$/
2718 0 0 0 $BUFR_table{'FORMAT'} eq "ECCODES" and $self->{'LOCAL_TABLES_NOT_FOUND'}
2736 0 0 0 $need_Dtable and not $self->{'D_TABLE'}
2737 0 0 0 $BUFR_table{'FORMAT'} eq "ECCODES" and $self->{'LOCAL_TABLES_NOT_FOUND'}
2769 0 0 0 @desc == 1 and $desc[0] =~ /^1/
2807 0 0 1 defined $width and $width =~ /\d+$/
2936 0 0 0 $Spew and $x == 0
2949 0 0 14 /^0310(00|01|02|11|12)/ and exists $B_table->{$_}
3091 782 0 0 $self->{'ADD_ASSOCIATED_FIELD'} and $id ne "031021"
3112 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
3139 0 0 0 $unit ne "CCITTIA5" and not $unit =~ /^(CODE|FLAG)/
0 0 0 $unit eq "CCITTIA5" and defined $self->{'CHANGE_CCITTIA5_WIDTH'}
3154 0 0 0 defined $self->{'NEW_REFVAL_OF'}{$id} and defined $self->{'NEW_REFVAL_OF'}{$id}{$isub}
3205 782 0 0 $id eq "031031" and $self->{'BUILD_BITMAP'}
782 0 0 $self->{'BUILD_BITMAP'} and $self->{'BITMAP_INDEX'} > 0
3220 0 0 0 $desc[$i] ne $self->{'BITMAP_OPERATORS'}[-1] and $i >= 0
3222 0 0 0 $desc[$i] > 100000 and $i >= 0
3308 0 0 0 $Spew and $x == 0
3321 0 0 0 /^0310(00|01|02|11|12)/ and exists $B_table->{$_}
3465 0 0 0 $self->{'ADD_ASSOCIATED_FIELD'} and $id ne "031021"
3523 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
3563 0 0 0 $unit ne "CCITTIA5" and not $unit =~ /^(CODE|FLAG)/
0 0 0 $unit eq "CCITTIA5" and defined $self->{'CHANGE_CCITTIA5_WIDTH'}
3605 0 0 0 $deltabytes and defined $minval
3610 0 0 0 $Strict_checking and $minval ne "\0" x $nbytes
3647 0 0 0 $Spew and defined $minval
3654 0 0 0 $deltabits and defined $minval
3659 0 0 0 $Strict_checking and defined $value
0 0 0 $Strict_checking and defined $value and $value + $minval > 2 ** $width
3672 0 0 0 $id == 999999 and not defined $value
3694 0 0 0 $id == 999999 and not defined $value
3706 0 0 0 $id eq "031031" and $self->{'BUILD_BITMAP'}
0 0 0 $self->{'BUILD_BITMAP'} and $self->{'BITMAP_INDEX'} > 0
3722 0 0 0 $desc_ref->[$i] ne $self->{'BITMAP_OPERATORS'}[-1] and $i >= 0
3724 0 0 0 $desc_ref->[$i] > 100000 and $i >= 0
3730 0 0 0 $desc_ref->[$i] > 100000 and $i >= 0
3790 0 0 0 not $lines[$i] =~ /^Section 0/ and $i < @lines - 1
4229 0 0 2 /^0310(00|01|02|11|12)/ and exists $B_table->{$_}
4231 0 0 2 @delayed_repl and /^03100(1|2)/
4278 0 0 0 $unit ne "CCITTIA5" and not $unit =~ /^(CODE|FLAG)/
0 0 0 $unit eq "CCITTIA5" and defined $self->{'CHANGE_CCITTIA5_WIDTH'}
4399 0 0 6 $next_id =~ /^0310(00|01|02|11|12)/ and exists $B_table->{$next_id}
4503 346 0 0 $self->{'ADD_ASSOCIATED_FIELD'} and $id ne "031021"
4528 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
4549 346 0 0 $id eq "031031" and $self->{'BUILD_BITMAP'}
346 0 0 $self->{'BUILD_BITMAP'} and $self->{'BITMAP_INDEX'} > 0
4554 0 0 0 defined $value and $value == 0
4564 0 0 0 $desc[$i] ne $self->{'BITMAP_OPERATORS'}[-1] and $i >= 0
4566 0 0 0 $desc[$i] > 100000 and $i >= 0
4595 346 0 0 defined $self->{'NEW_REFVAL_OF'}{$id} and defined $self->{'NEW_REFVAL_OF'}{$id}{$isub}
4603 346 0 0 $self->{'NUM_CHANGE_OPERATORS'} > 0 and $id != 999999
4604 0 0 0 $unit ne "CCITTIA5" and not $unit =~ /^(CODE|FLAG)/
0 0 0 $unit eq "CCITTIA5" and defined $self->{'CHANGE_CCITTIA5_WIDTH'}
4618 0 0 0 defined $self->{'NEW_REFVAL_OF'}{$id} and defined $self->{'NEW_REFVAL_OF'}{$id}{$isub}
4656 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
4721 6 0 0 $self->{'NUM_CHANGE_OPERATORS'} > 0 and $id != 999999
4722 0 0 0 $unit ne "CCITTIA5" and not $unit =~ /^(CODE|FLAG)/
0 0 0 $unit eq "CCITTIA5" and defined $self->{'CHANGE_CCITTIA5_WIDTH'}
4736 0 0 0 defined $self->{'NEW_REFVAL_OF'}{$id} and defined $self->{'NEW_REFVAL_OF'}{$id}{$isub}
4774 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
4829 0 0 0 $self->{'NUM_CHANGE_OPERATORS'} > 0 and $id != 999999
4830 0 0 0 $unit ne "CCITTIA5" and not $unit =~ /^(CODE|FLAG)/
0 0 0 $unit eq "CCITTIA5" and defined $self->{'CHANGE_CCITTIA5_WIDTH'}
4864 0 0 0 defined $value and $unit ne "CCITTIA5"
0 0 0 defined $value and $unit ne "CCITTIA5" and not &looks_like_number($value)
4869 0 0 0 defined $value and defined $first_value
4887 0 0 0 $Strict_checking and $unit =~ /^FLAG[ ]?TABLE/
0 0 0 $Strict_checking and $unit =~ /^FLAG[ ]?TABLE/ and $width > 1
4888 0 0 0 defined $value and $value ne "missing"
0 0 0 defined $value and $value ne "missing" and $value % 2
4952 0 0 0 defined $first_value and not &looks_like_number($first_value)
4986 0 0 0 $Strict_checking and $value + $min_value > 2 ** $width - 1
5064 0 0 0 $next_id =~ /^0310(00|01|02|11|12)/ and exists $B_table->{$next_id}
5178 0 0 0 $self->{'ADD_ASSOCIATED_FIELD'} and $id ne "031021"
5208 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
5227 0 0 0 $id eq "031031" and $self->{'BUILD_BITMAP'}
0 0 0 $self->{'BUILD_BITMAP'} and $self->{'BITMAP_INDEX'} > 0
5244 0 0 0 $desc[$i] ne $self->{'BITMAP_OPERATORS'}[-1] and $i >= 0
5246 0 0 0 $desc[$i] > 100000 and $i >= 0
5317 0 0 0 $bufr_edition < 4 and $actual_bytes % 2
5323 0 0 0 $bufr_edition < 4 and $comp_bytes % 2
5337 7 0 0 $Strict_checking and $str =~ /^ +$/
5350 7 0 0 $Strict_checking and $str ne ""
5396 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
5477 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
5480 0 0 0 $Strict_checking and not grep({$_ == $x;} @operators)
5571 0 0 0 $xx < 48 and $yy < 192
5575 0 0 0 exists $self->{'B_TABLE'}{$next_id} and (split(/\0/, $self->{'B_TABLE'}{$next_id}, 0))[-1] == $y
5634 0 0 0 defined $self->{'CURRENT_BITMAP'} || defined $self->{'REUSE_BITMAP'} and $self->{'BITMAP_OPERATORS'}[-1] eq 223000
5657 0 0 0 defined $self->{'CURRENT_BITMAP'} || defined $self->{'REUSE_BITMAP'} and $self->{'BITMAP_OPERATORS'}[-1] eq 224000
5680 0 0 0 defined $self->{'CURRENT_BITMAP'} || defined $self->{'REUSE_BITMAP'} and $self->{'BITMAP_OPERATORS'}[-1] eq 225000
5710 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'
1310 1 5 shift() || ''
1342 1 0 shift() || ''
1343 0 1 shift() || ''
1345 1 0 $self->get_table_version($table) || ''
1427 0 15 $self->{'EOF'} || 0
1614 2 1 readline $filehandle || ' '
1627 0 0 $1 || ''
1645 5 1 $1 || ''
2133 0 0 shift() || {}
2135 0 0 $options->{'width'} || 15
2140 0 0 $self->get_current_ahl || ''
2257 8 0 $self->{'DESCRIPTORS_UNEXPANDED'} ||= ""
2275 0 0 shift() || 15
2285 0 0 $self->{'C_TABLE'} || ''
2428 0 0 shift() || 15
2464 0 0 $self->{'C_TABLE'} || ''
2837 0 0 $num_leading_spaces ||= 0
3762 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
790 0 0 0 uc $format eq "BUFRDC" or uc $format eq "ECCODES"
838 0 0 2 $table =~ /wmo/ or $table =~ /local/
847 0 0 0 $table =~ /wmo/ or $table =~ /local/
865 0 0 5 $local_table_version == 0 or $local_table_version == 255
1215 0 0 535 $line eq "NOT DEFINED" or $line eq "RESERVED"
1221 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"
1230 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"
1316 4 2 0 $BUFR_table{"B$version"} || $self->_read_B_table_bufrdc($version)
1317 4 2 0 $BUFR_table{"D$version"} || $self->_read_D_table_bufrdc($version)
1321 0 0 0 $BUFR_table{"B$master"} || $self->_read_B_table_eccodes($master)
1322 0 0 0 $BUFR_table{"D$master"} || $self->_read_D_table_eccodes($master)
1333 0 0 0 $BUFR_table{"B$version"} || $self->_read_B_table_eccodes($version)
1334 0 0 0 $BUFR_table{"D$version"} || $self->_read_D_table_eccodes($version)
1346 1 0 0 $version or $default_table
1350 0 1 0 $BUFR_table{"C$version"} || $self->_read_C_table($version)
1354 0 0 0 $BUFR_table{"$master"} || $self->_read_C_table($master)
1362 0 0 0 $BUFR_table{"C$version"} || $self->_read_C_table_eccodes($version)
1372 0 0 0 $BUFR_table{"C$version"} || $self->_read_C_table($version)
1374 0 0 0 $BUFR_table{"C$version"} || $self->_read_C_table_eccodes($version)
1464 3 11 0 $filehandle or $in_buffer
1515 0 0 11 $edition < 2 or $edition > 4
1616 1 0 2 CORE::eof $filehandle or substr($slurp, -4) ne "BUFR"
1674 0 0 5 $self->{'BAD_LENGTH'} or $self->{'ERROR_IN_MESSAGE'}
1678 0 5 0 $self->{'FILEHANDLE'} or $self->{'IN_BUFFER'}
1856 0 8 3 $Spew == 6 or $Nodata
1865 0 8 3 $self->{'IS_FILTERED'} or $Nodata
1895 0 0 3 $len > 4 or $len == 4 and substr($str, 0, 4) ne 7777
1945 8 0 3 $Nodata or $self->{'IS_FILTERED'}
2007 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}
2061 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'}
2095 8 0 3 $Nodata or $self->{'IS_FILTERED'}
2278 0 0 0 ref $width or not $width =~ /^\d+$/
2471 0 0 0 $id =~ /^22[2-5]/ || $id =~ /^232/
2750 0 0 0 $how eq "simply" or $how eq "partially"
2962 0 0 8 $_ eq "031011" or $_ eq "031012"
2973 0 0 14 $_ eq "031011" or $_ eq "031012"
3341 0 0 0 $_ eq "031011" or $_ eq "031012"
3893 0 0 0 /^$/ or /^Subset/
3902 0 0 0 $value eq "" or $value eq "missing"
4233 0 0 2 not $factor =~ /^\d+$/ or $factor == 0
4380 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')
4418 0 0 6 $next_id eq "031011" or $next_id eq "031012"
4869 0 0 0 defined $value or defined $first_value
5084 0 0 0 $next_id eq "031011" or $next_id eq "031012"
5396 0 0 0 $year == 0 || $year == 2000
5591 0 0 0 $_ == 1 or $_ == 2
5634 0 0 0 defined $self->{'CURRENT_BITMAP'} || defined $self->{'REUSE_BITMAP'}
5657 0 0 0 defined $self->{'CURRENT_BITMAP'} || defined $self->{'REUSE_BITMAP'}
5680 0 0 0 defined $self->{'CURRENT_BITMAP'} || defined $self->{'REUSE_BITMAP'}
5710 0 0 0 defined $self->{'CURRENT_BITMAP'} || defined $self->{'REUSE_BITMAP'}