Reading database from ...
------------------------------------------ ------ ------ ------ ------ ------
File stmt bran cond sub total
------------------------------------------ ------ ------ ------ ------ ------
tests/if 78.5 50.0 n/a n/a 66.6
Total 78.5 50.0 n/a n/a 66.6
------------------------------------------ ------ ------ ------ ------ ------
Run: ...
Perl version: ...
OS: ...
Start: ...
Finish: ...
tests/if
line err stmt bran cond sub code
1 #!/usr/bin/perl
2
3 # Copyright 2004-2015, Paul Johnson (paul@pjcj.net)
4
5 # This software is free. It is licensed under the same terms as Perl itself.
6
7 # The latest version of this software should be available from my homepage:
8 # http://www.pjcj.net
9
10 use strict;
11 use warnings;
12
13 1 my ($x, $p, $q, $r, $s);
14
15 1 $x = 0;
16
17 *** 1 50 if ($x) {
18 *** 0 $p++
19 }
20
21 *** 1 50 unless ($x) {
22 1 $q++
23 }
24
25 1 $x = 1;
26
27 *** 1 50 if ($x) {
28 1 $r++
29 }
30
31 *** 1 50 if ($x) {
32 1 $r++
33 } else {
34 *** 0 $s++
35 }
36
37 *** 1 50 unless ($x) {
38 *** 0 $s++
39 }
Branches
--------
line err % true false branch
----- --- ------ ------ ------ ------
17 *** 50 0 1 if ($x)
21 *** 50 1 0 unless ($x)
27 *** 50 1 0 if ($x)
31 *** 50 1 0 if ($x) { }
37 *** 50 0 1 unless ($x)