Branch Coverage

lib/BalanceOfPower/Role/Diplomat.pm
Criterion Covered Total %
branch 41 50 82.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 67 74 $side == 0 ? :
89 5 2 if ($n1 ne $n2)
113 0 1020 unless (defined $r)
128 110 2 if ($nation and $r->has_node($nation) or not $nation)
130 110 0 unless ($self->is_under_influence($r->node1) or $self->is_under_influence($r->node2))
149 14 54 if (grep {$_ eq $r->status;} @st_array)
170 0 33 unless $r
184 6 3 if ($other ne $nation_to)
201 0 43 unless $r
202 1 42 if $r->status eq 'ALLIANCE' or $r->status eq 'INFLUENCE PRESENT'
206 24 18 $dipl > 0 ? :
207 13 29 if ($present_status ne $actual_status) { }
210 0 13 if ($reason) { }
223 3 10 if ($actual_status eq 'HATE')
231 14 15 if ($dipl > 0) { }
239 23 6 if ($reason)
265 0 3 if ($treaty)
284 664 177 if ($n ne $node)
333 17 1 if ($rel->get_crisis_level == 0)
352 0 191 unless ($rel)
357 77 114 if ($rel->get_crisis_level > 0) { }
410 15 69 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)