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