Condition Coverage

blib/lib/Map/Metro/Graph.pm
Criterion Covered Total %
condition 13 55 23.6


and 3 conditions

line !l l&&!r l&&r condition
216 41 0 3 $row =~ /^--(\w+)/u and &any(sub { $_ eq $1; } , 'stations', 'transfers', 'lines', 'segments')
342 58 0 0 $#_ == 1 && ref $_[1] eq 'HASH'
369 0 0 0 defined $id && $id =~ /\A-?[0-9]+\z/u
379 0 0 0 defined $line_station_id && $line_station_id =~ /\A-?[0-9]+\z/u
382 0 0 0 defined $first_ls_id && $first_ls_id =~ /\A-?[0-9]+\z/u
0 0 0 defined $second_ls_id && $second_ls_id =~ /\A-?[0-9]+\z/u
396 0 0 0 $#_ == 1 && ref $_[1] eq 'HASH'
404 0 0 0 scalar @$keys and &none(sub { $key eq $_; } , @$keys)
411 0 0 1 $self->has_stations and $self->has_lines
0 0 1 $self->has_stations and $self->has_lines and $self->has_segments
573 0 0 0 $origin->possible_on_same_line($dest) and not $origin->on_same_line($dest)

or 2 conditions

line l !l condition
342 20 0 $OK{$_} or Carp::croak("Unknown named parameter: $_")
585 0 0 $$graphroute[$index + 2] // undef

or 3 conditions

line l !l&&r !l&&!r condition
214 5 0 44 not length $row or $row =~ /^[ \t]*#/u
340 48 0 0 $self->find_line(sub { $_->id eq $line_id; } ) || 'Map::Metro::Exception::::LineIdDoesNotExistInLineList'->throw('line_id', $line_id)
371 0 0 0 $self->find_station(sub { $_->id == $id; } ) || 'StationIdDoesNotExist'->throw('station_id', $id)
396 0 0 0 $OK{$_} or Carp::croak("Unknown named parameter: $_")
426 21 3 0 $self->get_line_station_by_line_and_station_id($line_id, $segment->origin_station->id) || &LineStation()->new('line_station_id', ++$next_line_station_id, 'station', $segment->origin_station, 'line', $line)
436 1 23 0 $self->get_line_station_by_line_and_station_id($line_id, $segment->destination_station->id) || &LineStation()->new('line_station_id', ++$next_line_station_id, 'station', $segment->destination_station, 'line', $line)