forked from pjcj/Devel--Cover
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The test fails under 5.16.0 due to db4d68cf2dda3f17d4e9fb440385189f55271b32 in perl, but make the golden results match for now until it can be fixed.
- Loading branch information
Showing
4 changed files
with
269 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
Reading database from ... | ||
|
||
|
||
------------------------------------------ ------ ------ ------ ------ ------ | ||
File stmt bran cond sub total | ||
------------------------------------------ ------ ------ ------ ------ ------ | ||
tests/cond_chained 100.0 100.0 86.7 100.0 94.4 | ||
Total 100.0 100.0 86.7 100.0 94.4 | ||
------------------------------------------ ------ ------ ------ ------ ------ | ||
|
||
|
||
Run: ... | ||
Perl version: ... | ||
OS: ... | ||
Start: ... | ||
Finish: ... | ||
|
||
tests/cond_chained | ||
|
||
line err stmt bran cond sub code | ||
1 #!/usr/bin/perl | ||
2 | ||
3 sub t1 { | ||
4 1 1 for my $x (0, 1, 2) { | ||
3 | ||
5 3 100 100 my $y = 3 if $x && $x == 2; | ||
6 } | ||
7 } | ||
8 | ||
9 sub t2 { | ||
10 1 1 for my $x (0, 1, 2) { | ||
2 | ||
11 3 100 100 return if $x && $x == 2; | ||
12 } | ||
13 } | ||
14 | ||
15 sub t3 { | ||
16 1 1 for my $x (0, 1, 2) { | ||
2 | ||
17 3 100 100 last if $x && $x == 2 && $x == 2 && $x == 2; | ||
*** 66 | ||
*** 66 | ||
18 } | ||
19 } | ||
20 | ||
21 1 t1; | ||
22 1 t2; | ||
23 1 t3; | ||
|
||
|
||
Branches | ||
-------- | ||
|
||
line err % true false branch | ||
----- --- ------ ------ ------ ------ | ||
5 100 1 2 if $x and $x == 2 | ||
11 100 1 2 if $x and $x == 2 | ||
17 100 1 2 if $x and $x == 2 and $x == 2 and $x == 2 | ||
|
||
|
||
Conditions | ||
---------- | ||
|
||
and 3 conditions | ||
|
||
line err % !l l&&!r l&&r expr | ||
----- --- ------ ------ ------ ------ ---- | ||
5 100 1 1 1 $x and $x == 2 | ||
11 100 1 1 1 $x and $x == 2 | ||
17 100 1 1 1 $x and $x == 2 | ||
*** 66 2 0 1 $x and $x == 2 and $x == 2 | ||
*** 66 2 0 1 $x and $x == 2 and $x == 2 and $x == 2 | ||
|
||
|
||
Covered Subroutines | ||
------------------- | ||
|
||
Subroutine Count Location | ||
---------- ----- --------------------- | ||
t1 1 tests/cond_chained:4 | ||
t2 1 tests/cond_chained:10 | ||
t3 1 tests/cond_chained:16 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
Reading database from ... | ||
|
||
|
||
------------------------------------------ ------ ------ ------ ------ ------ | ||
File stmt bran cond sub total | ||
------------------------------------------ ------ ------ ------ ------ ------ | ||
tests/cond_chained 100.0 100.0 86.7 100.0 93.9 | ||
Total 100.0 100.0 86.7 100.0 93.9 | ||
------------------------------------------ ------ ------ ------ ------ ------ | ||
|
||
|
||
Run: ... | ||
Perl version: ... | ||
OS: ... | ||
Start: ... | ||
Finish: ... | ||
|
||
tests/cond_chained | ||
|
||
line err stmt bran cond sub code | ||
1 #!/usr/bin/perl | ||
2 | ||
3 sub t1 { | ||
4 1 1 for my $x (0, 1, 2) { | ||
5 3 100 100 my $y = 3 if $x && $x == 2; | ||
6 } | ||
7 } | ||
8 | ||
9 sub t2 { | ||
10 1 1 for my $x (0, 1, 2) { | ||
11 3 100 100 return if $x && $x == 2; | ||
12 } | ||
13 } | ||
14 | ||
15 sub t3 { | ||
16 1 1 for my $x (0, 1, 2) { | ||
17 3 100 100 last if $x && $x == 2 && $x == 2 && $x == 2; | ||
*** 66 | ||
*** 66 | ||
18 } | ||
19 } | ||
20 | ||
21 1 t1; | ||
22 1 t2; | ||
23 1 t3; | ||
|
||
|
||
Branches | ||
-------- | ||
|
||
line err % true false branch | ||
----- --- ------ ------ ------ ------ | ||
5 100 1 2 if $x and $x == 2 | ||
11 100 1 2 if $x and $x == 2 | ||
17 100 1 2 if $x and $x == 2 and $x == 2 and $x == 2 | ||
|
||
|
||
Conditions | ||
---------- | ||
|
||
and 3 conditions | ||
|
||
line err % !l l&&!r l&&r expr | ||
----- --- ------ ------ ------ ------ ---- | ||
5 100 1 1 1 $x and $x == 2 | ||
11 100 1 1 1 $x and $x == 2 | ||
17 100 1 1 1 $x and $x == 2 | ||
*** 66 2 0 1 $x and $x == 2 and $x == 2 | ||
*** 66 2 0 1 $x and $x == 2 and $x == 2 and $x == 2 | ||
|
||
|
||
Covered Subroutines | ||
------------------- | ||
|
||
Subroutine Count Location | ||
---------- ----- --------------------- | ||
t1 1 tests/cond_chained:4 | ||
t2 1 tests/cond_chained:10 | ||
t3 1 tests/cond_chained:16 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
Reading database from ... | ||
|
||
|
||
------------------------------------------ ------ ------ ------ ------ ------ | ||
File stmt bran cond sub total | ||
------------------------------------------ ------ ------ ------ ------ ------ | ||
tests/cond_chained 100.0 83.3 86.7 100.0 90.9 | ||
Total 100.0 83.3 86.7 100.0 90.9 | ||
------------------------------------------ ------ ------ ------ ------ ------ | ||
|
||
|
||
Run: ... | ||
Perl version: ... | ||
OS: ... | ||
Start: ... | ||
Finish: ... | ||
|
||
tests/cond_chained | ||
|
||
line err stmt bran cond sub code | ||
1 #!/usr/bin/perl | ||
2 | ||
3 sub t1 { | ||
4 1 1 for my $x (0, 1, 2) { | ||
5 3 100 100 my $y = 3 if $x && $x == 2; | ||
6 } | ||
7 } | ||
8 | ||
9 sub t2 { | ||
10 1 1 for my $x (0, 1, 2) { | ||
11 3 100 100 return if $x && $x == 2; | ||
12 } | ||
13 } | ||
14 | ||
15 sub t3 { | ||
16 1 1 for my $x (0, 1, 2) { | ||
17 *** 3 50 100 last if $x && $x == 2 && $x == 2 && $x == 2; | ||
*** 66 | ||
*** 66 | ||
18 } | ||
19 } | ||
20 | ||
21 1 t1; | ||
22 1 t2; | ||
23 1 t3; | ||
|
||
|
||
Branches | ||
-------- | ||
|
||
line err % true false branch | ||
----- --- ------ ------ ------ ------ | ||
5 100 1 2 if $x and $x == 2 | ||
11 100 1 2 if $x and $x == 2 | ||
17 *** 50 1 0 if $x and $x == 2 and $x == 2 and $x == 2 | ||
|
||
|
||
Conditions | ||
---------- | ||
|
||
and 3 conditions | ||
|
||
line err % !l l&&!r l&&r expr | ||
----- --- ------ ------ ------ ------ ---- | ||
5 100 1 1 1 $x and $x == 2 | ||
11 100 1 1 1 $x and $x == 2 | ||
17 100 1 1 1 $x and $x == 2 | ||
*** 66 2 0 1 $x and $x == 2 and $x == 2 | ||
*** 66 1 0 1 $x and $x == 2 and $x == 2 and $x == 2 | ||
|
||
|
||
Covered Subroutines | ||
------------------- | ||
|
||
Subroutine Count Location | ||
---------- ----- --------------------- | ||
t1 1 tests/cond_chained:4 | ||
t2 1 tests/cond_chained:10 | ||
t3 1 tests/cond_chained:16 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/perl | ||
|
||
sub t1 { | ||
for my $x (0, 1, 2) { | ||
my $y = 3 if $x && $x == 2; | ||
} | ||
} | ||
|
||
sub t2 { | ||
for my $x (0, 1, 2) { | ||
return if $x && $x == 2; | ||
} | ||
} | ||
|
||
sub t3 { | ||
for my $x (0, 1, 2) { | ||
last if $x && $x == 2 && $x == 2 && $x == 2; | ||
} | ||
} | ||
|
||
t1; | ||
t2; | ||
t3; |