+{
+ my $tc = eval {
+ LaTeX::TikZ::Meta::TypeConstraint::Autocoerce->new(
+ target => undef,
+ );
+ };
+ like $@, qr/^No meta object for undefined target/, 'Undef target';
+}
+
+{
+ my $target = 'LaTeX::TikZ::A::Class::Likely::Not::To::Exist';
+ my $tc = eval {
+ LaTeX::TikZ::Meta::TypeConstraint::Autocoerce->new(
+ target => $target,
+ );
+ };
+ like $@, qr/^No meta object for target \Q$target\E/, 'Nonexistent target';
+}
+
+{
+ my $tc = eval {
+ LaTeX::TikZ::Meta::TypeConstraint::Autocoerce->new(
+ target => 'LaTeX::TikZ::Meta::TypeConstraint::Autocoerce',
+ );
+ };
+ is $@, '', 'Valid target';
+}
+