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
|
|
25479
|
use strict; |
|
13
|
|
|
|
|
26
|
|
|
13
|
|
|
|
|
326
|
|
6
|
13
|
|
|
13
|
|
65
|
use warnings; |
|
13
|
|
|
|
|
15
|
|
|
13
|
|
|
|
|
275
|
|
7
|
13
|
|
|
13
|
|
66
|
use namespace::autoclean; |
|
13
|
|
|
|
|
25
|
|
|
13
|
|
|
|
|
115
|
|
8
|
|
|
|
|
|
|
|
9
|
13
|
|
|
13
|
|
1193
|
use 5.010000; |
|
13
|
|
|
|
|
41
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = '0.97'; |
12
|
|
|
|
|
|
|
|
13
|
13
|
|
|
13
|
|
5613
|
use Moose::Role; |
|
13
|
|
|
|
|
54104
|
|
|
13
|
|
|
|
|
31
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
requires '_constructor_parameter_sets'; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub _tcm_make_test_class_instances { |
18
|
6
|
|
|
6
|
|
681
|
my $class = shift; |
19
|
6
|
|
|
|
|
58
|
my %base_args = @_; |
20
|
|
|
|
|
|
|
|
21
|
6
|
|
|
|
|
104
|
my %sets = $class->_constructor_parameter_sets; |
22
|
|
|
|
|
|
|
|
23
|
6
|
|
|
|
|
88
|
my @instances; |
24
|
6
|
|
|
|
|
53
|
for my $name ( keys %sets ) { |
25
|
8
|
|
|
|
|
25
|
my $instance = $class->new( %{ $sets{$name} }, %base_args ); |
|
8
|
|
|
|
|
272
|
|
26
|
8
|
|
|
|
|
6358
|
$instance->_set_test_instance_name($name); |
27
|
8
|
|
|
|
|
20
|
push @instances, $instance; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
6
|
|
|
|
|
45
|
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.97 |
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 |