Branch Coverage

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


line true false branch
97 208 381 if ($prod)
99 0 6 if ($prod <= 50 and $self->debt < 3 and 0)
105 35 173 if ($self->government eq 'dictatorship')
137 42 135 if (@routes > 0)
141 81 13 if ($self->production_for_export >= 15) { }
144 8 73 if ($world->exists_treaty_by_type($self->name, $r->destination($self->name), 'commercial'))
150 8 73 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 120 24 if ($which eq 'export') { }
24 0 elsif ($which eq 'domestic') { }
270 0 579 if $self->wealth < 0
277 0 2 if ($world->at_civil_war($self->name))
281 2 0 if ($self->production_for_domestic > 20)
300 0 170 if ($self->internal_disorder > 100)
304 93 77 if ($self->internal_disorder < 0)
309 8 162 if ($actual_disorder ne $new_disorder)
314 4 4 if ($new_disorder eq 'Civil war')
325 802 127 if ($disorder < 10) { }
88 39 elsif ($disorder < 40) { }
18 21 elsif ($disorder < 80) { }
378 14 0 if ($self->production_for_domestic > $army_cost and $self->army < [9, 12, 15]->[$self->size])
390 6 23 if ($self->government eq 'dictatorship')
402 2 55 if ($self->army > [9, 12, 15]->[$self->size])
406 0 57 if ($self->army < 0)
416 0 1 if $self->production_for_domestic < 30
473 0 0 if ($version > 2) { }
0 0 elsif ($version == 2) { }