Branch Coverage

blib/lib/Schedule/Activity.pm
Criterion Covered Total %
branch 173 220 78.6


line true false branch
43 0 55 if ($self->{'valid'} and not $force)
44 0 55 unless (is_hashref($self->{'config'}))
46 52 3 unless (@errors)
55 0 55 unless (is_hashref($config{'node'}))
56 3 52 if ($config{'attributes'})
57 0 3 if (not is_hashref($config{'attributes'})) { }
60 2 53 if ($config{'messages'})
61 0 2 if (not is_hashref($config{'messages'})) { }
64 0 3 if (not is_hashref($msga)) { }
0 3 elsif (defined $msga->{'attributes'} and not is_hashref($msga->{'attributes'})) { }
67 1 2 if (is_hashref($msga->{'message'}))
68 0 1 if (defined $msga->{'message'}{'alternates'} and not is_arrayref($msga->{'message'}{'alternates'})) { }
74 0 407 unless (is_hashref($node))
77 179 228 if ($node->{'attributes'})
78 0 179 if (not is_hashref($node->{'attributes'})) { }
83 2 405 if (@nerrors)
85 0 405 if (@invalids)
86 1 404 if (defined $node->{'finish'} and not defined $config{'node'}{$node->{'finish'}})
89 0 55 if (not is_hashref($config{'annotations'})) { }
105 306 105 if (is_arrayref($nodea->{'next'})) { }
5 100 elsif (is_hashref($nodea->{'next'})) { }
109 164 689 $nodea eq $nodeb ? :
119 152 3308 if (not defined $x or $x > $y)
127 361 467 if ($x eq "+")
128 279 188 if ($y eq "+")
136 784 2965 if ($nodea eq $nodec)
138 2137 828 if (defined $x and $x eq "+")
140 649 50 if (not defined $x or $y eq "+" or $x < $y)
180 203 290 if (defined $reach{'min'}{$activity}{$actions{$action}})
181 200 293 if (defined $reach{'min'}{$actions{$action}}{$finish})
182 2 201 if ($parents == 0) { }
2 199 elsif ($parents > 1) { }
184 2 201 if ($terminals > 1) { }
5 196 elsif (not $terminals) { }
186 3 200 if ($actions{$action}{'tmavg'} == 0 and defined $reach{'min'}{$actions{$action}}{$actions{$action}})
201 2 50 if ($base{'PNA'})
203 400 0 if (is_plain_hashref($node)) { }
0 0 elsif (builtin::blessed($node)) { }
207 8 392 if ($self->{'PNA'})
215 99 301 if (defined $node->{'finish'})
217 7 393 if (is_plain_hashref($node->{'require'}))
225 17106 55 if ($self->{'built'})
227 3 52 if (@errors)
229 2 48 if (@errors)
50 2 unless ($opt{'unsafe'})
236 114659 71321 if ($node->{'attributes'})
239 185980 0 if (is_hashref($msg))
253 0 37678 if ($tension{$k} > 1)
0 37678 if ($tension{$k} < 0)
262 147508 19633 if ($tm - $tension{'slack'} * $slack + rand($tension{'buffer'} * $buffer + $tension{'slack'} * $slack) <= $opt{'goal'}) { }
18729 904 elsif ($node->hasnext($conclusion)) { }
268 18839 0 if ($node and $node eq $conclusion)
285 0 18875 unless (is_hashref($opt{'node'}))
286 0 18875 unless (defined $opt{'node'}{'finish'})
288 36 18839 if ($opt{'retries'} < 0)
301 0 18839 if ($path{'retry'})
304 0 18839 if ($res[-1][1] ne $opt{'node'}{'finish'})
307 996 17843 if (abs $excess > "0.5")
308 391 605 if ($excess > 0 and $excess > $slack)
309 10 595 if ($excess < 0 and -$excess > $buffer)
311 438 157 if ($excess > 0) { }
316 5511 1659 if ($excess > 0) { }
323 155051 18438 if ($i < $#res) { }
327 1350 172139 if ($dt > 0) { }
342 112701 60788 if ($node->{'attributes'})
347 173489 0 if (is_hashref($msg))
357 0 146 unless (is_hashref($goal{'attribute'}))
362 0 176 unless (defined $attr->{'attr'}{$k})
363 0 176 unless (is_hashref($goal{'attribute'}{$k}))
364 0 176 unless (defined $goal{'attribute'}{$k}{'op'})
365 0 176 unless (exists $validOp{$goal{'attribute'}{$k}{'op'} // ""})
366 0 176 if (exists $valueOp{$goal{'attribute'}{$k}{'op'}} and not defined $goal{'attribute'}{$k}{'value'})
374 13210 2838 unless (defined $schedule{'annotations'})
378 0 2838 if ($seen{$group})
379 0 2838 unless (defined $schedule{'annotations'}{$group})
383 2838 0 if (%seen)
390 1 16047 unless (defined $schedule{'attributes'})
396 0 31195 if ($self->{'PNA'} and $k =~ /^\Q$self->{'PNA'}\E/) { }
399 26916 4279 if ($cmp{'op'} eq 'max') { }
466 3813 elsif ($cmp{'op'} eq 'min') { }
1159 2654 elsif ($cmp{'op'} eq 'eq') { }
2654 0 elsif ($cmp{'op'} eq 'ne') { }
0 0 elsif ($cmp{'op'} eq 'XX') { }
418 19 15902 if ($@)
421 525 15377 if ($s > $bestscore)
426 1 145 if (not %best and $lasterr)
442 22 44 if (is_hashref($activity->[2]))
445 22 22 if ($i < $activities->$#*)
454 4 17156 if ($check{'error'})
455 0 17156 unless (is_arrayref($opt{'activities'}))
456 1528 17158 if is_hashref($_->[2])
22 17134 if (&any(sub { defined $_->[2]{'goal'} if is_hashref($_->[2]); } , @{$opt{"activities"};}))
457 146 16988 if ($opt{'goal'} and %{$opt{'goal'};})
460 24 16964 if ($opt{'after'})
479 24 16928 if ($opt{'after'})
481 16941 11 unless ($opt{'nonote'})
488 0 14169 if ($note->[1]{'annotations'})
494 1 11329 if ($schedule[$i + 1][0] == $schedule[$i][0])
510 17003 31221 if ($node->{'attributes'})
513 34059 14165 if (is_hashref($msg))
527 2 12 if ($line =~ /^\s*$/)
528 3 9 if ($line =~ /^$list\s*(.*)$/) { }
9 0 elsif ($line =~ /^\s+$list\s*(.*)$/) { }
530 3 0 if ($activity =~ /(?.*?),\s*(?\d+)(?min|sec)\s*$/)
531 3 0 if ($+{'unit'} eq "min")
532 0 3 if (defined $config{'node'}{$activity})
544 0 9 unless ($activity)
546 9 0 if ($action =~ /(?.*?),\s*(?\d+)(?min|sec)\s*$/)
547 9 0 if ($+{'unit'} eq "min")
551 0 9 if (defined $config{'node'}{$action})