Branch Coverage

blib/lib/Weather/NHC/TropicalCyclone/ForecastAdvisory.pm
Criterion Covered Total %
branch 41 76 53.9


line true false branch
14 2 2 if (not exists $self{'input_file'} || exists $self{'input_text'} or exists $self{'input_file'} and exists $self{'input_text'} or not exists $self{'output_file'})
29 0 4 unless open my $fh, '>', $self->output_file
42 2 2 if ($self->input_file) { }
2 0 elsif ($self->input_text) { }
43 0 2 unless open my $INPUT, '<', $self->input_file
105 4 0 if (@match)
106 4 0 if ($match[0] =~ /(AL|EP|CP|WP|IO|SH|LS)(\d{2})(\d{4})$/)
111 0 4 unless $storm_number and $storm_year and $storm_basin
121 4 0 if ($storm_year > 2005) { }
128 4 0 if (@match)
133 4 0 if ($storm_year > 2005) { }
154 4 0 if (@match) { }
155 4 0 if ($match[0] =~ /^(.+)\s+FORECAST.+ADVISORY NUMBER\s+(\d{1,3})/)
163 0 0 if ($match[0] =~ /^(.+)\s+ADVISORY NUMBER\s+(\d{1,3})/)
169 4 0 if ($tmp[0] eq 'HURRICANE') { }
0 0 elsif ($tmp[0] eq 'POTENTIAL') { }
0 0 elsif ($tmp[0] eq 'TROPICAL' or $tmp[0] eq 'SUBTROPICAL' or $tmp[0] eq 'REMNANTS' or $tmp[0] eq 'POST-TROPICAL') { }
195 4 0 if (@match)
196 4 0 if ($match[0] =~ /CENTER LOCATED NEAR\s+(\d{1,3}\.\d{1,2})([N|S])\s+(\d{1,3}\.\d{1,2})([E|W])\s+AT/)
202 0 4 if ($match[0] =~ /DISSIPATING NEAR\s+(\d{1,3}\.\d{1,2})([N|S])\s+(\d{1,3}\.\d{1,2})([E|W])\s+AT/)
217 4 0 if (@match)
218 4 0 if ($match[0] =~ /PRESENT MOVEMENT TOWARD THE.+OR\s+(\d{1,3})\s+DEGREES AT\s+(\d{1,2})\s+KT/)
227 4 0 if (@match)
228 4 0 if ($match[0] =~ /^ESTIMATED MINIMUM CENTRAL PRESSURE\s+(.+)\s+MB/)
239 4 0 if (@match)
240 4 0 if ($match[0] =~ /^MAX SUSTAINED WINDS\s+(\d{1,4}) KT WITH GUSTS TO\s+(\d{1,4})/)
254 4 72 if (@{$body_ref;}[$i] =~ /^MAX SUSTAINED WINDS/)
261 12 4 if (@{$body_ref;}[$i] =~ /^(\d{1,2}) KT\.{7}\s{0,}(\d{1,3})[N|S][E|W]\s+(\d{1,3})[N|S][E|W]\s+(\d{1,3})[N|S][E|W]\s+(\d{1,3})[N|S][E|W]/) { }
284 0 4 unless ($isotachs_found)
302 32 152 if (@{$body_ref;}[$i] =~ /^(FORECAST|OUTLOOK) VALID/)
318 0 32 if ($line =~ /DISSIPATED/)
321 32 0 if ($line =~ m[^(FORECAST|OUTLOOK) VALID\s+(\d{2})/(\d{4})Z])
325 32 0 if ($line =~ /Z\s+(\d{1,2}\.\d{1,2})([N|S])\s+(\d{1,2}\.\d{1,2})([E|W])/)
341 32 0 if ($line =~ /^MAX WIND\s+(\d{1,4}) KT\.\.\.GUSTS\s+(\d{1,4}) KT\./)
350 0 32 if ($forecast_date_time < $nowcast_date_time)
352 0 0 if ($forecast_month > 12)
386 64 32 if (@{$body_ref;}[$i] =~ /^(\d{1,2}) KT\.{3}\s{0,}(\d{1,3})[N|S][E|W]\s+(\d{1,3})[N|S][E|W]\s+(\d{1,3})[N|S][E|W]\s+(\d{1,3})[N|S][E|W]/) { }
409 8 24 unless ($isotachs_found)