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)
280 60 516 if $line =~ /event\s+=>\s+(\w+)/
373 92 0 if $self->logger
411 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') { }
439 1 6 if ($last_event eq 'start_node')
473 0 6 if ($self->recce->ambiguity_metric > 1)
478 0 6 if (my $ambiguous_status = $self->recce->ambiguous)
500 9 9 if ($name eq '{') { }
538 0 68 if ($previous_char eq '\\') { }
7 61 elsif ($char eq $open_bracket) { }
7 54 elsif ($char eq $close_bracket) { }
549 1 6 if ($bracket_count == 0)
564 0 1 if ($label =~ /^$/)
585 0 9 if $pos >= $length
589 0 9 if ($char eq q[']) { }
0 9 elsif ($char eq '"') { }
1 8 elsif ($char eq '<') { }
631 0 0 if ($previous_char ne '\\' and $char eq $terminator)
635 0 0 if ($quote_count == 2)
656 0 0 if ($label =~ /^['"]/ and not $label =~ /^(['"]).*\1$/)
692 0 8 if (substr($string, $pos, 1) =~ /$re/)
709 8 91 if $previous_char ne '\\' and $char =~ /$re/
731 0 6 if ($self->description) { }
6 0 elsif ($self->input_file) { }
750 6 0 if (defined(my $value = $self->_process)) { }
789 16 26 unless $char =~ /$re/
806 0 74 if ($event_count > 1)
815 0 74 unless (${$self->known_events;}{$event_name})