-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
413 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,77 @@ | ||
Reading database from ... | ||
|
||
|
||
-------------- ------ ------ ------ ------ ------ | ||
File stmt bran cond sub total | ||
-------------- ------ ------ ------ ------ ------ | ||
tests/moo_cond 100.0 100.0 n/a 100.0 100.0 | ||
Total 100.0 100.0 n/a 100.0 100.0 | ||
-------------- ------ ------ ------ ------ ------ | ||
|
||
|
||
Run: ... | ||
Perl version: ... | ||
OS: ... | ||
Start: ... | ||
Finish: ... | ||
|
||
tests/moo_cond | ||
|
||
line err stmt bran cond sub code | ||
1 #!/usr/bin/perl | ||
2 | ||
3 # Copyright 2012-2024, 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 # __COVER__ skip_test $] < 5.008002 || !(eval "use Moo 1.000003; 23") | ||
11 # __COVER__ skip_reason Moo not available | ||
12 | ||
13 1 1 use strict; | ||
1 | ||
1 | ||
14 1 1 use warnings; | ||
1 | ||
1 | ||
15 | ||
16 package Cover_branch_bug_Moo; | ||
17 | ||
18 1 1 use Moo; | ||
1 | ||
1 | ||
19 | ||
20 1 has config => ( is => 'lazy' ); | ||
21 1 has config2 => ( is => 'ro' ); | ||
22 | ||
23 1 __PACKAGE__->new( config => {}, config2 => {} )->trigger; | ||
24 1 __PACKAGE__->new( config => {debug => 1}, config2 => {debug => 1} )->trigger; | ||
25 | ||
26 sub trigger { | ||
27 2 100 2 1 if $_[0]->config->{debug}; | ||
28 2 100 1 if $_[0]->config2->{debug}; | ||
29 } | ||
|
||
|
||
Branches | ||
-------- | ||
|
||
line err % true false branch | ||
----- --- ------ ------ ------ ------ | ||
27 100 1 1 if $_[0]->config->{"debug"} | ||
28 100 1 1 if $_[0]->config2->{"debug"} | ||
|
||
|
||
Covered Subroutines | ||
------------------- | ||
|
||
Subroutine Count Location | ||
---------- ----- ----------------- | ||
BEGIN 1 tests/moo_cond:13 | ||
BEGIN 1 tests/moo_cond:14 | ||
BEGIN 1 tests/moo_cond:18 | ||
trigger 2 tests/moo_cond:27 | ||
|
||
|
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,77 @@ | ||
Reading database from ... | ||
|
||
|
||
-------------- ------ ------ ------ ------ ------ | ||
File stmt bran cond sub total | ||
-------------- ------ ------ ------ ------ ------ | ||
tests/moo_cond 100.0 100.0 n/a 100.0 100.0 | ||
Total 100.0 100.0 n/a 100.0 100.0 | ||
-------------- ------ ------ ------ ------ ------ | ||
|
||
|
||
Run: ... | ||
Perl version: ... | ||
OS: ... | ||
Start: ... | ||
Finish: ... | ||
|
||
tests/moo_cond | ||
|
||
line err stmt bran cond sub code | ||
1 #!/usr/bin/perl | ||
2 | ||
3 # Copyright 2012-2024, 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 # __COVER__ skip_test $] < 5.008002 || !(eval "use Moo 1.000003; 23") | ||
11 # __COVER__ skip_reason Moo not available | ||
12 | ||
13 1 1 use strict; | ||
1 | ||
1 | ||
14 1 1 use warnings; | ||
1 | ||
1 | ||
15 | ||
16 package Cover_branch_bug_Moo; | ||
17 | ||
18 1 1 use Moo; | ||
1 | ||
1 | ||
19 | ||
20 1 has config => ( is => 'lazy' ); | ||
21 1 has config2 => ( is => 'ro' ); | ||
22 | ||
23 1 __PACKAGE__->new( config => {}, config2 => {} )->trigger; | ||
24 1 __PACKAGE__->new( config => {debug => 1}, config2 => {debug => 1} )->trigger; | ||
25 | ||
26 sub trigger { | ||
27 2 100 2 1 if $_[0]->config->{debug}; | ||
28 2 100 1 if $_[0]->config2->{debug}; | ||
29 } | ||
|
||
|
||
Branches | ||
-------- | ||
|
||
line err % true false branch | ||
----- --- ------ ------ ------ ------ | ||
27 100 1 1 if $_[0]->config->{'debug'} | ||
28 100 1 1 if $_[0]->config2->{'debug'} | ||
|
||
|
||
Covered Subroutines | ||
------------------- | ||
|
||
Subroutine Count Location | ||
---------- ----- ----------------- | ||
BEGIN 1 tests/moo_cond:13 | ||
BEGIN 1 tests/moo_cond:14 | ||
BEGIN 1 tests/moo_cond:18 | ||
trigger 2 tests/moo_cond:27 | ||
|
||
|
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,47 @@ | ||
Reading database from ... | ||
|
||
|
||
----------------- ------ ------ ------ ------ ------ | ||
File stmt bran cond sub total | ||
----------------- ------ ------ ------ ------ ------ | ||
tests/moose_basic 100.0 n/a n/a 100.0 100.0 | ||
Total 100.0 n/a n/a 100.0 100.0 | ||
----------------- ------ ------ ------ ------ ------ | ||
|
||
|
||
Run: ... | ||
Perl version: ... | ||
OS: ... | ||
Start: ... | ||
Finish: ... | ||
|
||
tests/moose_basic | ||
|
||
line err stmt bran cond sub code | ||
1 #!/usr/bin/perl | ||
2 | ||
3 # Copyright 2011-2024, 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 # __COVER__ skip_test $] < 5.010 || !(eval "use Moose; 23") | ||
11 # __COVER__ skip_reason Moose not available or unreliable with Devel::Cover | ||
12 | ||
13 package Foo; | ||
14 1 1 use Moose; | ||
1 | ||
1 | ||
15 1 __PACKAGE__->meta->make_immutable; | ||
|
||
|
||
Covered Subroutines | ||
------------------- | ||
|
||
Subroutine Count Location | ||
---------- ----- -------------------- | ||
BEGIN 1 tests/moose_basic:14 | ||
|
||
|
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/moose_cond 100.0 n/a 75.0 100.0 96.1 | ||
Total 100.0 n/a 75.0 100.0 96.1 | ||
---------------- ------ ------ ------ ------ ------ | ||
|
||
|
||
Run: ... | ||
Perl version: ... | ||
OS: ... | ||
Start: ... | ||
Finish: ... | ||
|
||
tests/moose_cond | ||
|
||
line err stmt bran cond sub code | ||
1 #!/usr/bin/perl | ||
2 | ||
3 # Copyright 2011-2024, 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 # __COVER__ skip_test $] < 5.010 || !(eval "use Moose 2; 23") | ||
11 # __COVER__ skip_reason Moose 2 not available or unreliable with Devel::Cover | ||
12 | ||
13 1 1 use strict; | ||
1 | ||
1 | ||
14 1 1 use warnings; | ||
1 | ||
1 | ||
15 | ||
16 package Cover_branch_bug; | ||
17 | ||
18 1 1 use Moose; | ||
1 | ||
1 | ||
19 1 has meep => ( isa => 'HashRef', is => 'rw' ); | ||
20 | ||
21 1 my $self = __PACKAGE__->new; | ||
22 | ||
23 1 $self->meep( { marp => 0 } ); | ||
24 1 print "meep contains " . $self->wagh . "\n"; | ||
25 | ||
26 1 $self->meep( { marp => 1 } ); | ||
27 1 print "meep contains " . $self->wagh . "\n"; | ||
28 | ||
29 sub wagh { | ||
30 2 2 my ( $self ) = @_; | ||
31 *** 2 * 50 my $x = $self || 0; | ||
32 2 100 return $self->meep->{marp} || 0; | ||
33 # return $self || 0; | ||
34 } | ||
|
||
|
||
Conditions | ||
---------- | ||
|
||
or 2 conditions | ||
|
||
line err % l !l expr | ||
----- --- ------ ------ ------ ---- | ||
31 *** 50 2 0 $self || 0 | ||
32 100 1 1 $self->meep->{'marp'} || 0 | ||
|
||
|
||
Covered Subroutines | ||
------------------- | ||
|
||
Subroutine Count Location | ||
---------- ----- ------------------- | ||
BEGIN 1 tests/moose_cond:13 | ||
BEGIN 1 tests/moose_cond:14 | ||
BEGIN 1 tests/moose_cond:18 | ||
wagh 2 tests/moose_cond:30 | ||
|
||
|
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,66 @@ | ||
Reading database from ... | ||
|
||
|
||
---------------------- ------ ------ ------ ------ ------ | ||
File stmt bran cond sub total | ||
---------------------- ------ ------ ------ ------ ------ | ||
tests/moose_constraint 100.0 n/a n/a 100.0 100.0 | ||
Total 100.0 n/a n/a 100.0 100.0 | ||
---------------------- ------ ------ ------ ------ ------ | ||
|
||
|
||
Run: ... | ||
Perl version: ... | ||
OS: ... | ||
Start: ... | ||
Finish: ... | ||
|
||
tests/moose_constraint | ||
|
||
line err stmt bran cond sub code | ||
1 #!/usr/bin/perl | ||
2 | ||
3 # Copyright 2011-2024, 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 # __COVER__ skip_test $] < 5.010 || !(eval "use Moose; 23") | ||
11 # __COVER__ skip_reason Moose not available or unreliable with Devel::Cover | ||
12 | ||
13 1 1 use 5.010; | ||
1 1 | ||
1 | ||
1 | ||
1 | ||
14 | ||
15 package Foo; | ||
16 | ||
17 1 1 use Moose; | ||
1 | ||
1 | ||
18 | ||
19 1 has bar => ( | ||
20 is => 'rw', | ||
21 isa => 'Maybe[Str]', | ||
22 ); | ||
23 | ||
24 package main; | ||
25 | ||
26 1 my $example = Foo->new(); | ||
27 1 $example->bar('whatever'); | ||
28 1 say $example->bar(); | ||
|
||
|
||
Covered Subroutines | ||
------------------- | ||
|
||
Subroutine Count Location | ||
---------- ----- ------------------------- | ||
BEGIN 1 tests/moose_constraint:13 | ||
BEGIN 1 tests/moose_constraint:13 | ||
BEGIN 1 tests/moose_constraint:17 | ||
|
||
|
Oops, something went wrong.