Commit | Line | Data |
---|---|---|
89d7a4b2 | 1 | #!perl |
2 | use strict; | |
3 | use Test::More tests => 2; | |
4 | use if 'Mouse' ne 'Mo' . 'use', 'Test::More', skip_all => 'Mouse only'; | |
5 | use Mouse::Meta::TypeConstraint; | |
6 | ||
7 | my @args; | |
8 | my $tc = Mouse::Meta::TypeConstraint->new( | |
9 | constraint => sub { | |
10 | is_deeply \@args, \@_; | |
11 | }, | |
12 | ); | |
13 | ||
14 | @args = qw(foo bar baz); | |
15 | $tc->check( @args ); | |
16 | ||
17 | @args = (100, 200); | |
18 | $tc->check( @args ); | |
19 | ||
20 | done_testing; |