Branch Coverage

blib/lib/MarpaX/Demo/StringParser.pm
Criterion Covered Total %
branch 50 74 67.5


line true false branch
140 6 0 unless (defined $self->logger)
278 60 504 if $line =~ /event\s+=>\s+(\w+)/
361 92 0 if $self->logger
399 11 63 if ($event_name eq 'attribute_name') { }
11 52 elsif ($event_name eq 'attribute_value') { }
5 47 elsif ($event_name eq 'directed_edge') { }
9 38 elsif ($event_name eq 'end_attributes') { }
7 31 elsif ($event_name eq 'end_node') { }
9 22 elsif ($event_name eq 'literal_label') { }
6 16 elsif ($event_name eq 'node_name') { }
9 7 elsif ($event_name eq 'start_attributes') { }
7 0 elsif ($event_name eq 'start_node') { }
0 0 elsif ($event_name eq 'undirected_edge') { }
427 1 6 if ($last_event eq 'start_node')
461 0 6 if ($self->recce->ambiguity_metric > 1)
466 0 6 if (my $ambiguous_status = $self->recce->ambiguous)
488 9 9 if ($name eq '{') { }
526 0 68 if ($previous_char eq '\\') { }
7 61 elsif ($char eq $open_bracket) { }
7 54 elsif ($char eq $close_bracket) { }
537 1 6 if ($bracket_count == 0)
552 0 1 if ($label =~ /^$/)
573 0 9 if $pos >= $length
577 0 9 if ($char eq q[']) { }
0 9 elsif ($char eq '"') { }
1 8 elsif ($char eq '<') { }
619 0 0 if ($previous_char ne '\\' and $char eq $terminator)
623 0 0 if ($quote_count == 2)
644 0 0 if ($label =~ /^['"]/ and not $label =~ /^(['"]).*\1$/)
680 0 8 if (substr($string, $pos, 1) =~ /$re/)
697 8 91 if $previous_char ne '\\' and $char =~ /$re/
719 0 6 if ($self->description) { }
6 0 elsif ($self->input_file) { }
742 6 0 if (defined(my $value = $self->_process)) { }
781 16 26 unless $char =~ /$re/
798 0 74 if ($event_count > 1)
807 0 74 unless (do { $self->known_events }->{$event_name})