Branch Coverage

blib/lib/Algorithm/Networksort.pm
Criterion Covered Total %
branch 87 138 63.0


line true false branch
298 0 0 unless (exists $algname{$key})
414 0 66 if $inputs < 2
419 0 66 if ($alg eq 'none')
421 0 0 unless $self->has_comparators
429 0 0 unless ($self->has_network and $self->depth > 0)
435 0 0 unless $self->has_title
438 0 0 unless $self->has_nwid
443 0 66 unless exists $algname{$alg}
446 8 58 if $alg eq 'bosenelson'
447 10 56 if $alg eq 'hibbard'
448 8 58 if $alg eq 'batcher'
449 8 58 if $alg eq 'bitonic'
450 8 58 if $alg eq 'bubble'
451 8 58 if $alg eq 'oddeventrans'
452 8 58 if $alg eq 'balanced'
453 8 58 if $alg eq 'oddevenmerge'
455 66 0 unless $self->has_title
503 0 0 if defined $algthm
572 36 108 if ($xbit != 0)
581 55 53 if ($ybit == 0)
585 19 36 if $y > $inputs - 1
595 10 56 if $bit == $lastbit
602 19 37 if ($y & $bit)
615 19 5 if $y < $inputs - 1
656 44 52 if ($length >= 2)
694 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) { }
711 5 22 $length_i & 1 ? :
758 121 120 if ($i & $p) == $r
792 44 52 if ($n > 1)
803 104 148 if ($n > 1)
816 104 30 $dir ? :
843 44 90 if ($x > $y)
848 66 579 if $x == $j_x
849 53 592 if $x == $j_y
850 94 551 if $y == $j_x
851 41 604 if $y == $j_y
892 24 28 $odd ? :
932 223 193 if $wire1 < $inputs and $wire2 < $inputs
967 124 88 if $i < $inputs and $j < $inputs
974 64 72 if ($n > 1)
989 56 120 if ($m < $n) { }
1061 91519 427645 if (($array->[$left] <=> $array->[$right]) == 1)
1150 0 1 if (scalar @$network == 0)
1161 0 5 if defined $index_base
1252 0 2 if (scalar @$network == 0)
1261 1 1 $self->formats ? :
1262 1 1 unless (scalar @formats)
1272 0 5 if defined $index_base
1351 0 66 if ($grp =~ /^[0-9]+$/)
1361 0 66 unless ($grp =~ /^(graph|parallel)$/)
1380 1197 0 $grp eq 'parallel' ? :
1391 1024 1137 if grep {$_ != 0;} @{$node_range_stack[$col];}[@range]
1398 470 727 if (++$col == scalar @node_range_stack)
1675 0 0 if (defined $colorset{'background'})
1711 0 0 if ($cmptr[$clen] == 0)
1832 0 0 if ($node_column[$row] == 0) { }
0 0 elsif ($node_column[$row] == 1) { }
1834 0 0 $column_line[$col] == 1 ? :
1853 0 0 if ($row != $inputs - 1)
1859 0 0 $column_line[$col] == 0 ? :
1927 0 0 if scalar @_ == 0
1935 0 0 if (exists $colorset{$k}) { }
2072 0 0 if scalar @_ == 0
2080 0 0 if (exists $graphset{$k}) { }
2113 0 0 if $itemcount <= 1 and $itemcount >= -1
2115 0 0 if ($itemcount > 0) { }
2125 0 0 if @oldlist