Condition Coverage

blib/lib/PDL/IO/FITS.pm
Criterion Covered Total %
condition 104 197 52.7


and 3 conditions

line !l l&&!r l&&r condition
333 77 2 4 wantarray and not eof $fh
345 88 6 0 wantarray and not $opt->{'data'}
94 0 0 wantarray and not $opt->{'data'} and @extensions
346 0 0 0 read $fh, $line, 80 and not $line =~ /^XTENSION=/
0 0 0 read $fh, $line, 80 and not $line =~ /^XTENSION=/ and not $fh->eof
354 4 90 0 $nbytes == 0 and not $line =~ /^SIMPLE = +T/
381 6 77 11 not wantarray and $currentext != $extnum
406 35 0 59 $PDL::Astro_FITS_Header and $opt->{'afh'}
447 0 318 35 defined $name and $name eq "END"
468 7 74 13 not defined $foo->{'XTENSION'} and $foo->{'NAXIS'} == 0
81 2 11 not defined $foo->{'XTENSION'} and $foo->{'NAXIS'} == 0 and not wantarray
76 0 11 not defined $foo->{'XTENSION'} and $foo->{'NAXIS'} == 0 and not wantarray and not $explicit_extension
517 0 0 2 ref $extensions[0] eq "HASH" and $extensions[0]{'SIMPLE'}
0 0 2 ref $extensions[0] eq "HASH" and $extensions[0]{'SIMPLE'} and exists $extensions[0]{'NAXIS'}
0 0 2 ref $extensions[0] eq "HASH" and $extensions[0]{'SIMPLE'} and exists $extensions[0]{'NAXIS'} and $extensions[0]{'NAXIS'} == 0
587 70 0 116 defined $$foo{"NAXIS$i"} and $i <= $foo->{'NAXIS'}
624 33 35 2 $foo->{'BITPIX'} > 0 and exists $foo->{'BLANK'}
640 66 4 0 $pdl->badflag and $PDL::verbose
886 16 0 0 defined $_ && length $_
1148 0 0 8 $hdr->{'NAXIS2'} > 0 and $tmpcol->{'rpt'} > 0
1167 3 0 8 $hdr->{'ZIMAGE'} and $hdr->{'ZCMPTYPE'}
0 1 7 $hdr->{'ZIMAGE'} and $hdr->{'ZCMPTYPE'} and $opt->{'expand'}
1369 281 0 22 /^NAXIS/ && defined $$hdr{"Z$_"}
1775 30 33 6 $PDL::Astro_FITS_Header and defined $h
63 0 6 $PDL::Astro_FITS_Header and defined $h and ref $h eq "HASH"
33 3 3 $PDL::Astro_FITS_Header and defined $h and ref $h eq "HASH" and not defined tied %$h
1804 63 0 6 defined $h && defined tied %$h && UNIVERSAL::isa(tied %$h, 'Astro::FITS::Header')
1823 106 9 0 exists $ohdr{"NAXIS$_"} && $ohdr{"NAXIS$_"} != $pdl->dim($_ - 1)
1947 63 2 2 $pdl->badflag and $BITPIX < 0
1960 0 0 0 $pdl->badflag and $BITPIX < 0
1969 63 2 2 $pdl->badflag and $BITPIX < 0
2086 8 0 12 !(/^(hdr|tbl)$/ || /^len_/) && defined $hash->{$_}
2101 6 0 6 defined $rows and $rows != 1
2102 12 0 0 $r != $rows and $r != 1
2136 12 0 0 $name ne $key and $PDL::verbose
2181 6 0 0 $PDL::debug and $i != $cols
2283 0 0 3 UNIVERSAL::isa($var, 'PDL') && UNIVERSAL::isa($lengths, 'PDL')
2346 1 8 3 UNIVERSAL::isa($var, "PDL") and $var->ndims > 1

or 2 conditions

line l !l condition
845 0 8 $$hdr{"TNULL$i"} || 0
917 17 0 $$hdr{"TTYPE$i"} || 'COL'
935 17 0 $tmpcol->{'rpt'} ||= 1
974 8 0 $hdr->{'NAXIS2'} || 1

or 3 conditions

line l !l&&r !l&&!r condition
308 0 0 90 @_ < 1 or @_ > 2
356 0 0 94 eof $fh or not $ct
411 0 59 645 eof $fh or $line =~ /^END(\s|\000)/
482 0 2 81 not $opt->{'data'} or $foo->{'NAXIS'} == 0
497 0 0 0 $PDL::verbose or $PDL::debug
645 70 0 0 not defined $bscale or $bscale eq ""
646 70 0 0 not defined $bzero or $bzero eq ""
826 0 0 0 length $$hdr{"TSCAL$n"} or length $$hdr{"TZERO$n"}
923 0 0 17 defined $tbl->{$name} or $name eq "COL"
1079 0 0 8 $valid_tzero or $valid_tscal
1292 10 5 0 $$hdr{"ZTILE$_"} || ($_ == 1 ? $hdr->{'ZNAXIS1'} : 1)
1375 0 0 7 exists $hdr->{'BSCALE'} or exists $hdr->{'BLANK'}
1621 0 59 80 $hdrk eq "F" or $hdrk eq "T"
1668 0 0 74 $#_ < 1 or $#_ > 3
1681 0 69 0 ref $y eq "HASH" or not defined $y
1732 4 0 41 $pdl->get_datatype == $PDL::IO::FITS::PDL_S or $pdl->get_datatype == $PDL::IO::FITS::PDL_US
1761 0 0 36 $min < $dmin or $max > $dmax
1782 0 0 6 length $k > 8 or not $k =~ /^[A-Z_][A-Z\d\_]*$/i
1823 0 0 115 $correction ||= exists $ohdr{"NAXIS$_"} && $ohdr{"NAXIS$_"} != $pdl->dim($_ - 1)
2081 6 0 0 $tbl //= $hdr{'tbl'}
2136 0 0 12 $PDL::debug or $name ne $key and $PDL::verbose
2151 0 0 3 $num > $cols or $num < 1
2283 0 0 3 not UNIVERSAL::isa($var, 'PDL') && UNIVERSAL::isa($lengths, 'PDL') or $var->ndims - $lengths->ndims != 1
0 0 3 not UNIVERSAL::isa($var, 'PDL') && UNIVERSAL::isa($lengths, 'PDL') or $var->ndims - $lengths->ndims != 1 or $lengths->dim(0) != $var->dim(0)
2462 50 5 124 defined $newhdr{$field} or $field =~ /^end|simple|xtension$/i