line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::OpenTracing::Interface::ScopeManager; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Test::OpenTracing::Interface::ScopeManager - compliance testing |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 SYNOPSIS |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 SYNOPSIS |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
use Test::OpenTracing::Interface::ScopeManager qw/:all/; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
can_all_ok 'MyImplementation::ScopeManager', |
14
|
|
|
|
|
|
|
"MyImplementation class does have all subs defined, well done!"; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
my $test_thing = MyImplementation::ScopeManager->new( ... ); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
can_all_ok( $test_thing, |
19
|
|
|
|
|
|
|
"An object constructed by 'new' has all required subs defined" |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=cut |
23
|
|
|
|
|
|
|
|
24
|
3
|
|
|
3
|
|
360523
|
use strict; |
|
3
|
|
|
|
|
32
|
|
|
3
|
|
|
|
|
92
|
|
25
|
3
|
|
|
3
|
|
15
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
126
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
our $VERSION = 'v0.23.0'; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
3
|
|
|
3
|
|
1210
|
use Test::OpenTracing::Interface; |
|
3
|
|
|
|
|
11
|
|
|
3
|
|
|
|
|
141
|
|
31
|
|
|
|
|
|
|
|
32
|
3
|
|
|
3
|
|
30
|
use Exporter qw/import/; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
215
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
our @EXPORT_OK = qw/can_all_ok/; |
35
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( all => [qw/can_all_ok/] ); |
36
|
|
|
|
|
|
|
|
37
|
3
|
|
|
3
|
|
1472
|
use syntax qw/maybe/; |
|
3
|
|
|
|
|
56546
|
|
|
3
|
|
|
|
|
15
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 DESCRIPTION |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
This package will provide the tests as described in |
44
|
|
|
|
|
|
|
L. |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 EXPORTED SUBROUTINES |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=cut |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head2 C |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Test that all methods mentioned in L |
57
|
|
|
|
|
|
|
are defined. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=cut |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub can_all_ok { |
62
|
3
|
|
|
3
|
1
|
7289
|
my $thing = shift; |
63
|
3
|
|
|
|
|
5
|
my $message = shift; |
64
|
|
|
|
|
|
|
|
65
|
3
|
|
|
|
|
44
|
my $Test = Test::OpenTracing::Interface::CanAll->new( |
66
|
|
|
|
|
|
|
test_this => $thing, |
67
|
|
|
|
|
|
|
interface_name => 'ScopeManager', |
68
|
|
|
|
|
|
|
interface_methods => [ |
69
|
|
|
|
|
|
|
'activate_span', |
70
|
|
|
|
|
|
|
'get_active_scope' |
71
|
|
|
|
|
|
|
], |
72
|
|
|
|
|
|
|
maybe |
73
|
|
|
|
|
|
|
message => $message, |
74
|
|
|
|
|
|
|
); |
75
|
|
|
|
|
|
|
|
76
|
3
|
|
|
|
|
2730
|
return $Test->run_tests; |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 SEE ALSO |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=over |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=item L |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Test OpenTracing::Interface compliance. |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=item L |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
Defines the ContextReference. |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=back |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=head1 AUTHOR |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
Theo van Hoesel |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
'Test OpenTracing' is Copyright (C) 2020, Perceptyx Inc |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify it under |
108
|
|
|
|
|
|
|
the terms of the Artistic License 2.0. |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
This library is distributed in the hope that it will be useful, but it is |
111
|
|
|
|
|
|
|
provided "as is" and without any express or implied warranties. |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
For details, see the full text of the license in the file LICENSE. |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=cut |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
1; |