|  line  | 
 stmt  | 
 bran  | 
 cond  | 
 sub  | 
 pod  | 
 time  | 
 code  | 
| 
1
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 package Text::TestBase::SubTest::Node::Root;  | 
| 
2
 | 
16
 | 
 
 | 
 
 | 
  
16
  
 | 
 
 | 
103297
 | 
 use strict;  | 
| 
 
 | 
16
 | 
 
 | 
 
 | 
 
 | 
 
 | 
28
 | 
    | 
| 
 
 | 
16
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1165
 | 
    | 
| 
3
 | 
16
 | 
 
 | 
 
 | 
  
16
  
 | 
 
 | 
148
 | 
 use warnings;  | 
| 
 
 | 
16
 | 
 
 | 
 
 | 
 
 | 
 
 | 
30
 | 
    | 
| 
 
 | 
16
 | 
 
 | 
 
 | 
 
 | 
 
 | 
543
 | 
    | 
| 
4
 | 
16
 | 
 
 | 
 
 | 
  
16
  
 | 
 
 | 
78
 | 
 use Carp qw(croak);  | 
| 
 
 | 
16
 | 
 
 | 
 
 | 
 
 | 
 
 | 
27
 | 
    | 
| 
 
 | 
16
 | 
 
 | 
 
 | 
 
 | 
 
 | 
5466
 | 
    | 
| 
5
 | 
16
 | 
 
 | 
 
 | 
  
16
  
 | 
 
 | 
1170
 | 
 use parent qw(Text::TestBase::SubTest::Node::SubTest);  | 
| 
 
 | 
16
 | 
 
 | 
 
 | 
 
 | 
 
 | 
396
 | 
    | 
| 
 
 | 
16
 | 
 
 | 
 
 | 
 
 | 
 
 | 
83
 | 
    | 
| 
6
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
7
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub new {  | 
| 
8
 | 
20
 | 
 
 | 
 
 | 
  
20
  
 | 
  
0
  
 | 
71
 | 
     my ($class, %args) = @_;  | 
| 
9
 | 
20
 | 
 
 | 
  
 50
  
 | 
 
 | 
 
 | 
362
 | 
     $class->SUPER::new(  | 
| 
10
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         name => $args{name} || 'root',  | 
| 
11
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         depth => 0,  | 
| 
12
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     );  | 
| 
13
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
14
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
15
 | 
10
 | 
 
 | 
 
 | 
  
10
  
 | 
  
0
  
 | 
48
 | 
 sub is_root { 1 }  | 
| 
16
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
17
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub last_subtest {  | 
| 
18
 | 
69
 | 
 
 | 
 
 | 
  
69
  
 | 
  
0
  
 | 
4242
 | 
     my ($self, %args) = @_;  | 
| 
19
 | 
69
 | 
 
 | 
 
 | 
 
 | 
 
 | 
282
 | 
     my $target_depth = $args{depth};  | 
| 
20
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
21
 | 
69
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
336
 | 
     croak '$self->depth is required'  unless defined $self->depth;  | 
| 
22
 | 
69
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
530
 | 
     croak q|args 'depth' is required| unless defined $target_depth;  | 
| 
23
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
24
 | 
69
 | 
 
 | 
 
 | 
 
 | 
 
 | 
259
 | 
     my $current_subtest = $self;  | 
| 
25
 | 
69
 | 
 
 | 
 
 | 
 
 | 
 
 | 
86
 | 
     while (1) {  | 
| 
26
 | 
110
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
282
 | 
         last if $current_subtest->depth == $target_depth;  | 
| 
27
 | 
44
 | 
 
 | 
 
 | 
 
 | 
 
 | 
643
 | 
         my $subtests = $current_subtest->child_subtests;  | 
| 
28
 | 
44
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
100
 | 
         unless (@$subtests) {  | 
| 
29
 | 
3
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
7
 | 
             return if $current_subtest->depth < $target_depth;  | 
| 
30
 | 
0
 | 
 
 | 
 
 | 
 
 | 
 
 | 
0
 | 
             last;  | 
| 
31
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         }  | 
| 
32
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         # depth++  | 
| 
33
 | 
41
 | 
 
 | 
 
 | 
 
 | 
 
 | 
84
 | 
         $current_subtest =  $subtests->[-1];  | 
| 
34
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
35
 | 
66
 | 
 
 | 
 
 | 
 
 | 
 
 | 
541
 | 
     return $current_subtest;  | 
| 
36
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
37
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
38
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 1;  |