Condition Coverage

blib/lib/PDL/Core.pm
Criterion Covered Total %
condition 98 132 74.2


and 3 conditions

line !l l&&!r l&&r condition
842 5170 2683 0 $_[0]->badflag and $_[0] . '' eq "BAD"
1054 455 12 0 $has_nan and not $types[$type]->usenan
1060 459 8 0 $has_inf and not $types[$type]->usenan
1186 2940 151 83 $has_i and s/^${NUM_RE}i//i
2940 92 59 $has_i and s/^$NUM_RE([-+])${NUM_RE}i//i
1263 15584 0 3 ref $_[0] and UNIVERSAL::isa($_[0], "PDL")
1279 0 144 1 builtin::blessed($value) and UNIVERSAL::isa($value, "Math::Complex")
1288 7758 6 491 is_scalar_SvPOK($value) and $value =~ /inf/i || $value =~ /nan/i || !&Scalar::Util::looks_like_number($value)
7764 0 0 not $CAN_PACK_QUAD and $PDL::Core::pack[$new->get_datatype] =~ /^q\*$/i
7764 0 0 not $CAN_PACK_D and $PDL::Core::pack[$new->get_datatype] =~ /^(D\*|\(DD\)\*)$/
2349 2 2 0 $obj->affine && !$outs[0]->dimschgd
2713 71 279 29 builtin::blessed($pdl) and $pdl->is_inplace
2870 319 159 10 ref $_[0] && ref $_[0] ne 'PDL::Type'
2911 83 63 59 ref $_[0] && ref $_[0] ne 'PDL::Type'
2939 10 1 1 ref $_[0] && ref $_[0] ne 'PDL::Type'
2967 15 1 1 ref $_[0] && ref $_[0] ne 'PDL::Type'
2996 54 1 1 ref $_[0] && ref $_[0] ne 'PDL::Type'
3001 4 0 3 ref $args[0] eq "PDL::Type" and $args[0]->real
3007 51 0 2 ref $class and $class->type->real
3082 57 81 17 @_ == 2 and $_[1] == -1
3367 346 668 13 $self->badflag and $self->isbad
3644 0 56 3 $d[$j] != 1 and $resdims[$j] != $d[$j]
3658 3 2 36 not $@ and $yes_ndarray[0] == 0
3678 2 0 3 $@ and $@ =~ /mismatched/
3697 2 3 0 $@ and not $@ =~ /PDL::Ops::assgn|mismatched/
3806 725 220 142 $badflag && $_ eq 'BAD'
3841 3479 88 22 $badflag && $_ eq 'BAD'
4285 0 0 7 $writable && $shared

or 2 conditions

line l !l condition
455 253 39 $type //= 0
1271 115 1 $PDL::undefval // 0
2342 9 3 $sofar ||= {}

or 3 conditions

line l !l&&r !l&&!r condition
488 1300 879 0 ref $class || $class
826 38 12 0 ref $class || $class
1002 1 1 489 $value eq "" or $value eq "[]"
1147 4 0 0 $@ || "Internal error: unexpected output type ->$val<- is not ARRAY ref"
1186 9 0 3211 s/^inf//i or s/1\.\#INF//i
21 0 3190 s/^nan//i or s/^1\.\#IND//i
1273 7701 7883 0 $type //= ref $value ? _establish_type($value, $PDL::Core::PDL_D) : $PDL::Core::PDL_D
1288 23 468 6 $value =~ /inf/i || $value =~ /nan/i || !&Scalar::Util::looks_like_number($value)
2914 297 0 0 $pdl_ones[$pdl->get_datatype] // barf("Couldn't find 'one' for type ", $pdl->get_datatype)
3643 1 0 58 not defined $resdims[$j] or $resdims[$j] == 1
3697 3 2 0 @not_a_ndarray || @mismatched_dims
0 0 5 $@ and not $@ =~ /PDL::Ops::assgn|mismatched/ or not @not_a_ndarray || @mismatched_dims
3815 127 0 0 not defined $format or $format eq ""
4257 0 0 3 defined $pdl->gethdr or not defined $Astro::FITS::Header::VERSION