[ 'Str', 'Str', 12, "12", [], "foo", [777] ],
);
-plan tests => (@tests * 9);
-
# 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";
}
}
-
+done_testing;