-
Notifications
You must be signed in to change notification settings - Fork 88
/
module1.5.008
150 lines (128 loc) · 5.73 KB
/
module1.5.008
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
Reading database from ...
------------------------------------------ ------ ------ ------ ------ ------
File stmt bran cond sub total
------------------------------------------ ------ ------ ------ ------ ------
tests/Module1.pm 25.0 n/a n/a 25.0 25.0
tests/module1 95.0 50.0 n/a 100.0 92.6
Total 75.0 50.0 n/a 66.7 71.8
------------------------------------------ ------ ------ ------ ------ ------
Run: ...
Perl version: ...
OS: ...
Start: ...
Finish: ...
tests/Module1.pm
line err stmt bran cond sub code
1 # Copyright 2002-2011, Paul Johnson (pjcj@cpan.org)
2
3 # This software is free. It is licensed under the same terms as Perl itself.
4
5 # The latest version of this software should be available from my homepage:
6 # http://www.pjcj.net
7
8 package Module1;
9
10 my $y = 7;
11 $y++;
12
13 sub _aa
14 {
15 *** 0 0 $y++;
16 *** 0 die;
17 *** 0 die;
18 }
19
20 sub xx
21 {
22 *** 0 0 $y++;
23 *** 0 die;
24 }
25
26 sub yy
27 {
28 *** 0 0 $y++;
29 }
30
31 sub zz
32 {
33 11 11 my $x = shift;
34 11 $x++;
35 }
36
37 1
38
39 __END__
Covered Subroutines
-------------------
Subroutine Count Location
---------- ----- -------------------
zz 11 tests/Module1.pm:33
Uncovered Subroutines
---------------------
Subroutine Count Location
---------- ----- -------------------
_aa 0 tests/Module1.pm:15
xx 0 tests/Module1.pm:22
yy 0 tests/Module1.pm:28
tests/module1
line err stmt bran cond sub code
1 #!/usr/bin/perl
2
3 # Copyright 2002-2011, 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 # __COVER__ changes s/56.3/56.2/
11
12 1 1 use strict;
1
1
13 1 1 use warnings;
1
1
14
15 1 1 use lib "tests";
1
1
16
17 1 1 use Module1;
1
1
18
19 1 my @x;
20
21 sub xx
22 {
23 11 11 $x[shift]++;
24 11 Module1::zz(0);
25 }
26
27 1 for (0 .. 10)
11
28 {
29 *** 11 50 if (time)
30 {
31 11 xx(0);
32 }
33 else
34 {
35 *** 0 $x[1]++;
36 }
37 }
Branches
--------
line err % true false branch
----- --- ------ ------ ------ ------
29 *** 50 11 0 if (time) { }
Covered Subroutines
-------------------
Subroutine Count Location
---------- ----- ----------------
BEGIN 1 tests/module1:12
BEGIN 1 tests/module1:13
BEGIN 1 tests/module1:15
BEGIN 1 tests/module1:17
xx 11 tests/module1:23