summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorToby Inkster <mail@tobyinkster.co.uk>2013-03-11 22:48:53 +0000
committerToby Inkster <mail@tobyinkster.co.uk>2013-03-11 22:48:53 +0000
commit037ead6021d3e312dc2f9fa7f2d39f4092b74088 (patch)
treed2e1ba4383cd29df11fb172cf2f41a31aed9a868 /t
parent063b5822dee69084011595cbbd70edb5b49228e5 (diff)
copyright 2013
Diffstat (limited to 't')
-rw-r--r--t/01basic.t33
-rw-r--r--t/02inflation.t39
-rw-r--r--t/03invalid_tc.t38
-rw-r--r--t/04arrayofattrs.t43
4 files changed, 80 insertions, 73 deletions
diff --git a/t/01basic.t b/t/01basic.t
index dac8a22..ba8881a 100644
--- a/t/01basic.t
+++ b/t/01basic.t
@@ -1,3 +1,20 @@
+=head1 PURPOSE
+
+Check that basic usage of MooX::late works.
+
+=head1 AUTHOR
+
+Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
+
+=head1 COPYRIGHT AND LICENCE
+
+This software is copyright (c) 2012-2013 by Toby Inkster.
+
+This is free software; you can redistribute it and/or modify it under
+the same terms as the Perl 5 programming language system itself.
+
+=cut
+
use strict;
use warnings;
use Test::More;
@@ -51,19 +68,3 @@ $o->clear_foo;
ok( not $o->has_foo );
done_testing;
-
-=head1 PURPOSE
-
-Check that basic usage of MooX::late works.
-
-=head1 AUTHOR
-
-Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
-
-=head1 COPYRIGHT AND LICENCE
-
-This software is copyright (c) 2012 by Toby Inkster.
-
-This is free software; you can redistribute it and/or modify it under
-the same terms as the Perl 5 programming language system itself.
-
diff --git a/t/02inflation.t b/t/02inflation.t
index 7d72450..02b4c04 100644
--- a/t/02inflation.t
+++ b/t/02inflation.t
@@ -1,3 +1,23 @@
+=head1 PURPOSE
+
+Check that our type constraints are correctly inflated to Moose type
+constraints.
+
+This test is skipped if L<MooX::Types::MooseLike::Base> is unavailable.
+
+=head1 AUTHOR
+
+Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
+
+=head1 COPYRIGHT AND LICENCE
+
+This software is copyright (c) 2012-2013 by Toby Inkster.
+
+This is free software; you can redistribute it and/or modify it under
+the same terms as the Perl 5 programming language system itself.
+
+=cut
+
use strict;
use warnings;
use Test::More;
@@ -30,22 +50,3 @@ eval {
};
done_testing;
-
-=head1 PURPOSE
-
-Check that our type constraints are correctly inflated to Moose type
-constraints.
-
-This test is skipped if L<MooX::Types::MooseLike::Base> is unavailable.
-
-=head1 AUTHOR
-
-Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
-
-=head1 COPYRIGHT AND LICENCE
-
-This software is copyright (c) 2012 by Toby Inkster.
-
-This is free software; you can redistribute it and/or modify it under
-the same terms as the Perl 5 programming language system itself.
-
diff --git a/t/03invalid_tc.t b/t/03invalid_tc.t
index 2b0dfde..ade9e55 100644
--- a/t/03invalid_tc.t
+++ b/t/03invalid_tc.t
@@ -1,3 +1,24 @@
+=head1 PURPOSE
+
+Check that we get warnings about unrecognisable type constraints, but only
+when a value is actually tested against the constraint.
+
+=head1 AUTHOR
+
+Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
+
+=head1 COPYRIGHT AND LICENCE
+
+This software is copyright (c) 2012-2013 by Toby Inkster.
+
+This is free software; you can redistribute it and/or modify it under
+the same terms as the Perl 5 programming language system itself.
+
+=cut
+
+use strict;
+use warnings;
+
use if !eval { require Test::Warn },
'Test::More', skip_all => 'requires Test::Warn';
use Test::Warn;
@@ -26,20 +47,3 @@ warnings_are {
} [];
done_testing;
-
-=head1 PURPOSE
-
-Check that we get warnings about unrecognisable type constraints, but only
-when a value is actually tested against the constraint.
-
-=head1 AUTHOR
-
-Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
-
-=head1 COPYRIGHT AND LICENCE
-
-This software is copyright (c) 2012 by Toby Inkster.
-
-This is free software; you can redistribute it and/or modify it under
-the same terms as the Perl 5 programming language system itself.
-
diff --git a/t/04arrayofattrs.t b/t/04arrayofattrs.t
index 7e3d453..fc664d6 100644
--- a/t/04arrayofattrs.t
+++ b/t/04arrayofattrs.t
@@ -1,3 +1,25 @@
+=head1 PURPOSE
+
+Test that this works:
+
+ has \@attributes => (...);
+
+Specifically we test is for C<lazy_build> as that's a kinda interesting
+one.
+
+=head1 AUTHOR
+
+Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
+
+=head1 COPYRIGHT AND LICENCE
+
+This software is copyright (c) 2012-2013 by Toby Inkster.
+
+This is free software; you can redistribute it and/or modify it under
+the same terms as the Perl 5 programming language system itself.
+
+=cut
+
use strict;
use warnings;
use Test::More;
@@ -28,24 +50,3 @@ is($o1->bar1, 'bar1');
is($o1->bar2, 'bar2');
done_testing;
-
-=head1 PURPOSE
-
-Test that this works:
-
- has \@attributes => (...);
-
-Specifically we test is for C<lazy_build> as that's a kinda interesting
-one.
-
-=head1 AUTHOR
-
-Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
-
-=head1 COPYRIGHT AND LICENCE
-
-This software is copyright (c) 2012 by Toby Inkster.
-
-This is free software; you can redistribute it and/or modify it under
-the same terms as the Perl 5 programming language system itself.
-