Branch Coverage

blib/lib/Crypt/IDA.pm
Criterion Covered Total %
branch 152 258 58.9


line true false branch
49 2 16421 if ($_[0] eq $classname or ref $_[0] eq $classname) { }
76 0 24199 if ($_[0] eq $classname or ref $_[0] eq $classname) { }
96 0 15 if ($_[0] eq $classname or ref $_[0] eq $classname) { }
109 9 6 if ($offset)
115 0 34 if ($bytes < 0)
120 16 18 if ($rc == 0) { }
0 18 elsif ($rc < 0) { }
121 15 1 if ($align)
140 0 15 if ($_[0] eq $classname or ref $_[0] eq $classname) { }
152 0 15 unless sysopen $fh, $filename, 0
158 3 9 if ($_[0] eq $classname or ref $_[0] eq $classname) { }
169 9 3 if $offset
180 0 3 if ($_[0] eq $classname or ref $_[0] eq $classname) { }
193 0 3 unless sysopen $fh, $filename, 65, $perm
213 0 6920 if ($_[0] eq $classname or ref $_[0] eq $classname) { }
224 0 6920 unless defined $inorder
225 0 6920 unless defined $outorder
226 0 6920 unless defined $bytes_to_read
253 0 6920 if ($bytes_to_read % ($width * $xform->COLS))
257 0 6920 unless ($nfillers == 1 or $nfillers == $in->ROWS)
261 0 6920 unless ($nemptiers == 1 or $nemptiers == $out->ROWS)
268 4325 2595 if ($nfillers == 1) { }
269 0 4325 if ($in->ORG ne 'colwise' and $in->ROWS != 1)
278 0 2595 if ($in->ORG ne 'rowwise' and $in->ROWS != 1)
293 3675 3245 if ($nemptiers == 1) { }
294 0 3675 if ($out->ORG ne 'colwise' and $out->ROWS != 1)
303 0 3245 if ($out->ORG ne 'rowwise' and $out->ROWS != 1)
327 34174 0 if ($$fillers[$i]{'IW'} >= $IR + $i * $idown) { }
328 34174 0 if ($$fillers[$i]{'IW'} + $max_fill > $$fillers[$i]{'END'})
334 0 0 if ($$fillers[$i]{'IW'} + $max_fill >= $IR + $i * $idown)
342 12235 21939 if ($bytes_to_read and $bytes_read + $max_fill > $bytes_to_read)
354 0 34174 unless $max_fill >= 0
360 0 34174 if (not defined $str) { }
16430 17744 elsif ($str eq '') { }
383 0 17744 if length($aligned) % $width
385 0 17744 if $$fillers[$i]{'IW'} % $width
404 7011 10733 if ($$fillers[$i]{'IW'} > $$fillers[$i]{'END'})
408 11343 22831 if ($$fillers[$i]{'BF'} < $IFmin)
412 6920 8042 if ($eof)
414 0 6920 if ($eof % $nfillers)
434 11085 15703 if ($$emptiers[$i]{'OR'} >= $OW + $i * $odown) { }
435 11085 0 if ($$emptiers[$i]{'BF'} + $want_out_size > $OLEN)
441 0 15703 if ($$emptiers[$i]{'OR'} + $want_out_size > $OW + $i * $odown)
451 0 26788 if $max_empty > 0 and $max_empty < $width
460 0 26788 if $$emptiers[$i]{'OR'} % $width
482 0 26788 unless (defined $rc)
490 11085 15703 if ($$emptiers[$i]{'OR'} > $$emptiers[$i]{'END'})
493 0 26788 if ($$emptiers[$i]{'BF'} > $OFmax)
507 0 14962 if ($k + $start_in_col > $in->COLS)
510 0 14962 if ($k + $start_out_col > $out->COLS)
521 3619 11343 if ($IR > $$fillers[0]{'END'})
525 3619 11343 if ($OW > $$emptiers[0]{'END'})
537 8042 6920 if ($k)
554 0 3458 if ($_[0] eq $classname or ref $_[0] eq $classname) { }
565 0 2304 unless $bytes == 1 or $bytes == 2 or $bytes == 4
567 0 3458 if ($source eq 'rand')
572 0 3458 unless sysopen $fh, $source, 0
577 1154 2304 if ($bytes == 1) { }
1152 1152 elsif ($bytes == 2) { }
587 0 22464 if (defined $deinit)
591 0 22464 if ($bytes != sysread($fh, $buf, $bytes))
623 864 3746 unless defined $picks and $picks >= 0 and $picks < scalar @$array
629 20121 613635 if $i == $j
652 0 1 if ($_[0] eq $classname or ref $_[0] eq $classname) { }
667 0 1 unless defined $key
669 0 1 unless scalar @$key == $k + $n
684 0 6 if $v >= 256 ** $w
685 0 6 if exists $values{$v}
693 0 3458 if ($_[0] eq $classname or ref $_[0] eq $classname) { }
714 1154 2304 if ($w == 1) { }
722 0 22464 if exists $rolled{$r}
754 0 20751 if ($saw_val[$i]) { }
0 20751 elsif ($i < $min or $i > $max) { }
772 0 10381 if ($_[0] eq $classname or ref $_[0] eq $classname) { }
786 62286 0 exists $o{$_} ? :
791 0 10381 if (defined $key and defined $mat)
795 3459 6922 if (defined $key)
796 0 3459 unless (defined $n and defined $sharelist)
800 0 3459 unless (ref $key and scalar @$key == $k + $n)
805 3465 6916 if (defined $mat)
806 0 3465 if (ref $mat ne 'Math::FastGF2::Matrix')
810 0 3465 if ($mat->ORG ne 'rowwise')
814 0 3465 if ($mat->ROWS != $n or $mat->COLS != $k)
819 3460 6921 if (defined $sharelist)
821 0 3460 unless (scalar @$sharelist > 0)
832 0 3458 if ($_[0] eq $classname or ref $_[0] eq $classname) { }
848 24206 0 exists $o{$_} ? :
854 3458 0 unless (defined $skipchecks and $skipchecks)
855 0 3458 if (ida_check_transform_opts(%o))
866 0 3458 unless (defined $mat)
880 0 3458 if (defined $invert and $invert) { }
889 0 3461 if ($_[0] eq $classname or ref $_[0] eq $classname) { }
919 44993 0 exists $o{$_} ? :
927 0 2304 unless ($w == 1 or $w == 2 or $w == 4)
931 0 3461 unless ($k > 0 and $k < 256 ** $w)
935 0 3461 unless ($n > 0 and $k + $n < 256 ** $w)
939 0 3461 unless (defined $filler)
943 0 3461 unless (ref $emptiers and scalar @$emptiers == $n)
947 0 3461 unless (defined $bufsize and $bufsize > 0)
951 0 3461 unless (defined $inorder and $inorder >= 0 and $inorder <= 2)
955 0 3461 unless (defined $outorder and $outorder >= 0 and $outorder <= 2)
960 0 3461 if (ida_check_transform_opts(%o))
965 0 3461 if (defined $bytes_to_read and $bytes_to_read < 0)
970 1 3460 if (defined $sharelist) { }
974 1 0 if (defined $mat)
980 0 1 unless (defined $m2)
997 3456 5 unless (defined $mat)
998 0 3456 if (defined $key) { }
999 0 0 if (ida_check_key($k, $n, $w, $key))
1006 0 3456 unless (defined $rng)
1031 0 3461 unless (defined $in and defined $out)
1040 3461 0 if (defined $rc) { }
1050 0 3459 if ($_[0] eq $classname or ref $_[0] eq $classname) { }
1080 41508 0 exists $o{$_} ? :
1088 0 2304 unless ($w == 1 or $w == 2 or $w == 4)
1092 0 3459 unless ($k > 0 and $k < 256 ** $w)
1096 0 3459 unless (ref $fillers and scalar @$fillers == $k)
1100 0 3459 unless (defined $emptier)
1104 0 3459 unless (defined $bufsize and $bufsize > 0)
1108 0 3459 unless (defined $inorder and $inorder >= 0 and $inorder <= 2)
1113 0 3459 unless (defined $outorder and $outorder >= 0 and $outorder <= 2)
1118 0 3459 if (defined $key) { }
1119 0 0 if (ida_check_key($k, $n, $w, $key))
1127 0 3459 if (ida_check_transform_opts(%o))
1131 0 3459 if (defined $bytes_to_read and $bytes_to_read < 0)
1136 0 3459 if (defined $key)
1138 0 0 unless (scalar @$sharelist == $k)
1144 0 0 unless (defined $mat)
1159 0 3459 unless (defined $in and defined $out)