#!/usr/bin/perl
+# This is automatically generated by author/import-moose-test.pl.
+# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
+use t::lib::MooseCompat;
use strict;
use warnings;
-use Test::More tests => 33;
+use Test::More;
+$TODO = q{Mouse is not yet completed};
use Test::Exception;
BEGIN {
use_ok('Mouse::Util::TypeConstraints');
- use_ok('Mouse::Meta::TypeConstraint::Parameterized');
+ use_ok('Mouse::Meta::TypeConstraint');
}
my $r = Mouse::Util::TypeConstraints->get_type_constraint_registry;
# Array of Ints or Strings
my $array_of_ints_or_strings = Mouse::Util::TypeConstraints::create_parameterized_type_constraint('ArrayRef[Int|Str]');
-isa_ok($array_of_ints_or_strings, 'Mouse::Meta::TypeConstraint::Parameterized');
+isa_ok($array_of_ints_or_strings, 'Mouse::Meta::TypeConstraint');
ok($array_of_ints_or_strings->check([ 1, 'two', 3 ]), '... this passed the type check');
ok($array_of_ints_or_strings->check([ 1, 2, 3 ]), '... this passed the type check');
# Array of Ints or HashRef
my $array_of_ints_or_hash_ref = Mouse::Util::TypeConstraints::create_parameterized_type_constraint('ArrayRef[Int | HashRef]');
-isa_ok($array_of_ints_or_hash_ref, 'Mouse::Meta::TypeConstraint::Parameterized');
+isa_ok($array_of_ints_or_hash_ref, 'Mouse::Meta::TypeConstraint');
ok($array_of_ints_or_hash_ref->check([ 1, {}, 3 ]), '... this passed the type check');
ok($array_of_ints_or_hash_ref->check([ 1, 2, 3 ]), '... this passed the type check');
# we have, so we have to do it by hand - SL
my $pure_insanity = Mouse::Util::TypeConstraints::create_type_constraint_union('ArrayRef[Int|Str] | ArrayRef[Int | HashRef]');
-isa_ok($pure_insanity, 'Mouse::Meta::TypeConstraint::Union');
+isa_ok($pure_insanity, 'Mouse::Meta::TypeConstraint');
ok($pure_insanity->check([ 1, {}, 3 ]), '... this passed the type check');
ok($pure_insanity->check([ 1, 'Str', 3 ]), '... this passed the type check');
# Array of Ints
my $array_of_ints = Mouse::Util::TypeConstraints::create_parameterized_type_constraint('ArrayRef[Int]');
-isa_ok($array_of_ints, 'Mouse::Meta::TypeConstraint::Parameterized');
+isa_ok($array_of_ints, 'Mouse::Meta::TypeConstraint');
isa_ok($array_of_ints, 'Mouse::Meta::TypeConstraint');
ok($array_of_ints->check([ 1, 2, 3, 4 ]), '... [ 1, 2, 3, 4 ] passed successfully');
# Array of Array of Ints
my $array_of_array_of_ints = Mouse::Util::TypeConstraints::create_parameterized_type_constraint('ArrayRef[ArrayRef[Int]]');
-isa_ok($array_of_array_of_ints, 'Mouse::Meta::TypeConstraint::Parameterized');
+isa_ok($array_of_array_of_ints, 'Mouse::Meta::TypeConstraint');
isa_ok($array_of_array_of_ints, 'Mouse::Meta::TypeConstraint');
ok($array_of_array_of_ints->check(
# Array of Array of Array of Ints
my $array_of_array_of_array_of_ints = Mouse::Util::TypeConstraints::create_parameterized_type_constraint('ArrayRef[ArrayRef[ArrayRef[Int]]]');
-isa_ok($array_of_array_of_array_of_ints, 'Mouse::Meta::TypeConstraint::Parameterized');
+isa_ok($array_of_array_of_array_of_ints, 'Mouse::Meta::TypeConstraint');
isa_ok($array_of_array_of_array_of_ints, 'Mouse::Meta::TypeConstraint');
ok($array_of_array_of_array_of_ints->check(
[[[ 1, 2, 3 ]], [[ qw/foo bar/ ]]]
), '... [[[ 1, 2, 3 ]], [[ qw/foo bar/ ]]] failed successfully');
-
-
+done_testing;