Branch Coverage

lib/BalanceOfPower/Nation.pm
Criterion Covered Total %
branch 45 58 77.5


line true false branch
97 208 374 if ($prod)
99 0 6 if ($prod <= 50 and $self->debt < 3 and 0)
105 35 173 if ($self->government eq 'dictatorship')
137 36 141 if (@routes > 0)
141 62 2 if ($self->production_for_export >= 15) { }
144 9 53 if ($world->exists_treaty_by_type($self->name, $r->destination($self->name), 'commercial'))
150 9 53 if ($treaty_bonus > 0)
219 1 161 if $self->internal_disorder_status eq 'Civil war'
220 2 159 if $self->frozen_disorder
228 114 45 $ordered_best[0] ? :
254 84 33 if ($which eq 'export') { }
33 0 elsif ($which eq 'domestic') { }
270 0 519 if $self->wealth < 0
277 0 1 if ($world->at_civil_war($self->name))
281 1 0 if ($self->production_for_domestic > 20)
300 0 172 if ($self->internal_disorder > 100)
304 93 79 if ($self->internal_disorder < 0)
309 11 161 if ($actual_disorder ne $new_disorder)
314 4 7 if ($new_disorder eq 'Civil war')
325 795 137 if ($disorder < 10) { }
82 55 elsif ($disorder < 40) { }
34 21 elsif ($disorder < 80) { }
378 19 0 if ($self->production_for_domestic > $army_cost and $self->army < [9, 12, 15]->[$self->size])
390 12 27 if ($self->government eq 'dictatorship')
402 2 53 if ($self->army > [9, 12, 15]->[$self->size])
406 0 55 if ($self->army < 0)
416 0 6 if $self->production_for_domestic < 30
473 0 0 if ($version > 2) { }
0 0 elsif ($version == 2) { }