Revert autogenerated tests. Tests should not changed radically.
[gitmo/Mouse.git] / t / 040_type_constraints / failing / 018_custom_parameterized_types.t
@@ -1,18 +1,14 @@
 #!/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;
-$TODO = q{Mouse is not yet completed};
+use Test::More tests => 28;
 use Test::Exception;
 
 BEGIN {
     use_ok("Mouse::Util::TypeConstraints");
-    use_ok('Mouse::Meta::TypeConstraint');
+    use_ok('Mouse::Meta::TypeConstraint::Parameterized');
 }
 
 lives_ok {
@@ -62,8 +58,8 @@ ok(!$hoi->check({ one1 => 'un', two2 => 'deux' }), '... validated it correctly')
 ok( $hoi->equals($hoi), "equals to self" );
 ok( !$hoi->equals($hoi->parent), "equals to self" );
 ok( !$hoi->equals(find_type_constraint('AlphaKeyHash')), "not equal to unparametrized self" );
-ok( $hoi->equals( Mouse::Meta::TypeConstraint->new( name => "Blah", parent => find_type_constraint("AlphaKeyHash"), type_parameter => find_type_constraint("Int") ) ), "equal to clone" );
-ok( !$hoi->equals( Mouse::Meta::TypeConstraint->new( name => "Oink", parent => find_type_constraint("AlphaKeyHash"), type_parameter => find_type_constraint("Str") ) ), "not equal to different parameter" );
+ok( $hoi->equals( Mouse::Meta::TypeConstraint::Parameterized->new( name => "Blah", parent => find_type_constraint("AlphaKeyHash"), type_parameter => find_type_constraint("Int") ) ), "equal to clone" );
+ok( !$hoi->equals( Mouse::Meta::TypeConstraint::Parameterized->new( name => "Oink", parent => find_type_constraint("AlphaKeyHash"), type_parameter => find_type_constraint("Str") ) ), "not equal to different parameter" );
 
 my $th = Mouse::Util::TypeConstraints::find_or_parse_type_constraint('Trihash[Bool]');
 
@@ -73,7 +69,7 @@ ok(!$th->check({ one => 1, two => 2, three => 1 }), '... validated it correctly'
 ok(!$th->check({foo1 => 1, bar2 => 0, baz3 => 1}), '... validated it correctly');
 
 dies_ok {
-    Mouse::Meta::TypeConstraint->new(
+    Mouse::Meta::TypeConstraint::Parameterized->new(
         name           => 'Str[Int]',
         parent         => find_type_constraint('Str'),
         type_parameter => find_type_constraint('Int'),
@@ -81,11 +77,10 @@ dies_ok {
 } 'non-containers cannot be parameterized';
 
 dies_ok {
-    Mouse::Meta::TypeConstraint->new(
+    Mouse::Meta::TypeConstraint::Parameterized->new(
         name           => 'Noncon[Int]',
         parent         => find_type_constraint('Noncon'),
         type_parameter => find_type_constraint('Int'),
     );
 } 'non-containers cannot be parameterized';
 
-done_testing;