Branch Coverage

blib/lib/Algorithm/Networksort.pm
Criterion Covered Total %
branch 87 136 63.9


line true false branch
379 0 66 if $inputs < 2
384 0 66 if ($alg eq 'none')
386 0 0 unless $self->has_comparators
394 0 0 unless ($self->has_network and $self->depth > 0)
400 0 0 unless $self->has_title
403 0 0 unless $self->has_nwid
408 0 66 unless exists $algname{$alg}
411 8 58 if $alg eq 'bosenelson'
412 10 56 if $alg eq 'hibbard'
413 8 58 if $alg eq 'batcher'
414 8 58 if $alg eq 'bitonic'
415 8 58 if $alg eq 'bubble'
416 8 58 if $alg eq 'oddeventrans'
417 8 58 if $alg eq 'balanced'
418 8 58 if $alg eq 'oddevenmerge'
420 66 0 unless $self->has_title
468 0 0 if defined $algthm
537 36 108 if ($xbit != 0)
546 55 53 if ($ybit == 0)
550 19 36 if $y > $inputs - 1
560 10 56 if $bit == $lastbit
567 19 37 if ($y & $bit)
580 19 5 if $y < $inputs - 1
621 44 52 if ($length >= 2)
659 73 52 if ($length_i == 1 and $length_j == 1) { }
21 31 elsif ($length_i == 1 and $length_j == 2) { }
4 27 elsif ($length_i == 2 and $length_j == 1) { }
676 5 22 $length_i & 1 ? :
723 121 120 if ($i & $p) == $r
757 44 52 if ($n > 1)
768 104 148 if ($n > 1)
781 104 30 $dir ? :
808 44 90 if ($x > $y)
813 66 579 if $x == $j_x
814 53 592 if $x == $j_y
815 94 551 if $y == $j_x
816 41 604 if $y == $j_y
857 24 28 $odd ? :
897 223 193 if $wire1 < $inputs and $wire2 < $inputs
932 124 88 if $i < $inputs and $j < $inputs
939 64 72 if ($n > 1)
954 56 120 if ($m < $n) { }
1026 91519 427645 if (($array->[$left] <=> $array->[$right]) == 1)
1115 0 1 if (scalar @$network == 0)
1126 0 5 if defined $index_base
1217 0 2 if (scalar @$network == 0)
1226 1 1 $self->formats ? :
1227 1 1 unless (scalar @formats)
1237 0 5 if defined $index_base
1316 0 66 if ($grp =~ /^[0-9]+$/)
1326 0 66 unless ($grp =~ /^(graph|parallel)$/)
1345 1197 0 $grp eq 'parallel' ? :
1356 1024 1137 if grep {$_ != 0;} @{$node_range_stack[$col];}[@range]
1363 470 727 if (++$col == scalar @node_range_stack)
1640 0 0 if (defined $colorset{'background'})
1676 0 0 if ($cmptr[$clen] == 0)
1797 0 0 if ($node_column[$row] == 0) { }
0 0 elsif ($node_column[$row] == 1) { }
1799 0 0 $column_line[$col] == 1 ? :
1818 0 0 if ($row != $inputs - 1)
1824 0 0 $column_line[$col] == 0 ? :
1892 0 0 if scalar @_ == 0
1900 0 0 if (exists $colorset{$k}) { }
2037 0 0 if scalar @_ == 0
2045 0 0 if (exists $graphset{$k}) { }
2078 0 0 if $itemcount <= 1 and $itemcount >= -1
2080 0 0 if ($itemcount > 0) { }
2090 0 0 if @oldlist