Condition Coverage

blib/lib/Game/TextMapper/Traveller.pm
Criterion Covered Total %
condition 108 120 90.0


and 3 conditions

line !l l&&!r l&&r condition
120 3 14 27 $population >= 1 and $population <= 5
142 7 34 3 $atmosphere >= 2 and $hydro == 0
145 9 34 1 $hydro >= 1 and $atmosphere <= 1
148 9 34 1 $hydro >= 1 and $atmosphere >= 10
152 41 2 1 $population eq 0 and $law eq 0
43 0 1 $population eq 0 and $law eq 0 and $government eq 0
156 3 27 14 $population >= 1 and $population <= 3
160 15 1 28 $atmosphere >= 4 and $atmosphere <= 9
16 6 22 $atmosphere >= 4 and $atmosphere <= 9 and $hydro >= 4
7 5 17 $atmosphere >= 4 and $atmosphere <= 9 and $hydro >= 4 and $hydro <= 8
11 10 7 $atmosphere >= 4 and $atmosphere <= 9 and $hydro >= 4 and $hydro <= 8 and $population >= 5
15 1 6 $atmosphere >= 4 and $atmosphere <= 9 and $hydro >= 4 and $hydro <= 8 and $population >= 5 and $population <= 7
164 29 3 12 $atmosphere <= 3 and $hydro <= 3
32 6 6 $atmosphere <= 3 and $hydro <= 3 and $population >= 6
169 19 24 1 &any(sub { $atmosphere == $_; } , 0, 1, 2, 4, 7, 9) and $population >= 9
173 14 3 27 $government >= 4 and $government <= 9
17 23 4 $government >= 4 and $government <= 9 and $atmosphere == 6 || $atmosphere == 8
23 3 1 $government >= 4 and $government <= 9 and $atmosphere == 6 || $atmosphere == 8 and $population >= 6
26 1 0 $government >= 4 and $government <= 9 and $atmosphere == 6 || $atmosphere == 8 and $population >= 6 and $population <= 8
177 7 17 20 $atmosphere >= 2 and $atmosphere <= 5
24 10 10 $atmosphere >= 2 and $atmosphere <= 5 and $hydro <= 3
188 0 39 5 not $pirate_base and $atmosphere >= 10 || $population && $government == 0 || $population && $law == 0 || $government == 7 || $government == 10 || $law >= 9
279 709 111 41 $d <= 2 and match(qr/^(starport-[AB]|naval)$/u, qr/^(starport-[AB]|naval)$/u, $system1, $system2)
282 709 152 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 579 282 0 $d <= 3 and match(qr/^rich$/u, qr/^(asteroid|agriculture|desert|high|industrial|non-agriculture|water|rich|low)$/u, $system1, $system2)
343 1680 215 68 &any(sub { /$re1/u; } , @$sys1) and &any(sub { /$re2/u; } , @$sys2)
344 1326 554 15 &any(sub { /$re2/u; } , @$sys1) and &any(sub { /$re1/u; } , @$sys2)
364 20 22 41 $C{$u} && $C{$v}
368 20 22 9 $C{$u} and $C{$v}
35 0 7 $C{$v} and not $C{$u}
13 0 22 $C{$u} and not $C{$v}

or 3 conditions

line l !l&&r !l&&!r condition
74 7 1 36 $atmosphere < 2 or $atmosphere >= 10
75 7 1 36 $hydro < 0 or $size < 2
117 15 1 28 $atmosphere <= 3 or $atmosphere >= 10
123 5 7 32 $government == 0 or $government == 5
173 4 0 23 $atmosphere == 6 || $atmosphere == 8
188 7 5 25 $atmosphere >= 10 || $population && $government == 0 || $population && $law == 0 || $government == 7 || $government == 10 || $law >= 9
282 0 0 110 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 42 9 32 not $C{$u} && $C{$v} or $C{$u} != $C{$v}
368 0 0 13 $C{$u} || $C{$v}