[libtype-tiny-perl] 11/11: fix test case for recent Int changes (changes to the text of error messages are explicitly allowed under the stability policy)
Jonas Smedegaard
dr at jones.dk
Wed Oct 29 19:42:48 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to tag 1.001_002
in repository libtype-tiny-perl.
commit 250c8f103816384110e643a3b038b8f469141435
Author: Toby Inkster <mail at tobyinkster.co.uk>
Date: Sat Oct 25 21:18:59 2014 +0100
fix test case for recent Int changes (changes to the text of error messages are explicitly allowed under the stability policy)
---
t/20-unit/Type-Tiny-Intersection/errors.t | 2 +-
t/20-unit/Type-Tiny-Union/errors.t | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/20-unit/Type-Tiny-Intersection/errors.t b/t/20-unit/Type-Tiny-Intersection/errors.t
index ad3676a..159cf73 100644
--- a/t/20-unit/Type-Tiny-Intersection/errors.t
+++ b/t/20-unit/Type-Tiny-Intersection/errors.t
@@ -60,7 +60,7 @@ is_deeply(
[
'"Int&Int" requires that the value pass "Int" and "Int"',
'Value "3.14159" did not pass type constraint "Int"',
- '"Int" is defined as: (defined $_ and $_ =~ /\\A-?[0-9]+\\z/)',
+ '"Int" is defined as: (defined($_) and !ref($_) and $_ =~ /\\A-?[0-9]+\\z/)',
],
) or diag explain($e->explain);
diff --git a/t/20-unit/Type-Tiny-Union/errors.t b/t/20-unit/Type-Tiny-Union/errors.t
index b2bbaf8..77cab14 100644
--- a/t/20-unit/Type-Tiny-Union/errors.t
+++ b/t/20-unit/Type-Tiny-Union/errors.t
@@ -61,7 +61,7 @@ is_deeply(
'"Int|ArrayRef[Int]" requires that the value pass "ArrayRef[Int]" or "Int"',
'Value "3.14159" did not pass type constraint "Int"',
' Value "3.14159" did not pass type constraint "Int"',
- ' "Int" is defined as: (defined $_ and $_ =~ /\\A-?[0-9]+\\z/)',
+ ' "Int" is defined as: (defined($_) and !ref($_) and $_ =~ /\\A-?[0-9]+\\z/)',
'Value "3.14159" did not pass type constraint "ArrayRef[Int]"',
' "ArrayRef[Int]" is a subtype of "ArrayRef"',
' "ArrayRef" is a subtype of "Ref"',
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libtype-tiny-perl.git
More information about the Pkg-perl-cvs-commits
mailing list