Branch Coverage

blib/lib/CVSS/v4.pm
Criterion Covered Total %
branch 61 80 76.2


line true false branch
55 42 91 if $self->M("AV") eq "N" and $self->M("PR") eq "N" and $self->M("UI") eq "N"
57 174 50 if $self->M('AV') eq 'N' || $self->M('PR') eq 'N' || $self->M('UI') eq 'N' and not $self->M('AV') eq 'N' && $self->M('PR') eq 'N' && $self->M('UI') eq 'N' and not $self->M("AV") eq "P"
62 28 216 if $self->M("AV") eq "P" or not $self->M('AV') eq 'N' || $self->M('PR') eq 'N' || $self->M('UI') eq 'N'
73 149 95 if $self->M("AC") eq "L" and $self->M("AT") eq "N"
74 95 149 unless $self->M("AC") eq "L" and $self->M("AT") eq "N"
84 85 159 if $self->M("VC") eq "H" and $self->M("VI") eq "H"
86 55 70 if not $self->M('VC') eq 'H' && $self->M('VI') eq 'H' and $self->M('VC') eq 'H' || $self->M('VI') eq 'H' || $self->M('VA') eq 'H'
90 70 55 unless $self->M("VC") eq "H" or $self->M("VI") eq "H" or $self->M("VA") eq "H"
101 0 244 if $self->M("MSI") eq "S" or $self->M("MSA") eq "S"
103 22 170 if not $self->M('MSI') eq 'S' || $self->M('MSA') eq 'S' and $self->M('SC') eq 'H' || $self->M('SI') eq 'H' || $self->M('SA') eq 'H'
107 170 22 unless ($self->M("MSI") eq "S" or $self->M("MSA") eq "S") or ($self->M("SC") eq "H" or $self->M("SI") eq "H" or $self->M("SA") eq "H")
120 244 0 if $self->M("E") eq "A"
121 0 244 if $self->M("E") eq "P"
122 0 244 if $self->M("E") eq "U"
132 55 70 if $self->M("CR") eq "H" and $self->M("VC") eq "H" or $self->M("IR") eq "H" and $self->M("VI") eq "H" or $self->M("AR") eq "H" and $self->M("VA") eq "H"
137 70 27 unless $self->M("CR") eq "H" and $self->M("VC") eq "H" or $self->M("IR") eq "H" and $self->M("VI") eq "H" or $self->M("AR") eq "H" and $self->M("VA") eq "H"
169 244 0 wantarray ? :
189 732 18164 if $metric eq "E" and $value eq "X"
195 1108 17056 if $metric eq "CR" and $value eq "X"
196 870 16186 if $metric eq "IR" and $value eq "X"
197 814 15372 if $metric eq "AR" and $value eq "X"
207 245 0 if (%{$self->metrics;})
209 0 2695 unless $self->metrics->{$_}
263 1 1 if ($self->M("VC") eq "N" and $self->M("VI") eq "N" and $self->M("VA") eq "N" and $self->M("SC") eq "N" and $self->M("SI") eq "N" and $self->M("SA") eq "N")
289 0 244 if ($eq3 == 1 and $eq6 == 1) { }
0 244 elsif ($eq3 == 0 and $eq6 == 1) { }
89 155 elsif ($eq3 == 1 and $eq6 == 0) { }
85 70 elsif ($eq3 == 0 and $eq6 == 0) { }
315 85 159 if ($eq3 == 0 and $eq6 == 0) { }
423 376 3838 if $_ < 0
479 216 28 if (not isNaN($available_distance_eq1) and $available_distance_eq1 >= 0)
485 149 95 if (not isNaN($available_distance_eq2) and $available_distance_eq2 >= 0)
491 174 70 if (not isNaN($available_distance_eq3eq6) and $available_distance_eq3eq6 >= 0)
497 74 170 if (not isNaN($available_distance_eq4) and $available_distance_eq4 >= 0)
503 244 0 if (not isNaN($available_distance_eq5) and $available_distance_eq5 >= 0)
512 0 244 if ($n_existing_lower == 0) { }
564 0 0 unless $self->base_score
591 0 0 if ($self->metric_group_is_set("threat"))
599 0 0 if ($self->metric_group_is_set("environmental"))
622 0 0 if ($self->metric_group_is_set("supplemental"))