use strict;
use warnings;
-use Test::More tests => 22;
+use Test::More tests => 17;
use Test::Exception;
use Scalar::Util ();
is(Num(5), 5, '... this is a Num');
ok(!defined(Num('Foo')), '... this is not a Num');
-is(&Num, &Num, '... the type w/out arguments just returns itself');
-is(Num(), Num(), '... the type w/out arguments just returns itself');
-
is(String('Foo'), 'Foo', '... this is a Str');
ok(!defined(String(5)), '... this is not a Str');
-is(&String, &String, '... the type w/out arguments just returns itself');
-
is(Natural(5), 5, '... this is a Natural');
is(Natural(-5), undef, '... this is not a Natural');
is(Natural('Foo'), undef, '... this is not a Natural');
-is(&Natural, &Natural, '... the type w/out arguments just returns itself');
-
is(NaturalLessThanTen(5), 5, '... this is a NaturalLessThanTen');
is(NaturalLessThanTen(12), undef, '... this is not a NaturalLessThanTen');
is(NaturalLessThanTen(-5), undef, '... this is not a NaturalLessThanTen');
is(NaturalLessThanTen('Foo'), undef, '... this is not a NaturalLessThanTen');
-
-is(&NaturalLessThanTen, &NaturalLessThanTen,
- '... the type w/out arguments just returns itself');
# anon sub-typing