| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Test::Workflow::Layer; |
|
2
|
137
|
|
|
137
|
|
779
|
use strict; |
|
|
137
|
|
|
|
|
285
|
|
|
|
137
|
|
|
|
|
4414
|
|
|
3
|
137
|
|
|
137
|
|
1027
|
use warnings; |
|
|
137
|
|
|
|
|
296
|
|
|
|
137
|
|
|
|
|
4392
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
137
|
|
|
137
|
|
107079
|
use Test::Workflow::Block; |
|
|
137
|
|
|
|
|
443
|
|
|
|
137
|
|
|
|
|
6504
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
137
|
|
|
137
|
|
875
|
use Fennec::Util qw/accessors require_module/; |
|
|
137
|
|
|
|
|
1301
|
|
|
|
137
|
|
|
|
|
1835
|
|
|
8
|
137
|
|
|
137
|
|
144576
|
use Scalar::Util qw/blessed/; |
|
|
137
|
|
|
|
|
355
|
|
|
|
137
|
|
|
|
|
10004
|
|
|
9
|
137
|
|
|
137
|
|
839
|
use Carp qw/croak/; |
|
|
137
|
|
|
|
|
377
|
|
|
|
137
|
|
|
|
|
84829
|
|
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our @ATTRIBUTES = qw{ |
|
12
|
|
|
|
|
|
|
test |
|
13
|
|
|
|
|
|
|
case |
|
14
|
|
|
|
|
|
|
child |
|
15
|
|
|
|
|
|
|
before_case |
|
16
|
|
|
|
|
|
|
before_each |
|
17
|
|
|
|
|
|
|
before_all |
|
18
|
|
|
|
|
|
|
after_each |
|
19
|
|
|
|
|
|
|
after_all |
|
20
|
|
|
|
|
|
|
around_each |
|
21
|
|
|
|
|
|
|
around_all |
|
22
|
|
|
|
|
|
|
control |
|
23
|
|
|
|
|
|
|
}; |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
accessors 'finalized', @ATTRIBUTES; |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub new { |
|
28
|
338
|
|
|
338
|
0
|
1134
|
bless( {map { ( $_ => [] ) } @ATTRIBUTES}, shift ); |
|
|
3718
|
|
|
|
|
10942
|
|
|
29
|
|
|
|
|
|
|
} |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub merge_in { |
|
32
|
3
|
|
|
3
|
0
|
7
|
my $self = shift; |
|
33
|
3
|
|
|
|
|
9
|
my ( $caller, @classes ) = @_; |
|
34
|
3
|
|
|
|
|
9
|
for my $class (@classes) { |
|
35
|
3
|
|
|
|
|
15
|
require_module $class; |
|
36
|
3
|
|
|
|
|
44
|
push @{$self->$_} => @{$class->TEST_WORKFLOW->root_layer->$_} for @ATTRIBUTES; |
|
|
33
|
|
|
|
|
107
|
|
|
|
33
|
|
|
|
|
82
|
|
|
37
|
|
|
|
|
|
|
} |
|
38
|
|
|
|
|
|
|
} |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub add_control { |
|
41
|
10
|
|
|
10
|
0
|
20
|
my $self = shift; |
|
42
|
10
|
|
|
|
|
25
|
push @{$self->control} => @_; |
|
|
10
|
|
|
|
|
35
|
|
|
43
|
|
|
|
|
|
|
} |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub add_after_case { |
|
46
|
0
|
|
|
0
|
0
|
0
|
goto &before_each; |
|
47
|
|
|
|
|
|
|
} |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
for my $type (qw/test case child before_case before_each before_all around_each around_all/) { |
|
50
|
|
|
|
|
|
|
my $add = sub { |
|
51
|
1210
|
|
|
1210
|
|
1744
|
my $self = shift; |
|
52
|
1210
|
|
|
|
|
5832
|
my $block = Test::Workflow::Block->new(@_); |
|
53
|
1210
|
|
|
|
|
3937
|
$block->subtype($type); |
|
54
|
1210
|
|
|
|
|
1568
|
push @{$self->$type} => $block; |
|
|
1210
|
|
|
|
|
6445
|
|
|
55
|
|
|
|
|
|
|
}; |
|
56
|
137
|
|
|
137
|
|
1057
|
no strict 'refs'; |
|
|
137
|
|
|
|
|
941
|
|
|
|
137
|
|
|
|
|
23510
|
|
|
57
|
|
|
|
|
|
|
*{"add_$type"} = $add; |
|
58
|
|
|
|
|
|
|
} |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
for my $type (qw/after_each after_all/) { |
|
61
|
|
|
|
|
|
|
my $add = sub { |
|
62
|
76
|
|
|
76
|
|
133
|
my $self = shift; |
|
63
|
76
|
|
|
|
|
256
|
my $block = Test::Workflow::Block->new(@_); |
|
64
|
76
|
|
|
|
|
395
|
$block->subtype($type); |
|
65
|
76
|
|
|
|
|
104
|
unshift @{$self->$type} => $block; |
|
|
76
|
|
|
|
|
460
|
|
|
66
|
|
|
|
|
|
|
}; |
|
67
|
137
|
|
|
137
|
|
933
|
no strict 'refs'; |
|
|
137
|
|
|
|
|
1391
|
|
|
|
137
|
|
|
|
|
18357
|
|
|
68
|
|
|
|
|
|
|
*{"add_$type"} = $add; |
|
69
|
|
|
|
|
|
|
} |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
1; |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
__END__ |