File Coverage

test/html/object.htm
Criterion Covered Total %
statement 49 49 100.0
branch 2 2 100.0
condition n/a
subroutine 7 7 100.0
pod n/a
total 58 58 100.0


line stmt bran cond sub pod time code
1 1     1   10
  1         2  
  1         203  
2            
3             Some tests for Embperl
4 1     1   3
  1         2  
5              
6 1         21  
7            
8              
9 1         3 [-
10 1         941  
11             package test::object ;
12 1     1   6  
  1     1   2  
  1         61  
  1         5  
  1         4  
  1         32  
13             sub id
14 4     4   6 {
15             my $self = shift ;
16 4         37
17             return "id $self->{n}" ;
18             }
19              
20             sub name
21 4     4   6 {
22             my $self = shift ;
23 4         26
24             return "name $self->{n}" ;
25             }
26              
27             sub new
28 5     5   8 {
29 5         7 my $class = shift ;
30 5         12 my $n = shift ;
31 5         11 my $self = {n=>$n} ;
32 5         22 bless $self, $class ;
33             return $self ;
34             }
35              
36             -]
37              
38              
39             [-
40 1         3 test::object->new (0) ;
  1         7  
41             -]
42              
43             [-
44 1         2 $obj[0] = 1 ;
  1         2  
45             -]
46              
47             [-
48 1         1 $obj[0] = test::object->new (0) ;
  1         4  
49              
50              
51              
52 1         4 $obj[1] = test::object->new (1) ;
53 1         3 $obj[2] = test::object->new (2) ;
54 1         3 $obj[3] = test::object->new (3) ;
55             -]
56              
57 1         26
  1         6  
58 5         190
59 5 100       85 [- $o = $obj[$row] -]
  5         9  
  5         6  
60 5         18
61 1         44 [+$o->name+]
  1         3  
  4         11  
62 4         77
  4         11  
63 4         10
64 4         75
65              
66 1         17  
67            
68 1         2