Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

94 lines (79 sloc) 3.549 kb
Reading database from ...
------------------------------------------ ------ ------ ------ ------ ------
File stmt bran cond sub total
------------------------------------------ ------ ------ ------ ------ ------
tests/if 85.0 50.0 n/a 100.0 75.0
Total 85.0 50.0 n/a 100.0 75.0
------------------------------------------ ------ ------ ------ ------ ------
Run: ...
Perl version: ...
OS: ...
Start: ...
Finish: ...
tests/if
line err stmt bran cond sub code
1 #!/usr/bin/perl
2
3 # Copyright 2004-2012, 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 1 use strict;
1
1
11 1 1 use warnings;
1
1
12
13 1 my ($x, $p, $q, $r, $s);
14
15 1 $x = 0;
16
17 *** 1 50 if ($x)
18 {
19 *** 0 $p++
20 }
21
22 *** 1 50 unless ($x)
23 {
24 1 $q++
25 }
26
27 1 $x = 1;
28
29 *** 1 50 if ($x)
30 {
31 1 $r++
32 }
33
34 *** 1 50 if ($x)
35 {
36 1 $r++
37 }
38 else
39 {
40 *** 0 $s++
41 }
42
43 *** 1 50 unless ($x)
44 {
45 *** 0 $s++
46 }
Branches
--------
line err % true false branch
----- --- ------ ------ ------ ------
17 *** 50 0 1 if ($x)
22 *** 50 1 0 unless ($x)
29 *** 50 1 0 if ($x)
34 *** 50 1 0 if ($x) { }
43 *** 50 0 1 unless ($x)
Covered Subroutines
-------------------
Subroutine Count Location
---------- ----- -----------
BEGIN 1 tests/if:10
BEGIN 1 tests/if:11
Jump to Line
Something went wrong with that request. Please try again.