Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3209/cover_db
------------------------------------------ ------ ------ ------ ------ ------
File stmt branch cond sub total
------------------------------------------ ------ ------ ------ ------ ------
tests/cond_xor 100.00 n/a 66.67 n/a 82.61
Total 100.00 n/a 66.67 n/a 82.61
------------------------------------------ ------ ------ ------ ------ ------
tests/cond_xor
line err stmt branch cond sub code
1 #!/usr/bin/perl
2
3 # Copyright 2002-2004, Paul Johnson (pjcj@cpan.org)
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 $i = 1;
14 1 my $j = 0;
15
16 1 for my $y (0, 1, 1, 1)
4
17 {
18 4 for my $z (0, 0, 1)
12
19 {
20 12 my $x = $y ^ $z;
21 12 100 $x = ($y xor $z);
22
23 *** 12 50 my $p = ($i xor $y);
24 *** 12 50 $p = ($j xor $y);
25 12 $p ^= $y;
26 }
27 }
Conditions
----------
xor 4 conditions
line err % l&&r l&&!r !l&&r !l&&!r expr
----- --- ------ ------ ------ ------ ------ ----
21 100 3 6 1 2 $y xor $z
23 *** 50 9 3 0 0 $i xor $y
24 *** 50 0 0 9 3 $j xor $y