Skip to content

Commit

Permalink
Add new golden files for 5.13.8 and 5.13.11.
Browse files Browse the repository at this point in the history
  • Loading branch information
pjcj committed Apr 11, 2011
1 parent 8152466 commit 4016d75
Show file tree
Hide file tree
Showing 30 changed files with 3,363 additions and 0 deletions.
116 changes: 116 additions & 0 deletions test_output/cover/alias1.5.013008
@@ -0,0 +1,116 @@
Reading database from ...


------------------------------------------ ------ ------ ------ ------ ------
File stmt bran cond sub total
------------------------------------------ ------ ------ ------ ------ ------
tests/Alias1.pm 100.0 100.0 n/a 100.0 100.0
tests/alias1 100.0 n/a n/a 100.0 100.0
Total 100.0 100.0 n/a 100.0 100.0
------------------------------------------ ------ ------ ------ ------ ------


Run: ...
Perl version: ...
OS: ...
Start: ...
Finish: ...

tests/Alias1.pm

line err stmt bran cond sub code
1 # Copyright 2004-2010, 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 Alias1;
9
10 1 1 use strict;
1
1
11 1 1 use warnings;
1
1
12
13 1 1 use Exporter;
1
1
14
15 our @ISA = qw(Exporter);
16 our @EXPORT = qw(is_3digits);
17
18 sub is_3digits {
19 2 2 my $val = shift;
20 2 my $retval = undef;
21 2 100 $retval=1 if $val =~ /^\d{3}$/;
22 2 return $retval;
23 }
24
25 1;


Branches
--------

line err % true false branch
----- --- ------ ------ ------ ------
21 100 1 1 if $val =~ /^\d{3}$/


Covered Subroutines
-------------------

Subroutine Count Location
---------- ----- ------------------
BEGIN 1 tests/Alias1.pm:10
BEGIN 1 tests/Alias1.pm:11
BEGIN 1 tests/Alias1.pm:13
is_3digits 2 tests/Alias1.pm:19


tests/alias1

line err stmt bran cond sub code
1 #!/usr/bin/perl
2
3 # Copyright 2004-2010, 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 1 1 use strict;
1
1
11 1 1 use warnings;
1
1
12 1 1 use lib "tests";
1
1
13
14 1 1 use Alias1;
1
1
15
16 1 is_3digits(1234);
17 1 is_3digits(123);
18
19 1 exit;


Covered Subroutines
-------------------

Subroutine Count Location
---------- ----- ---------------
BEGIN 1 tests/alias1:10
BEGIN 1 tests/alias1:11
BEGIN 1 tests/alias1:12
BEGIN 1 tests/alias1:14


80 changes: 80 additions & 0 deletions test_output/cover/branch_return_sub.5.013008
@@ -0,0 +1,80 @@
Reading database from ...


------------------------------------------ ------ ------ ------ ------ ------
File stmt bran cond sub total
------------------------------------------ ------ ------ ------ ------ ------
tests/branch_return_sub 100.0 100.0 100.0 100.0 100.0
Total 100.0 100.0 100.0 100.0 100.0
------------------------------------------ ------ ------ ------ ------ ------


Run: ...
Perl version: ...
OS: ...
Start: ...
Finish: ...

tests/branch_return_sub

line err stmt bran cond sub code
1 #!/usr/bin/perl
2
3 # Copyright 2004-2010, 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 1 1 use strict;
1
1
11 1 1 use warnings;
1
1
12
13 sub my_sqrt
14 {
15 3 3 my $n = shift;
16
17 3 100 100 if ( !defined($n) || ($n < 0) ) {
18 2 return undef;
19 }
20
21 1 return sqrt($n);
22 }
23
24 1 my_sqrt(25);
25 1 my_sqrt(-2);
26 1 my_sqrt(undef);


Branches
--------

line err % true false branch
----- --- ------ ------ ------ ------
17 100 2 1 if (not defined $n or $n < 0)


Conditions
----------

or 3 conditions

line err % l !l&&r !l&&!r expr
----- --- ------ ------ ------ ------ ----
17 100 1 1 1 not defined $n or $n < 0


Covered Subroutines
-------------------

Subroutine Count Location
---------- ----- --------------------------
BEGIN 1 tests/branch_return_sub:10
BEGIN 1 tests/branch_return_sub:11
my_sqrt 3 tests/branch_return_sub:15


126 changes: 126 additions & 0 deletions test_output/cover/cond_and.5.013008
@@ -0,0 +1,126 @@
Reading database from ...


------------------------------------------ ------ ------ ------ ------ ------
File stmt bran cond sub total
------------------------------------------ ------ ------ ------ ------ ------
tests/cond_and 96.0 50.0 55.6 100.0 77.6
Total 96.0 50.0 55.6 100.0 77.6
------------------------------------------ ------ ------ ------ ------ ------


Run: ...
Perl version: ...
OS: ...
Start: ...
Finish: ...

tests/cond_and

line err stmt bran cond sub code
1 #!/usr/bin/perl
2
3 # Copyright 2002-2010, 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 1 1 use strict;
1
1
11 1 1 use warnings;
1
1
12
13 1 my @x;
14
15 1 my $y = 1;
16 1 my $z = 0;
17
18 1 for (0 .. 10)
19 {
20 *** 11 50 $y &&
21 $x[1]++;
22
23 *** 11 100 66 $y &&
24 $x[0]++ &&
25 $x[1]++;
26
27 *** 11 50 $x[2]++
28 if $z;
29
30 11 for (0 .. 2)
31 {
32 33 $x[3]++;
33 }
34
35 *** 11 50 if ($y)
36 {
37 11 $x[4]++;
38 }
39 else
40 {
41 *** 0 0 $y && $x[5]++;
42 }
43
44 11 my $p = $y & $z;
45
46 *** 11 50 $p &&= $y;
47 *** 11 50 $p &&= $z;
48 11 my $q = 1;
49 *** 11 50 $q &&= $_;
50
51 11 pas();
52 }
53
54 sub pas
55 {
56 *** 11 50 11 $y && $z
57 }
58
59 # print join(", ", @x), "\n";


Branches
--------

line err % true false branch
----- --- ------ ------ ------ ------
20 *** 50 11 0 if $y
23 100 10 1 if $y and $x[0]++
27 *** 50 0 11 if $z
35 *** 50 11 0 if ($y) { }
41 *** 0 0 0 if $y
56 *** 50 11 0 if $y


Conditions
----------

and 2 conditions

line err % l !l expr
----- --- ------ ------ ------ ----
46 *** 50 11 0 $p &&= $y
47 *** 50 11 0 $p &&= $z
49 *** 50 0 11 $q &&= $_

and 3 conditions

line err % !l l&&!r l&&r expr
----- --- ------ ------ ------ ------ ----
23 *** 66 0 1 10 $y and $x[0]++


Covered Subroutines
-------------------

Subroutine Count Location
---------- ----- -----------------
BEGIN 1 tests/cond_and:10
BEGIN 1 tests/cond_and:11
pas 11 tests/cond_and:56


0 comments on commit 4016d75

Please sign in to comment.