Condition Coverage

blib/lib/Game/TextMapper/Traveller.pm
Criterion Covered Total %
condition 111 120 92.5


and 3 conditions

line !l l&&!r l&&r condition
120 2 39 43 $population >= 1 and $population <= 5
142 16 63 5 $atmosphere >= 2 and $hydro == 0
145 21 63 0 $hydro >= 1 and $atmosphere <= 1
148 21 51 12 $hydro >= 1 and $atmosphere >= 10
152 82 0 2 $population eq 0 and $law eq 0
82 0 2 $population eq 0 and $law eq 0 and $government eq 0
156 2 62 20 $population >= 1 and $population <= 3
160 28 12 44 $atmosphere >= 4 and $atmosphere <= 9
40 7 37 $atmosphere >= 4 and $atmosphere <= 9 and $hydro >= 4
19 8 29 $atmosphere >= 4 and $atmosphere <= 9 and $hydro >= 4 and $hydro <= 8
15 12 17 $atmosphere >= 4 and $atmosphere <= 9 and $hydro >= 4 and $hydro <= 8 and $population >= 5
20 5 12 $atmosphere >= 4 and $atmosphere <= 9 and $hydro >= 4 and $hydro <= 8 and $population >= 5 and $population <= 7
164 56 3 25 $atmosphere <= 3 and $hydro <= 3
59 17 8 $atmosphere <= 3 and $hydro <= 3 and $population >= 6
169 40 36 8 &any(sub { $atmosphere == $_; } , 0, 1, 2, 4, 7, 9) and $population >= 9
173 27 12 45 $government >= 4 and $government <= 9
39 35 10 $government >= 4 and $government <= 9 and $atmosphere == 6 || $atmosphere == 8
35 5 5 $government >= 4 and $government <= 9 and $atmosphere == 6 || $atmosphere == 8 and $population >= 6
40 1 4 $government >= 4 and $government <= 9 and $atmosphere == 6 || $atmosphere == 8 and $population >= 6 and $population <= 8
177 16 40 28 $atmosphere >= 2 and $atmosphere <= 5
56 13 15 $atmosphere >= 2 and $atmosphere <= 5 and $hydro <= 3
188 1 72 11 not $pirate_base and $atmosphere >= 10 || $population && $government == 0 || $population && $law == 0 || $government == 7 || $government == 10 || $law >= 9
279 1364 228 64 $d <= 2 and match(qr/^(starport-[AB]|naval)$/u, qr/^(starport-[AB]|naval)$/u, $system1, $system2)
282 1364 292 0 $d <= 2 and match(qr/^agriculture$/u, qr/^(agriculture|astroid|desert|high|industrial|low|non-agriculture|rich)$/u, $system1, $system2) || match(qr/^asteroid$/u, qr/^(asteroid|industrial|non-agriculture|rich|vacuum)$/u, $system1, $system2) || match(qr/^desert$/u, qr/^(desert|non-agriculture)$/u, $system1, $system2) || match(qr/^fluid$/u, qr/^(fluid|industrial)$/u, $system1, $system2) || match(qr/^high$/u, qr/^(high|low|rich)$/u, $system1, $system2) || match(qr/^ice$/u, qr/^industrial$/u, $system1, $system2) || match(qr/^industrial$/u, qr/^(agriculture|astroid|desert|fluid|high|industrial|non-industrial|poor|rich|vacuum|water)$/u, $system1, $system2) || match(qr/^low$/u, qr/^(industrial|rich)$/u, $system1, $system2) || match(qr/^non-agriculture$/u, qr/^(asteroid|desert|vacuum)$/u, $system1, $system2) || match(qr/^non-industrial$/u, qr/^industrial$/u, $system1, $system2) || match(qr/^rich$/u, qr/^(agriculture|desert|high|industrial|non-agriculture|rich)$/u, $system1, $system2) || match(qr/^vacuum$/u, qr/^(asteroid|industrial|vacuum)$/u, $system1, $system2) || match(qr/^water$/u, qr/^(industrial|rich|water)$/u, $system1, $system2)
326 1124 499 33 $d <= 3 and match(qr/^rich$/u, qr/^(asteroid|agriculture|desert|high|industrial|non-agriculture|water|rich|low)$/u, $system1, $system2)
343 2899 422 145 &any(sub { /$re1/u; } , @$sys1) and &any(sub { /$re2/u; } , @$sys2)
344 2102 1142 77 &any(sub { /$re2/u; } , @$sys1) and &any(sub { /$re1/u; } , @$sys2)
364 62 47 113 $C{$u} && $C{$v}
368 62 47 24 $C{$u} and $C{$v}
80 0 29 $C{$v} and not $C{$u}
33 0 47 $C{$u} and not $C{$v}

or 3 conditions

line l !l&&r !l&&!r condition
74 16 12 56 $atmosphere < 2 or $atmosphere >= 10
75 14 2 68 $hydro < 0 or $size < 2
117 28 12 44 $atmosphere <= 3 or $atmosphere >= 10
123 9 4 71 $government == 0 or $government == 5
173 6 4 35 $atmosphere == 6 || $atmosphere == 8
188 20 5 38 $atmosphere >= 10 || $population && $government == 0 || $population && $law == 0 || $government == 7 || $government == 10 || $law >= 9
282 4 0 167 match(qr/^agriculture$/u, qr/^(agriculture|astroid|desert|high|industrial|low|non-agriculture|rich)$/u, $system1, $system2) || match(qr/^asteroid$/u, qr/^(asteroid|industrial|non-agriculture|rich|vacuum)$/u, $system1, $system2) || match(qr/^desert$/u, qr/^(desert|non-agriculture)$/u, $system1, $system2) || match(qr/^fluid$/u, qr/^(fluid|industrial)$/u, $system1, $system2) || match(qr/^high$/u, qr/^(high|low|rich)$/u, $system1, $system2) || match(qr/^ice$/u, qr/^industrial$/u, $system1, $system2) || match(qr/^industrial$/u, qr/^(agriculture|astroid|desert|fluid|high|industrial|non-industrial|poor|rich|vacuum|water)$/u, $system1, $system2) || match(qr/^low$/u, qr/^(industrial|rich)$/u, $system1, $system2) || match(qr/^non-agriculture$/u, qr/^(asteroid|desert|vacuum)$/u, $system1, $system2) || match(qr/^non-industrial$/u, qr/^industrial$/u, $system1, $system2) || match(qr/^rich$/u, qr/^(agriculture|desert|high|industrial|non-agriculture|rich)$/u, $system1, $system2) || match(qr/^vacuum$/u, qr/^(asteroid|industrial|vacuum)$/u, $system1, $system2) || match(qr/^water$/u, qr/^(industrial|rich|water)$/u, $system1, $system2)
364 109 24 89 not $C{$u} && $C{$v} or $C{$u} != $C{$v}
368 0 0 33 $C{$u} || $C{$v}