update the tests to strictures 2. ran ack to check this time. FFS.
[p5sagit/Package-Variant.git] / t / 10argument-types.t
CommitLineData
d4b2facb 1use strictures 2;
2bf4fbb4 2use Test::More;
3
4BEGIN {
5 package TestVariable;
6 use Package::Variant;
7 sub make_variant {
8 my ($class, $target, @args) = @_;
9 install variant_values => sub { [@args] };
10 }
11 $INC{'TestVariable.pm'} = __FILE__;
12}
13
14use TestVariable;
15
16is_deeply TestVariable(23)->variant_values, [23],
17 'simple value argument';
18is_deeply TestVariable(3..7)->variant_values, [3..7],
19 'multiple value arguments';
20is_deeply TestVariable({ foo => 23 })->variant_values, [{ foo => 23 }],
21 'hash reference argument';
22
23done_testing;