summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorToby Inkster <mail@tobyinkster.co.uk>2019-11-18 16:18:09 +0000
committerToby Inkster <mail@tobyinkster.co.uk>2019-11-18 16:18:09 +0000
commit013b5bd1a96b09f6b3b2a5977b65eb02e377140f (patch)
tree7b5f074b7ed008a6ca01c7c10044b761abf77d94 /t
parentf55e0c83cbc1deacc44905daa15d4f63bc0c8af3 (diff)
get tests passing and stuff
Diffstat (limited to 't')
-rw-r--r--t/01basic.t2
-rw-r--r--t/02inflation.t2
-rw-r--r--t/03invalid_tc.t21
-rw-r--r--t/04arrayofattrs.t2
4 files changed, 16 insertions, 11 deletions
diff --git a/t/01basic.t b/t/01basic.t
index 3f1c223..e54447d 100644
--- a/t/01basic.t
+++ b/t/01basic.t
@@ -8,7 +8,7 @@ Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2012-2013 by Toby Inkster.
+This software is copyright (c) 2012-2014, 2019 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 2d4c4cb..cdb7312 100644
--- a/t/02inflation.t
+++ b/t/02inflation.t
@@ -9,7 +9,7 @@ Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2012-2013 by Toby Inkster.
+This software is copyright (c) 2012-2014, 2019 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 e006981..40a3d6d 100644
--- a/t/03invalid_tc.t
+++ b/t/03invalid_tc.t
@@ -2,13 +2,15 @@
Check that we get error messages about unrecognisable type constraints.
+Test skipped on Perl < 5.14 because idek.
+
=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 software is copyright (c) 2012-2014, 2019 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.
@@ -17,21 +19,24 @@ the same terms as the Perl 5 programming language system itself.
use strict;
use warnings;
-
use Test::More;
+use Test::Requires '5.014000';
+use Test::Fatal;
-$@ = undef;
-ok !eval q {
-# line 1 "embedded"
+my $e;
+{
package Foo;
use Moo;
use MooX::late;
- has foo => (is => 'ro', isa => 'X Y Z', required => 0);
- 1;
+ $e = ::exception {
+ has foo => (is => 'ro', isa => 'X Y Z', required => 0);
+ };
};
+diag($e);
+
like(
- $@,
+ $e,
qr{^Unexpected tail on type expression: Y Z},
'error message looks ok',
);
diff --git a/t/04arrayofattrs.t b/t/04arrayofattrs.t
index fc664d6..ce3058e 100644
--- a/t/04arrayofattrs.t
+++ b/t/04arrayofattrs.t
@@ -13,7 +13,7 @@ Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
-This software is copyright (c) 2012-2013 by Toby Inkster.
+This software is copyright (c) 2012-2014, 2019 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.