Branch Coverage

blib/lib/Lab/Instrument/HP33120A.pm
Criterion Covered Total %
branch 0 488 0.0


line true false branch
112 0 0 ($stb & 16) == 0 ? :
113 0 0 ($esr & 60) == 0 ? :
114 0 0 ($esr & 4) == 0 ? :
115 0 0 ($esr & 8) == 0 ? :
116 0 0 ($esr & 16) == 0 ? :
117 0 0 ($esr & 32) == 0 ? :
118 0 0 ($esr & 128) == 0 ? :
119 0 0 ($esr & 1) == 0 ? :
127 0 0 if ($err =~ /^\s*\+?0+\s*,/u)
188 0 0 if ($mod =~ /^SWE/iu)
206 0 0 if ($in =~ /^\s*[p+]/iu) { }
0 0 elsif ($in =~ /^\s*[n\-]/iu) { }
244 0 0 if ($in =~ /^\s*IMM/iu) { }
0 0 elsif ($in =~ /^\s*BUS/iu) { }
0 0 elsif ($in =~ /^\s*EXT/iu) { }
266 0 0 if ($in =~ /^\s*(1|on|t|y)/iu) { }
0 0 elsif ($in =~ /^\s*(0|of|f|n)/iu) { }
325 0 0 if ($in =~ /^\s*(1|on|t|y)/iu) { }
0 0 elsif ($in =~ /^\s*(0|of|f|n)/iu) { }
344 0 0 if ($n < 0 or $n > 3)
357 0 0 if ($n < 0 or $n > 3)
374 0 0 if ($n < 0 or $n > 3)
386 0 0 if $z > 1000
396 0 0 if ($in =~ /^\s*inf/iu) { }
401 0 0 if ($zin =~ /^ERR/iu)
407 0 0 if ($zin ne 'MIN' and $zin ne 'MAX') { }
408 0 0 if ($zin > 40 and $zin < 60) { }
0 0 elsif ($zin > 50000) { }
438 0 0 if ($shape =~ /^SIN/iu) { }
0 0 elsif ($shape =~ /^SQU/iu) { }
0 0 elsif ($shape =~ /^TRI/iu) { }
0 0 elsif ($shape =~ /^RAMP/iu) { }
0 0 elsif ($shape =~ /^NOIS/iu) { }
0 0 elsif ($shape =~ /^DC/iu) { }
0 0 elsif ($shape =~ /^USER/iu) { }
479 0 0 if ($f =~ /^ERR/iu)
485 0 0 if ($f ne "MIN" and $f ne "MAX")
489 0 0 if $shape eq "RAMP" or $shape eq "TRI"
490 0 0 if $shape eq "USER"
492 0 0 if ($f < "0.0001" or $f > $maxf)
513 0 0 if ($dc =~ /^ERR/iu)
518 0 0 if ($dc ne "MIN" and $dc ne "MAX")
524 0 0 if ($f > 5000000)
528 0 0 if ($dc < $dcmin or $dc > $dcmax)
549 0 0 if ($v =~ /^ERR/iu)
554 0 0 if ($v ne "MIN" and $v ne "MAX")
562 0 0 if ($u eq 'VPP') { }
0 0 elsif ($u eq 'VRMS' or $u eq 'DBM') { }
568 0 0 if ($s eq 'SQU') { }
0 0 elsif ($s eq 'DC') { }
0 0 elsif ($s eq 'SIN') { }
0 0 elsif ($s eq 'TRI' or $s eq 'RAMP') { }
0 0 elsif ($s eq 'NOIS') { }
0 0 elsif ($s eq 'USER') { }
590 0 0 if $z == 50
591 0 0 if $z == 50
593 0 0 if ($vpp < $vmin or $vpp > $vmax)
599 0 0 if (abs $voff > 2 * $vpp)
604 0 0 if (abs($voff) + "0.5" * $vpp > $vmax)
627 0 0 if ($in =~ /pp/iu) { }
0 0 elsif ($in =~ /rms/iu) { }
0 0 elsif ($in =~ /dbm/iu) { }
0 0 elsif ($in =~ /def/iu) { }
659 0 0 if ($voff =~ /^ERR/u)
664 0 0 if ($voff ne "MIN" and $voff ne "MAX")
668 0 0 if ($u ne 'VPP') { }
679 0 0 if $z == 50
680 0 0 if (abs $voff > 2 * $vpp)
685 0 0 if (abs($voff) + "0.5" * $vpp > $vmax)
702 0 0 unless defined $read_mode
704 0 0 if ($read_mode eq "cache" and $#{$$self{"waveform"}{"user"};} >= 0 and not $self->{'config'}{'no_cache'})
728 0 0 if (not $in =~ /^[a-z]\w+$/iu or length $in > 8)
739 0 0 if $wf eq $in
741 0 0 if ($got == 0)
756 0 0 if (ref $arg eq 'HASH') { }
757 0 0 if (exists $arg->{'waveform'} and ref $arg->{'waveform'} eq 'ARRAY') { }
0 0 elsif (exists $arg->{'dac'} and ref $arg->{'dac'} eq 'ARRAY') { }
766 0 0 if (ref $arg eq 'ARRAY') { }
0 0 elsif (ref $arg eq '') { }
773 0 0 if (defined $fwfd)
776 0 0 unless defined $minv and $minv < $v
777 0 0 unless defined $maxv and $maxv > $v
779 0 0 if ($minv < -1 and $maxv > 1)
786 0 0 unless (defined $fwfd or defined $dac)
793 0 0 if (defined $dac)
798 0 0 if (abs $d > 2047)
809 0 0 if (defined $fwfd)
814 0 0 if (abs $v > 1)
823 0 0 if ($npts < 8 or $npts > 16000)
835 0 0 unless (defined $name)
843 0 0 if uc $s eq $name
844 0 0 if $got
846 0 0 unless ($got)
858 0 0 unless (defined $name)
866 0 0 if uc $s eq $name
867 0 0 if $got
869 0 0 unless ($got)
881 0 0 unless (defined $name)
889 0 0 if uc $s eq $name
890 0 0 if $got
892 0 0 unless ($got)
904 0 0 unless (defined $name)
912 0 0 if uc $s eq $name
913 0 0 if $got
915 0 0 unless ($got)
929 0 0 unless ($name =~ /^[a-z]\w+$/iu)
934 0 0 if (length $name > 8)
940 0 0 if ($name eq "SINC" or $name eq "NEG_RAMP" or $name eq "EXP_RISE" or $name eq "EXP_FALL" or $name eq "CARDIAC" or $name eq "VOLATILE")
954 0 0 if uc $s eq $name
955 0 0 if $got
957 0 0 if (not $got and $#w == 9)
971 0 0 unless ($name =~ /^[a-z]\w+$/iu)
976 0 0 if (length $name > 8)
982 0 0 if ($name eq "SINC" or $name eq "NEG_RAMP" or $name eq "EXP_RISE" or $name eq "EXP_FALL" or $name eq "CARDIAC")
995 0 0 if uc $s eq $name
996 0 0 if $got
998 0 0 unless ($got)
1016 0 0 if $self->query("AM:STAT?")
1017 0 0 if $self->query("FM:STAT?")
1018 0 0 if $self->query("BM:STAT?")
1019 0 0 if $self->query("FSK:STAT?")
1020 0 0 if $self->query("SWE:STAT?")
1029 0 0 unless defined $in
1030 0 0 if $in eq ""
1034 0 0 if ($in =~ /^NO/iu or $in =~ /^OF/iu) { }
0 0 elsif ($in =~ /^AM/iu) { }
0 0 elsif ($in =~ /^FM/iu) { }
0 0 elsif ($in =~ /^BUR/iu) { }
0 0 elsif ($in =~ /^FSK/iu) { }
0 0 elsif ($in =~ /^SWE/iu) { }
1060 0 0 if $cm eq "BURST"
1061 0 0 if $cm eq "SWEEP"
1062 0 0 if ($m eq 'NONE') { }
1066 0 0 if ($cm ne "NONE")
1078 0 0 if ($d =~ /^ERR:/u)
1083 0 0 if ($d ne "MIN" and $d ne "MAX")
1085 0 0 if ($d < 0 or $d > 120)
1113 0 0 if ($in =~ /^sin/iu) { }
0 0 elsif ($in =~ /^squ/iu) { }
0 0 elsif ($in =~ /^tri/iu) { }
0 0 elsif ($in =~ /^ram/iu) { }
0 0 elsif ($in =~ /^noi/iu) { }
0 0 elsif ($in =~ /^use/iu) { }
1153 0 0 if ($f =~ /^ERR:/u)
1159 0 0 if ($f ne "MIN" and $f ne "MAX")
1160 0 0 if ($f < "0.01" or $f > 20000)
1181 0 0 if ($in =~ /^\s*BOTH/iu) { }
0 0 elsif ($in =~ /^\s*INT/iu) { }
0 0 elsif ($in =~ /^\s*EXT/iu) { }
1210 0 0 if ($d ne "MIN" and $d ne "MAX")
1214 0 0 if $s eq "TRI" or $s eq "RAMP"
1215 0 0 if $s eq "USER"
1217 0 0 if ($d < "0.01" or $d > $f or $d + $f > $fmax)
1239 0 0 if ($in =~ /^sin/iu) { }
0 0 elsif ($in =~ /^squ/iu) { }
0 0 elsif ($in =~ /^tri/iu) { }
0 0 elsif ($in =~ /^ram/iu) { }
0 0 elsif ($in =~ /^noi/iu) { }
0 0 elsif ($in =~ /^use/iu) { }
1279 0 0 if ($f =~ /^ERR:/u)
1285 0 0 if ($f ne "MIN" and $f ne "MAX")
1286 0 0 if ($f < "0.01" or $f > 10000)
1306 0 0 if ($in =~ /^\s*min/iu) { }
0 0 elsif ($in =~ /\s*max/iu) { }
0 0 elsif ($in =~ /\s*inf/iu) { }
0 0 elsif ($in =~ /\s*(\d+)/u) { }
1322 0 0 if $f <= 100
1324 0 0 if ($s eq "SIN" or $s eq "SQU" or $s eq "USER")
1325 0 0 if ($f <= 1000000) { }
0 0 elsif ($f <= 2000000) { }
0 0 elsif ($f <= 3000000) { }
0 0 elsif ($f <= 4000000) { }
0 0 elsif ($f < 5000000) { }
1342 0 0 if ($ncyc < $nmin or $ncyc > $nmax)
1369 0 0 if ($ph =~ /^ERR:/u)
1375 0 0 if ($ph ne "MIN" and $ph ne "MAX")
1377 0 0 if ($ph < -360 or $ph > 360)
1400 0 0 if ($f =~ /^ERR:/u)
1406 0 0 if ($f ne "MIN" and $f ne "MAX")
1407 0 0 if ($f < "0.01" or $f > 50000)
1427 0 0 if ($in =~ /^\s*IN/iu) { }
0 0 elsif ($in =~ /^\s*EX/iu) { }
1454 0 0 if ($f =~ /^ERR:/u)
1460 0 0 if ($f ne "MIN" and $f ne "MAX")
1463 0 0 if $s eq "TRI" or $s eq "RAMP"
1464 0 0 if ($f < "0.01" or $f > $fmax)
1486 0 0 if ($f =~ /^ERR:/u)
1491 0 0 if ($f ne "MIN" and $f ne "MAX")
1492 0 0 if ($f < "0.01" or $f > 50000)
1512 0 0 if ($in =~ /^\s*IN/iu) { }
0 0 elsif ($in =~ /^\s*EX/iu) { }
1545 0 0 if ($f =~ /^ERR:/u)
1551 0 0 if ($f ne "MIN" and $f ne "MAX")
1552 0 0 if ($f < "0.01" or $f > 15000000)
1568 0 0 if ($f =~ /^ERR:/u)
1574 0 0 if ($f ne "MIN" and $f ne "MAX")
1575 0 0 if ($f < "0.01" or $f > 15000000)
1596 0 0 if ($in =~ /^\s*LIN/iu) { }
0 0 elsif ($in =~ /^\s*LOG/iu) { }
1622 0 0 if ($t =~ /ERR/iu)
1627 0 0 if ($t ne "MIN" and $t ne "MAX")
1628 0 0 if ($t < 1000 or $t > 500)
1642 0 0 unless $str =~ /,\s*$/u
1647 0 0 if ($str =~ /^\"(([^\"]|\"\")+)\"\s*,/iu) { }
0 0 elsif ($str =~ /^\'(([^\']|\'\')+)\'\s*,/iu) { }
0 0 elsif ($str =~ /^([^,]*[^,\s])\s*,/iu) { }
1684 0 0 if ref $in eq "HASH"
1686 0 0 unless defined $un
1689 0 0 if (ref $un eq 'ARRAY') { }
0 0 elsif (ref $un eq 'SCALAR') { }
0 0 elsif (ref $un eq '') { }
1703 0 0 if ($str =~ /^MIN/iu)
1706 0 0 if ($str =~ /^MAX/iu)
1712 0 0 if ($str =~ /^([+\-]?(\d+\.\d*|\d+|\d*\.\d+))\s*/iu)
1715 0 0 if $str eq ""
1716 0 0 if ($str =~ /^e\s*([+\-]?\d+)\s*/iu)
1720 0 0 if $str eq ""
1730 0 0 if ($u =~ /^db/iu) { }
1732 0 0 if ($str =~ /^dBex($dbt)?$/iu) { }
0 0 elsif ($str =~ /^dBpe($dbt)?$/iu) { }
0 0 elsif ($str =~ /^dBt($dbt)?$/iu) { }
0 0 elsif ($str =~ /^dBg($dbt)?$/iu) { }
0 0 elsif ($str =~ /^dBma($dbt)$/iu) { }
0 0 elsif ($str =~ /^dBk($dbt)?$/iu) { }
0 0 elsif ($str =~ /^dBm($dbt)?$/iu) { }
0 0 elsif ($str =~ /^dBu($dbt)?$/iu) { }
0 0 elsif ($str =~ /^dBn($dbt)?$/iu) { }
0 0 elsif ($str =~ /^dBp($dbt)?$/iu) { }
0 0 elsif ($str =~ /^dBf($dbt)?$/iu) { }
0 0 elsif ($str =~ /^dB$dbt$/iu) { }
1773 0 0 if ($str =~ /^ex($u)?$/iu) { }
0 0 elsif ($str =~ /^pe($u)?$/iu) { }
0 0 elsif ($str =~ /^t($u)?$/iu) { }
0 0 elsif ($str =~ /^g($u)?$/iu) { }
0 0 elsif ($u =~ /(HZ|OHM)/iu and $str =~ /^ma?($u)$/iu) { }
0 0 elsif ($u =~ /A/iu and $str =~ /^ma$/iu) { }
0 0 elsif (not $u =~ /(HZ|OHM)/iu and $str =~ /^ma($u)?$/iu) { }
0 0 elsif ($str =~ /^k($u)?$/iu) { }
0 0 elsif ($str =~ /^m($u)?$/iu) { }
0 0 elsif ($str =~ /^u($u)?$/iu) { }
0 0 elsif ($str =~ /^n($u)?$/iu) { }
0 0 elsif ($str =~ /^p($u)?$/iu) { }
0 0 elsif ($str =~ /^f($u)?$/iu) { }
0 0 elsif ($str =~ /^$u$/iu) { }