Coverage Summary

# File Coverage

t/PerlySense-find-module-interface.t
Criterion | Covered | Total | %
--- | --- | --- | ---
statement | 47 | 47 | 100.0
branch | 1 | 2 | 50.0
condition |  |  | n/a
subroutine | 8 | 8 | 100.0
pod |  |  | n/a
total | 56 | 57 | 98.2

line | stmt | bran | cond | sub | pod | time | code
--- | --- | --- | --- | --- | --- | --- | ---
1 |  |  |  |  |  |  | #!/usr/bin/perl -w
2 | 1 |  |  | 1 |  | 135834 | use strict;
| 1 |  |  |  |  | 2 |
| 1 |  |  |  |  | 63 |
3 |  |  |  |  |  |  |
4 | 1 |  |  | 1 |  | 506 | use Test::More tests => 10;
| 1 |  |  |  |  | 15954 |
| 1 |  |  |  |  | 8 |
5 | 1 |  |  | 1 |  | 713 | use Test::Exception;
| 1 |  |  |  |  | 4349 |
| 1 |  |  |  |  | 5 |
6 |  |  |  |  |  |  |
7 | 1 |  |  | 1 |  | 255 | use File::Basename;
| 1 |  |  |  |  | 2 |
| 1 |  |  |  |  | 106 |
8 |  |  |  |  |  |  |
9 | 1 |  |  | 1 |  | 364 | use lib "../lib";
| 1 |  |  |  |  | 545 |
| 1 |  |  |  |  | 4 |
10 |  |  |  |  |  |  |
11 | 1 |  |  | 1 |  | 91962 | use_ok("Devel::PerlySense");
| 1 |  |  |  |  | 620 |
| 1 |  |  |  |  | 2 |
| 1 |  |  |  |  | 1 |
| 1 |  |  |  |  | 6 |
12 | 1 |  |  | 1 |  | 278 | use_ok("Devel::PerlySense::Document::Location");
| 1 |  |  |  |  | 77 |
| 1 |  |  |  |  | 1 |
| 1 |  |  |  |  | 2 |
| 1 |  |  |  |  | 14 |
13 |  |  |  |  |  |  |
14 |  |  |  |  |  |  |
15 | 1 | 50 |  | 1 |  | 1456 | BEGIN { -d "t" and chdir("t"); }
16 |  |  |  |  |  |  |
17 |  |  |  |  |  |  |
18 | 1 |  |  |  |  | 195 | ok(my $oPs = Devel::PerlySense->new(), "new ok");
19 |  |  |  |  |  |  |
20 |  |  |  |  |  |  |
21 |  |  |  |  |  |  |
22 | 1 |  |  |  |  | 193 | my $dirData = "data/project-lib";
23 | 1 |  |  |  |  | 3 | my $fileOrigin = "$dirData/Game/Object/Worm.pm";
24 | 1 |  |  |  |  | 55 | my $dirOrigin = dirname($fileOrigin);
25 | 1 |  |  |  |  | 2 | my $raModule;
26 | 1 |  |  |  |  | 1 | my $raMethodRequired;
27 | 1 |  |  |  |  | 1 | my $raMethodNice;
28 | 1 |  |  |  |  | 1 | my @aDocumentFound;
29 |  |  |  |  |  |  |
30 | 1 |  |  |  |  | 3 | $raModule = [qw/ Game::Lawn Game::Location Game::Direction Game::Event::Timed /];
31 | 1 |  |  |  |  | 1 | $raMethodRequired = ["placeObjectBodyPartAt"];
32 | 1 |  |  |  |  | 2 | $raMethodNice = ["wormHasCrashed", "objectHasMoved", "placeObjectBodyPartAt"];
33 | 1 |  |  |  |  | 4 | ok(@aDocumentFound = $oPs->aDocumentFindModuleWithInterface(
34 |  |  |  |  |  |  | raNameModule => $raModule,
35 |  |  |  |  |  |  | raMethodRequired => $raMethodRequired,
36 |  |  |  |  |  |  | raMethodNice => $raMethodNice,
37 |  |  |  |  |  |  | dirOrigin => $dirOrigin,
38 |  |  |  |  |  |  | ), "aDocumentFindModuleWithInterface Found modules");
39 | 1 |  |  |  |  | 307 | is(scalar(@aDocumentFound), 1, " Found correct no of modules");
40 | 1 |  |  |  |  | 218 | like($aDocumentFound[0]->file, qr/Game.Lawn.pm$/, " Found correct modules");
41 |  |  |  |  |  |  |
42 |  |  |  |  |  |  |
43 |  |  |  |  |  |  |
44 | 1 |  |  |  |  | 195 | $raModule = [qw/ Game::Object Game::Object::Worm::Bot Game::Event::Timed /];
45 | 1 |  |  |  |  | 3 | $raMethodRequired = ["raBodyLocation"];
46 | 1 |  |  |  |  | 3 | $raMethodNice = ["buildBodyRight", "crash", "checkTick"];
47 | 1 |  |  |  |  | 5 | ok(@aDocumentFound = $oPs->aDocumentFindModuleWithInterface(
48 |  |  |  |  |  |  | raNameModule => $raModule,
49 |  |  |  |  |  |  | raMethodRequired => $raMethodRequired,
50 |  |  |  |  |  |  | raMethodNice => $raMethodNice,
51 |  |  |  |  |  |  | dirOrigin => $dirOrigin,
52 |  |  |  |  |  |  | ), "aDocumentFindModuleWithInterface Found modules");
53 | 1 |  |  |  |  | 302 | is(scalar(@aDocumentFound), 2, " Found correct no of modules");
54 | 1 |  |  |  |  | 216 | like($aDocumentFound[0]->file, qr/Game.Object.pm$/, " Found correct modules");
55 | 1 |  |  |  |  | 215 | like($aDocumentFound[1]->file, qr/Game.Object.Worm.Bot.pm$/, " Found correct modules");
56 |  |  |  |  |  |  |
57 |  |  |  |  |  |  |
58 |  |  |  |  |  |  |
59 |  |  |  |  |  |  |
60 |  |  |  |  |  |  |
61 |  |  |  |  |  |  |
62 |  |  |  |  |  |  | __END__