1Reading database from ...
2
3
4--------- ------ ------ ------ ------ ------
5File        stmt   bran   cond    sub  total
6--------- ------ ------ ------ ------ ------
7tests/and   63.6   50.0   33.3    n/a   47.2
8Total       63.6   50.0   33.3    n/a   47.2
9--------- ------ ------ ------ ------ ------
10
11
12Run: ...
13Perl version: ...
14OS: ...
15Start: ...
16Finish: ...
17
18tests/and
19
20line  err   stmt   bran   cond    sub   code
211                                       #!/usr/bin/perl
222
233                                       # Copyright 2013-2019, Paul Johnson (paul@pjcj.net)
244
255                                       # This software is free.  It is licensed under the same terms as Perl itself.
266
277                                       # The latest version of this software should be available from my homepage:
288                                       # http://www.pjcj.net
299
3010             1                        my $x = 1;
3111             1                        my $y = 1;
3212
3313    ***      1     50     33          if ($x && !$y) {
3414    ***      0                            die "Urgh";
3515                                      }
3616
3717    ***      1     50     33          if ($x && $y) {
3818                                      }
3919
4020    ***      1     50     33          unless ($x && $y) {
4121    ***      0                            die "Urgh";
4222                                      }
4323
4424    ***      1     50     33          if (!($x && $y)) {
4525    ***      0                            die "Urgh";
4626                                      }
4727
4828    ***      1     50     33          if (!$x || !$y) {
4929    ***      0                            die "Urgh";
5030                                      }
51
52
53Branches
54--------
55
56line  err      %   true  false   branch
57----- --- ------ ------ ------   ------
5813    ***     50      0      1   if ($x and not $y)
5917    ***     50      1      0   if ($x and $y)
6020    ***     50      0      1   unless ($x and $y)
6124    ***     50      0      1   unless ($x and $y)
6228    ***     50      0      1   unless ($x and $y)
63
64
65Conditions
66----------
67
68and 3 conditions
69
70line  err      %     !l  l&&!r   l&&r   expr
71----- --- ------ ------ ------ ------   ----
7213    ***     33      0      1      0   $x and not $y
7317    ***     33      0      0      1   $x and $y
7420    ***     33      0      0      1   $x and $y
7524    ***     33      0      0      1   $x and $y
7628    ***     33      0      0      1   $x and $y
77
78
79