Reading database from ... ------------------------------------------ ------ ------ ------ ------ ------ File stmt bran cond sub total ------------------------------------------ ------ ------ ------ ------ ------ tests/bug_and 63.6 50.0 33.3 n/a 47.2 Total 63.6 50.0 33.3 n/a 47.2 ------------------------------------------ ------ ------ ------ ------ ------ Run: ... Perl version: ... OS: ... Start: ... Finish: ... tests/bug_and line err stmt bran cond sub code 1 #!/usr/bin/perl 2 3 # Copyright 2013-2016, 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 1 my $x = 1; 11 1 my $y = 1; 12 13 *** 1 50 33 if ($x && !$y) { 14 *** 0 die "Urgh"; 15 } 16 17 *** 1 50 33 if ($x && $y) { 18 } 19 20 *** 1 50 33 unless ($x && $y) { 21 *** 0 die "Urgh"; 22 } 23 24 *** 1 50 33 if (!($x && $y)) { 25 *** 0 die "Urgh"; 26 } 27 28 # TODO - this does not get reported on correctly. It is reported identically 29 # to the first case, but it should be the same as cases 2 - 4. 30 *** 1 50 33 if (!$x || !$y) { 31 *** 0 die "Urgh"; 32 } Branches -------- line err % true false branch ----- --- ------ ------ ------ ------ 13 *** 50 0 1 if ($x and not $y) 17 *** 50 1 0 if ($x and $y) 20 *** 50 0 1 unless ($x and $y) 24 *** 50 0 1 unless ($x and $y) 30 *** 50 0 1 unless ($x and $y) Conditions ---------- and 3 conditions line err % !l l&&!r l&&r expr ----- --- ------ ------ ------ ------ ---- 13 *** 33 0 1 0 $x and not $y 17 *** 33 0 0 1 $x and $y 20 *** 33 0 0 1 $x and $y 24 *** 33 0 0 1 $x and $y 30 *** 33 0 0 1 $x and $y