Branch Coverage

blib/lib/Test2/Tools/EventDumper.pm
Criterion Covered Total %
branch 84 88 95.4


line true false branch
61 1 12304 unless $event
64 1 12303 unless &blessed($event) and $event->isa('Test2::Event')
67 12303 0 keys %settings ? :
77 1 12300 unless $events
80 1 12299 unless &reftype($events) eq 'ARRAY'
84 1 12298 if grep {not $_ && &blessed($_) && $_->isa('Test2::Event');} @$events
86 12297 1 keys %settings ? :
98 12290 12312 if ($settings->{'add_line_numbers'})
115 49160 24652 unless exists $clone{$field}
116 23 24629 unless defined $clone{$field}
121 0 24629 unless ref($order) =~ /^(ARRAY|HASH)$/
125 24624 5 ref $order eq 'HASH' ? :
138 101386 33843 $settings->{'qualify_functions'} || $settings->{'paren_functions'} ? :
139 67589 67640 $settings->{'qualify_functions'} ? :
149 0 135229 if (@rows == 0) { }
2308 132921 elsif (@rows == 1 and $settings->{'shorten_single_field'} and not $rows[0][3]) { }
161 73787 557065 unless (@$row)
169 129029 428036 if $comment
182 18436 6160 $settings->{'qualify_functions'} || $settings->{'paren_functions'} ? :
183 12290 12306 $settings->{'qualify_functions'} ? :
190 98330 24596 if $not_first++
205 12290 270490 unless defined $val
207 147555 122935 if $val =~ /^\d+$/
210 6148 116787 if $settings->{'clean_fail_messages'} and $val =~ /^\n?Failed test/
218 1 694607 if $val =~ /^\d+$/
219 627015 67592 if $val =~ /^\w+$/
228 6147 178241 if $val =~ s/\n/\\n/g
229 2 184386 if $val =~ s/\r/\\r/g
230 2 184386 if $val =~ s/[\b]/\\b/g
233 178241 6147 unless $use_qq
236 12290 172098 unless ($s1)
243 6147 178241 if $s1 eq '"'
245 5 184383 $QUOTE_MATCH{$s1} || $use_qq ? :
256 67591 67641 if $settings->{'use_full_event_type'} or not $type =~ /^Test2::Event::(.+)$/
267 67589 67640 if $settings->{'include_fields'}
273 239819 24585 if exists $event->{$_} and defined $event->{$_}
274 67640 67589 unless $settings->{'show_empty'}
280 76811 474871 $a_has_array ? :
281 86028 465654 $b_has_array ? :
291 12293 485591 unless exists $event->{$field}
294 242884 242707 if ($settings->{'call_when_can'} and $event->can($field)) { }
303 61489 0 if ($settings->{'convert_trace'} and $field eq 'trace' and &blessed($val) and $val->isa('Test2::Util::Trace') || $val->isa('Test2::EventFacet::Trace'))
314 282775 141327 unless $ref
318 12298 129029 if $ref eq 'ARRAY' and not grep({not &blessed($_) && $_->isa('Test2::Event');} @$val)