line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Class::Moose::Role::ParameterizedInstances; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: run tests against multiple instances of a test class |
4
|
|
|
|
|
|
|
|
5
|
13
|
|
|
13
|
|
24447
|
use strict; |
|
13
|
|
|
|
|
38
|
|
|
13
|
|
|
|
|
339
|
|
6
|
13
|
|
|
13
|
|
53
|
use warnings; |
|
13
|
|
|
|
|
26
|
|
|
13
|
|
|
|
|
276
|
|
7
|
13
|
|
|
13
|
|
65
|
use namespace::autoclean; |
|
13
|
|
|
|
|
27
|
|
|
13
|
|
|
|
|
104
|
|
8
|
|
|
|
|
|
|
|
9
|
13
|
|
|
13
|
|
1072
|
use 5.010000; |
|
13
|
|
|
|
|
50
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = '0.98'; |
12
|
|
|
|
|
|
|
|
13
|
13
|
|
|
13
|
|
5555
|
use Moose::Role; |
|
13
|
|
|
|
|
52993
|
|
|
13
|
|
|
|
|
50
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
requires '_constructor_parameter_sets'; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub _tcm_make_test_class_instances { |
18
|
6
|
|
|
6
|
|
1009
|
my $class = shift; |
19
|
6
|
|
|
|
|
50
|
my %base_args = @_; |
20
|
|
|
|
|
|
|
|
21
|
6
|
|
|
|
|
75
|
my %sets = $class->_constructor_parameter_sets; |
22
|
|
|
|
|
|
|
|
23
|
6
|
|
|
|
|
65
|
my @instances; |
24
|
6
|
|
|
|
|
44
|
for my $name ( keys %sets ) { |
25
|
8
|
|
|
|
|
15
|
my $instance = $class->new( %{ $sets{$name} }, %base_args ); |
|
8
|
|
|
|
|
294
|
|
26
|
8
|
|
|
|
|
11260
|
$instance->_set_test_instance_name($name); |
27
|
8
|
|
|
|
|
21
|
push @instances, $instance; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
6
|
|
|
|
|
168
|
return @instances; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__END__ |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=pod |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=encoding UTF-8 |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 NAME |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Test::Class::Moose::Role::ParameterizedInstances - run tests against multiple instances of a test class |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 VERSION |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
version 0.98 |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 SUPPORT |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Bugs may be submitted at L<https://github.com/houseabsolute/test-class-moose/issues>. |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
I am also usually active on IRC as 'autarch' on C<irc://irc.perl.org>. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 SOURCE |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
The source code repository for Test-Class-Moose can be found at L<https://github.com/houseabsolute/test-class-moose>. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 AUTHORS |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=over 4 |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=item * |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Curtis "Ovid" Poe <ovid@cpan.org> |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=item * |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Dave Rolsky <autarch@urth.org> |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=back |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
This software is copyright (c) 2012 - 2019 by Curtis "Ovid" Poe. |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
78
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
The full text of the license can be found in the |
81
|
|
|
|
|
|
|
F<LICENSE> file included with this distribution. |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=cut |