File Coverage

t/PerlySense-Document-Meta-package.t
Criterion Covered Total %
statement 46 46 100.0
branch 1 2 50.0
condition n/a
subroutine 10 10 100.0
pod n/a
total 57 58 98.2


line stmt bran cond sub pod time code
1             #!/usr/bin/perl -w
2 1     1   105320 use strict;
  1         1  
  1         63  
3              
4 1     1   479 use Test::More tests => 11;
  1         16128  
  1         7  
5 1     1   1106 use Test::Exception;
  1         2780  
  1         3  
6              
7 1     1   207 use File::Basename;
  1         1  
  1         103  
8 1     1   262 use File::Spec::Functions;
  1         448  
  1         60  
9              
10 1     1   260 use lib "../lib";
  1         535  
  1         3  
11              
12 1     1   101483 use_ok("Devel::PerlySense");
  1         622  
  1         3  
  1         2  
  1         5  
13 1     1   279 use_ok("Devel::PerlySense::Document");
  1         70  
  1         2  
  1         1  
  1         6  
14 1     1   194 use_ok("Devel::PerlySense::Document::Meta");
  1         57  
  1         1  
  1         2  
  1         14  
15              
16              
17 1 50   1   1600 BEGIN { -d "t" and chdir("t"); }
18              
19              
20 1         189 ok(my $oDocument = Devel::PerlySense::Document->new(oPerlySense => Devel::PerlySense->new()), "new ok");
21              
22              
23 1         188 my $dirData = "data/simple-lib";
24 1         3 my $fileOrigin = "$dirData/lib/Win32/Word/Writer/Table.pm";
25              
26 1         27 is($oDocument->oMeta, undef, " oDocument is ok");
27 1         198 ok($oDocument->parse(file => $fileOrigin), "Parsed file ok");
28 1         371 is($oDocument->file, $fileOrigin, " file set ok");
29 1         213 isnt($oDocument->oDocument, undef, " oDocument is ok");
30 1         218 isnt($oDocument->oMeta, undef, " oDocument is ok");
31              
32              
33 1         214 my $oMeta = $oDocument->oMeta;
34              
35 1         4 is(scalar(@{$oMeta->raPackage}), 1, " correct no of package declarations");
  1         25  
36 1         210 is($oMeta->raPackage->[0]->namespace, "Win32::Word::Writer::Table", " correct namespace");
37              
38              
39              
40              
41             __END__