File Coverage

t/each_off_by_one.t
Criterion Covered Total %
statement 25 25 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod n/a
total 31 31 100.0


line stmt bran cond sub pod time code
1 1     1   7 use strict;
  1         8  
  1         30  
2 1     1   5 use warnings;
  1         1  
  1         26  
3              
4 1     1   619 use Test::More;
  1         98474  
  1         9  
5 1     1   814 use Test::Mock::Simple;
  1         553  
  1         1560  
6              
7 1     1   105 use_ok 'XML::BindData';
  1         604  
  1         57151  
  1         3  
  1         23  
8              
9 1         567 my $counter = 0;
10 1         11 my $mock = Test::Mock::Simple->new(module => 'XML::BindData');
11 1     1   42 $mock->add('_get' => sub { $counter++; return []; });
  1         672  
  1         2  
12              
13 1         42 is(
14             XML::BindData->bind(
15             '',
16             { bar => [ ] }
17             ),
18             ''
19             );
20 1         329 is($counter, 1, 'Terminated correctly after each');
21              
22 1         315 done_testing;