Revert autogenerated tests. Tests should not changed radically.
[gitmo/Mouse.git] / t / 040_type_constraints / failing / 021_maybe_type_constraint.t
@@ -1,27 +1,23 @@
 #!/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 => 36;
 use Test::Exception;
 
 use Mouse::Util::TypeConstraints;
 
 my $type = Mouse::Util::TypeConstraints::find_or_parse_type_constraint('Maybe[Int]');
 isa_ok($type, 'Mouse::Meta::TypeConstraint');
-isa_ok($type, 'Mouse::Meta::TypeConstraint');
+isa_ok($type, 'Mouse::Meta::TypeConstraint::Parameterized');
 
 ok( $type->equals($type), "equals self" );
 ok( !$type->equals($type->parent), "not equal to parent" );
 ok( !$type->equals(find_type_constraint("Maybe")), "not equal to Maybe" );
 ok( $type->parent->equals(find_type_constraint("Maybe")), "parent is Maybe" );
-ok( $type->equals( Mouse::Meta::TypeConstraint->new( name => "__ANON__", parent => find_type_constraint("Maybe"), type_parameter => find_type_constraint("Int") ) ), "equal to clone" );
-ok( !$type->equals( Mouse::Meta::TypeConstraint->new( name => "__ANON__", parent => find_type_constraint("Maybe"), type_parameter => find_type_constraint("Str") ) ), "not equal to clone with diff param" );
+ok( $type->equals( Mouse::Meta::TypeConstraint::Parameterized->new( name => "__ANON__", parent => find_type_constraint("Maybe"), type_parameter => find_type_constraint("Int") ) ), "equal to clone" );
+ok( !$type->equals( Mouse::Meta::TypeConstraint::Parameterized->new( name => "__ANON__", parent => find_type_constraint("Maybe"), type_parameter => find_type_constraint("Str") ) ), "not equal to clone with diff param" );
 ok( !$type->equals( Mouse::Util::TypeConstraints::find_or_parse_type_constraint('Maybe[Str]') ), "not equal to declarative version of diff param" );
 
 ok($type->check(10), '... checked type correctly (pass)');
@@ -80,7 +76,7 @@ dies_ok {
 
 
 {
-    package Test::MooseX::Types::Maybe;
+    package Test::MouseX::Types::Maybe;
     use Mouse;
 
     has 'Maybe_Int' => (is=>'rw', isa=>'Maybe[Int]');
@@ -90,7 +86,7 @@ dies_ok {
     has 'Maybe_HashRefInt' => (is=>'rw', isa=>'Maybe[HashRef[Int]]');
 }
 
-ok my $obj = Test::MooseX::Types::Maybe->new
+ok my $obj = Test::MouseX::Types::Maybe->new
  => 'Create good test object';
 
 ##  Maybe[Int]
@@ -135,5 +131,3 @@ ok !$Maybe_Int->check("a")
 throws_ok sub { $obj->Maybe_Int("a") },
  qr/Attribute \(Maybe_Int\) does not pass the type constraint/
  => 'failed assigned ("a")';
-
-done_testing;