Branch Coverage

lib/BalanceOfPower/Role/Diplomat.pm
Criterion Covered Total %
branch 42 50 84.0


line true false branch
46 141 213 if ($n1 ne $n2 and not $self->_diplomacy_exists($n1, $n2))
65 56 85 if $distance > 3
73 78 63 $side == 0 ? :
89 5 2 if ($n1 ne $n2)
113 0 987 unless (defined $r)
128 75 1 if ($nation and $r->has_node($nation) or not $nation)
130 75 0 unless ($self->is_under_influence($r->node1) or $self->is_under_influence($r->node2))
149 32 44 if (grep {$_ eq $r->status;} @st_array)
170 0 33 unless $r
184 6 3 if ($other ne $nation_to)
201 0 58 unless $r
202 2 56 if $r->status eq 'ALLIANCE' or $r->status eq 'INFLUENCE PRESENT'
206 29 27 $dipl > 0 ? :
207 13 43 if ($present_status ne $actual_status) { }
210 1 12 if ($reason) { }
223 4 9 if ($actual_status eq 'HATE')
231 20 23 if ($dipl > 0) { }
239 36 7 if ($reason)
265 0 4 if ($treaty)
284 664 177 if ($n ne $node)
333 17 1 if ($rel->get_crisis_level == 0)
352 0 130 unless ($rel)
357 41 89 if ($rel->get_crisis_level > 0) { }
410 24 87 if ($rel and $rel->type eq $type || $rel->type eq 'alliance') { }
455 0 0 if ($treaty && $_->type eq $treaty || !$treaty and $nation && $_->involve($nation) || !$nation)