Changelogging
[gitmo/Mouse.git] / t / 600_todo_tests / 001_erfc.t
1 #!/usr/bin/perl
2 # This is automatically generated by author/import-moose-test.pl.
3 # DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4 use t::lib::MooseCompat;
5
6 # In the case where a child type constraint's parent constraint fails,
7 # the exception should reference the parent type constraint that actually
8 # failed instead of always referencing the child'd type constraint
9
10 use strict;
11 use warnings;
12
13 use Test::More;
14 use Test::Exception;
15
16 BEGIN {
17     use_ok('Mouse::Util::TypeConstraints');
18 }
19
20 lives_ok {
21     subtype 'ParentConstraint' => as 'Str' => where {0};
22 } 'specified parent type constraint';
23
24 my $tc;
25 lives_ok {
26     $tc = subtype 'ChildConstraint' => as 'ParentConstraint' => where {1};
27 } 'specified child type constraint';
28
29 {
30     my $errmsg = $tc->validate();
31
32     TODO: {
33         local $TODO = 'Not yet supported';
34         ok($errmsg !~ /Validation failed for 'ChildConstraint'/, 'exception references failing parent constraint');
35     };
36 }
37
38 done_testing;