From: Yuval Kogman Date: Sat, 12 Apr 2008 15:01:21 +0000 (+0000) Subject: add a test for the 'class' attribute of TC::Class X-Git-Tag: 0_55~233 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8eb4d82b63a30188d9fe9258a98a86767f6b57ea;p=gitmo%2FMoose.git add a test for the 'class' attribute of TC::Class --- diff --git a/t/040_type_constraints/020_class_type_constraint.t b/t/040_type_constraints/020_class_type_constraint.t index 7fe4b7b..b9f98c4 100644 --- a/t/040_type_constraints/020_class_type_constraint.t +++ b/t/040_type_constraints/020_class_type_constraint.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 12; +use Test::More tests => 13; use Test::Exception; BEGIN { @@ -30,6 +30,8 @@ lives_ok { class_type('Boop', message { "${_} is not a Boop" }) } my $type = find_type_constraint("Foo"); +is( $type->class, "Foo", "class attribute" ); + ok( $type->is_subtype_of("Gorch"), "subtype of gorch" ); ok( $type->is_subtype_of("Bar"), "subtype of bar" );