[ 'IntArrayRef', 12, [12], {}, [17, 23], {} ],
);
-plan tests => (@tests * 8) + 5;
-
# new array ref so we can safely shift from it
for my $data (map { [@$_] } @tests) {
my $type = shift @$data;
}
# coercion handler export
- {
+ {
my ($coerce, $coercion_result, $cannot_coerce) = map { shift @$data } 1 .. 3;
ok my $code = __PACKAGE__->can("to_$type"), "to_$type() coercion was exported";
is_deeply scalar $code->($coerce), $coercion_result, "to_$type() coercion works";
eval { require TestNamespaceSep };
ok $@, q(trying to declare a type with '::' in it croaks);
like $@, qr/Foo::Bar/, q(error message contains type name);
+
+done_testing;