Branch Coverage

blib/lib/Lab/XPRESS/Sweep.pm
Criterion Covered Total %
branch 57 232 24.5


line true false branch
70 12 24 if (ref $v eq 'ARRAY') { }
83 2 0 if ($type =~ /HASH/u)
125 0 2 if ($self->{'config'}{'mode'} =~ /continuous|contious|cont|continuouse|continouse|coninuos|continuose/u)
132 0 2 if (ref $self->{'config'}{'points'} ne "ARRAY")
135 0 2 if (ref $self->{'config'}{'rate'} ne "ARRAY")
138 0 2 if (ref $self->{'config'}{'duration'} ne "ARRAY")
141 0 2 if (ref $self->{'config'}{'stepwidth'} ne "ARRAY")
144 0 2 if (ref $self->{'config'}{'number_of_points'} ne "ARRAY")
148 2 0 if (ref $self->{'config'}{'interval'} ne "ARRAY")
163 0 2 if ($length_points < 2 and $self->{'config'}{'mode'} ne "list")
168 0 2 if ($length_rate > $length_points)
172 0 2 if ($length_duration > $length_points)
176 0 2 if ($length_stepwidth > $length_points - 1 and $self->{'config'}{'mode'} ne "list")
181 0 2 if ($length_number_of_points > $length_points - 1 and $self->{'config'}{'mode'} ne "list")
186 0 2 if ($length_interval > $length_points and $self->{'config'}{'mode'} ne "list")
246 2 0 if (@{$$self{'config'}{'points'};}[$i] - @{$$self{'config'}{'points'};}[$i + 1] < 0) { }
0 0 elsif (@{$$self{'config'}{'points'};}[$i] - @{$$self{'config'}{'points'};}[$i + 1] > 0) { }
263 0 2 if (defined @{$$self{'config'}{'rate'};}[0] and defined @{$$self{'config'}{'duration'};}[0]) { }
0 2 elsif (defined @{$$self{'config'}{'duration'};}[0] and @{$$self{'config'}{'duration'};}[0] == 0) { }
0 2 elsif (defined @{$$self{'config'}{'rate'};}[0] and @{$$self{'config'}{'rate'};}[0] == 0) { }
0 2 elsif (defined @{$$self{'config'}{'duration'};}[0]) { }
2 0 elsif (defined @{$$self{'config'}{'rate'};}[0]) { }
294 0 2 if (defined @{$$self{'config'}{'stepwidth'};}[0] and defined @{$$self{'config'}{'number_of_points'};}[0]) { }
0 2 elsif (defined @{$$self{'config'}{'number_of_points'};}[0]) { }
2 0 elsif (defined @{$$self{'config'}{'stepwidth'};}[0]) { }
319 0 2 if ($self->{'config'}{'mode'} eq 'continuous') { }
2 0 elsif ($self->{'config'}{'mode'} eq 'step') { }
0 0 elsif ($self->{'config'}{'mode'} eq 'list') { }
320 0 0 unless (defined @{$$self{"config"}{"rate"};}[0] and defined @{$$self{"config"}{"duration"};}[0])
328 0 2 unless (defined @{$$self{"config"}{"stepwidth"};}[0] and defined @{$$self{"config"}{"number_of_points"};}[0])
351 22 0 if ($point != @{$temp_points;}[-1] or not defined @{$temp_points;}[-1])
388 0 0 unless (defined @{$$self{"config"}{"rate"};}[0])
395 0 2 if (defined @{$$self{"config"}{"allowed_instruments"};}[0] and not grep({$_ eq ref $self->{'config'}{'instrument'};} @{$$self{"config"}{"allowed_instruments"};}))
405 0 2 if (defined @{$$self{"config"}{"allowed_sweep_modes"};}[0] and not grep({$_ eq $self->{'config'}{'mode'};} @{$$self{"config"}{"allowed_sweep_modes"};}))
416 0 2 if ($self->{'config'}{'backsweep'} == 1)
489 2 0 unless (defined @{$$self{"slaves"};}[0])
490 0 2 if ($self->{'DataFile_counter'} <= 0)
495 0 2 if (defined @{$$self{"filename_extensions"};}[0])
500 0 0 if ($new_filenamebase ne $DataFile->{'file'})
537 0 2 if ($before_loop)
538 0 0 if (ref $before_loop ne "CODE")
545 0 2 if ($self->{'config'}{'mode'} eq "continuous")
558 22 0 if ($self->{'config'}{'mode'} =~ /step|list/u)
566 0 22 if (defined @{$$self{'slaves'};}[0]) { }
586 22 0 if ($DataFile->{'autolog'} == 1)
595 2 20 if ($self->exit_loop or $self->{'last'})
601 0 20 if ($self->{'config'}{'mode'} =~ /step|list/u and $PAUSE)
614 0 2 if ($PAUSE)
621 0 2 if ($self->{'config'}{'backsweep'} > 0)
638 26 0 if ($delay <= 0) { }
0 0 elsif ($delay > 1) { }
656 0 0 if ($self->{'config'}{'mode'} =~ /conti/u) { }
0 0 elsif ($self->{'config'}{'mode'} =~ /step|list/u) { }
679 0 0 if (not defined $self->{'master'})
705 0 0 if (not defined $self->{'master'}) { }
738 0 0 if ($self->{'config'}{'mode'} =~ /conti/u)
742 0 0 if ($self->{'config'}{'mode'} =~ /step/u)
771 0 0 if ($slave->{'config'}{'mode'} =~ /conti/u)
776 0 0 if ($slave->{'config'}{'mode'} =~ /step/u)
829 0 0 if ($filename =~ /(.+)(\..+)\b/u)
836 0 0 if ($self->{'config'}{'separate_files'} == 0) { }
0 0 elsif ($self->{'config'}{'separate_files'} == 1) { }
856 0 0 if ($self->{'config'}{'folders'} == 0)
890 2 0 if ($self eq @{$ACTIVE_SWEEPS;}[$i])
902 0 0 if ($file->{'logger'}{'plots'}[$_]{'autosave'} eq "always")
913 0 0 if ($file->{'logger'}{'plots'}[$_]{'autosave'} eq "last")
921 2 0 unless (defined $self->{'master'})
924 0 0 if ($file->{'logger'}{'plots'}[$_]{'autosave'} eq "last")
1005 0 20 if (defined $char)
1009 20 0 if (@{$$self{"config"}{"interval"};}[$self->{'sequence'}] == 0)
1013 0 0 if ($self->{'config'}{'mode'} =~ /step|list/u)
1019 0 0 unless (defined $self->{'loop'}{'t0'})
1024 0 0 if ($self->{'loop'}{'t1'} - $self->{'loop'}{'t0'} > @{$$self{"config"}{"interval"};}[$self->{'sequence'}])
1034 0 0 if (defined $self->{'config'}{'instrument'} and $self->{'config'}{'instrument'}->can("active"))
1048 0 0 if ($delta_time > @{$$self{'config'}{'interval'};}[$self->{'sequence'}]) { }
1078 0 0 if ($cmd eq 'g') { }
0 0 elsif ($cmd eq 'p') { }
1101 44 0 if (ref $args[0] eq 'HASH') { }
1102 33 11 defined $args[1] ? :
1103 0 44 unless (defined @{$$self{"DataFiles"};}[$args[1] - 1])
1113 0 0 defined $args[2] ? :
1114 0 0 unless (defined @{$$self{"DataFiles"};}[$args[2] - 1])
1127 0 0 if (not defined $file or $file == 0) { }
0 0 elsif (defined @{$$self{'DataFiles'};}[$file - 1]) { }
1147 0 0 if (not defined $file or $file == 0) { }
0 0 elsif (defined @{$$self{'DataFiles'};}[$file - 1]) { }
1167 22 0 if (not defined $file or $file == 0) { }
0 0 elsif (defined @{$$self{'DataFiles'};}[$file - 1]) { }
1195 0 110 if (defined @{$$self{'LOG'};}[$file]->{$column}) { }
110 0 elsif (defined @{$$self{'LOG'};}[0]->{$column}) { }
1202 0 0 if (exists @{$$self{'LOG'};}[$file]->{$column} or exists @{$$self{'LOG'};}[0]->{$column}) { }
1223 0 0 unless ($self->{'config'}{'mode'} =~ /step|list/u)
1230 0 0 if ($type =~ /^Lab::XPRESS::Sweep::Frame/u) { }
0 0 elsif ($type =~ /^Lab::XPRESS::Sweep/u) { }
0 0 elsif ($type eq 'CODE') { }
1231 0 0 if (not defined $slave->{'master'}) { }
0 0 elsif (not defined @{$$slave{'master'}{'slaves'};}[0]) { }
1247 0 0 if (defined $slave->{'master'})
1253 0 0 if ($slave->{'DataFile_counter'} <= 0 and not defined @{$$slave{"slaves"};}[-1])
1259 0 0 if ($answer =~ /y|Y/u) { }
0 0 elsif ($answer =~ /n|N/u) { }
1296 0 0 if $#_ < 0 or not defined $_[0]
1299 0 0 unless ref $_[0]
1301 0 0 if (UNIVERSAL::isa($obj, 'SCALAR')) { }
0 0 elsif (UNIVERSAL::isa($obj, 'HASH')) { }
0 0 elsif (UNIVERSAL::isa($obj, 'ARRAY')) { }
0 0 elsif (UNIVERSAL::isa($obj, 'REF')) { }
1308 0 0 if (not defined $obj->{$key} && ref $obj->{$key}) { }
1320 0 0 if (not defined $array_val && ref $array_val) { }
1351 0 0 unless my $type = ref $self
1357 0 0 if (exists $self->{'_permitted'}{$name}) { }
0 0 elsif ($name =~ qr/^(set_)(.*)$/u) { }
1358 0 0 if (@_) { }
1377 0 0 if (exists $self->{'config_original'}{$2}) { }
1378 0 0 if ($self->active)
1384 0 0 if (@_ == 1) { }