Group
Extension

Matches 58

Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/21-types/HashLike.t ( view source; MetaCPAN )
hLike doesn't have a coercion");
ok(HashLike->is_parameterizable, "HashLike is parameterizable");
isnt(HashLike->type_default, undef, "HashLike has a type_default");
is_deeply(HashLike->type_default->
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/21-types/Int.t ( view source; MetaCPAN )
rcion, "Int doesn't have a coercion");
ok(!Int->is_parameterizable, "Int isn't parameterizable");
isnt(Int->type_default, undef, "Int has a type_default");
is(Int->type_default->(), 0, "Int type_defau
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/21-types/RegexpRef.t ( view source; MetaCPAN )
doesn't have a coercion");
ok(!RegexpRef->is_parameterizable, "RegexpRef isn't parameterizable");
isnt(RegexpRef->type_default, undef, "RegexpRef has a type_default");
is( '' . RegexpRef->type_default
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/21-types/StrictNum.t ( view source; MetaCPAN )
doesn't have a coercion");
ok(!StrictNum->is_parameterizable, "StrictNum isn't parameterizable");
isnt(StrictNum->type_default, undef, "StrictNum has a type_default");
is(StrictNum->type_default->(), 
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/21-types/IntRange.t ( view source; MetaCPAN )
Range doesn't have a coercion");
ok(IntRange->is_parameterizable, "IntRange is parameterizable");
isnt(IntRange->type_default, undef, "IntRange has a type_default");
is(IntRange->type_default->(), 0, 
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/21-types/CodeRef.t ( view source; MetaCPAN )
Ref doesn't have a coercion");
ok(!CodeRef->is_parameterizable, "CodeRef isn't parameterizable");
isnt(CodeRef->type_default, undef, "CodeRef has a type_default");
is(scalar CodeRef->type_default->()-
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/21-types/Bool.t ( view source; MetaCPAN )
as_coercion, "Bool has a coercion");
ok(!Bool->is_parameterizable, "Bool isn't parameterizable");
isnt(Bool->type_default, undef, "Bool has a type_default");
is(Bool->type_default->(), !!0, "Bool type
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/21-types/PositiveOrZeroNum.t ( view source; MetaCPAN )
oercion");
ok(!PositiveOrZeroNum->is_parameterizable, "PositiveOrZeroNum isn't parameterizable");
isnt(PositiveOrZeroNum->type_default, undef, "PositiveOrZeroNum has a type_default");
is(PositiveOrZer
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/21-types/PositiveOrZeroInt.t ( view source; MetaCPAN )
oercion");
ok(!PositiveOrZeroInt->is_parameterizable, "PositiveOrZeroInt isn't parameterizable");
isnt(PositiveOrZeroInt->type_default, undef, "PositiveOrZeroInt has a type_default");
is(PositiveOrZer
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/21-types/Str.t ( view source; MetaCPAN )
rcion, "Str doesn't have a coercion");
ok(!Str->is_parameterizable, "Str isn't parameterizable");
isnt(Str->type_default, undef, "Str has a type_default");
is(Str->type_default->(), '', "Str type_defa
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/21-types/Undef.t ( view source; MetaCPAN )
 "Undef doesn't have a coercion");
ok(!Undef->is_parameterizable, "Undef isn't parameterizable");
isnt(Undef->type_default, undef, "Undef has a type_default");
is(Undef->type_default->(), undef, "Unde
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/21-types/NegativeOrZeroNum.t ( view source; MetaCPAN )
oercion");
ok(!NegativeOrZeroNum->is_parameterizable, "NegativeOrZeroNum isn't parameterizable");
isnt(NegativeOrZeroNum->type_default, undef, "NegativeOrZeroNum has a type_default");
is(NegativeOrZer
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/21-types/SimpleStr.t ( view source; MetaCPAN )
doesn't have a coercion");
ok(!SimpleStr->is_parameterizable, "SimpleStr isn't parameterizable");
isnt(SimpleStr->type_default, undef, "SimpleStr has a type_default");
is(SimpleStr->type_default->(), 
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/21-types/OptList.t ( view source; MetaCPAN )
ist doesn't have a coercion");
ok(!OptList->is_parameterizable, "OptList isn't parameterizable");
isnt(OptList->type_default, undef, "OptList has a type_default");
is_deeply(OptList->type_default->(),
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/30-external/Kavorka/basic.t ( view source; MetaCPAN )
 type constraints should pass or coerce',
		);
	},
	undef,
	'... neither raise an exception',
);

isnt(
	exception { xyz(2.1,3,4) },
	undef,
	'failed type constraint with no coercion raises an excepti
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/21-types/StrLength.t ( view source; MetaCPAN )
gth doesn't have a coercion");
ok(StrLength->is_parameterizable, "StrLength is parameterizable");
isnt(StrLength->type_default, undef, "StrLength has a type_default");
is(StrLength->type_default->(), 
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/20-modules/Type-Library/declared-types.t ( view source; MetaCPAN )
et_coderef->() );
should_fail( { foo => 1, bar => { quux => 2.1 } }, MyTypes->get_coderef->() );

isnt( MyTypes->get_coderef, \&MyTypes::MyHashRef, 'coderef got redefined' );

note( MyTypes->get_tmp->
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/20-modules/Type-Tiny-Union/basic.t ( view source; MetaCPAN )
=> "Local::A" }),
	class_type({ class => "Local::B" }),
	class_type({ class => "Local::C" }),
];

isnt(
	exception { push @{ $c2 }, 'quux' },
	undef,
	'cannot push to overloaded arrayref'
);

ok(
	$c2
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/20-modules/Type-Params/v2-positional-plus-slurpy.t ( view source; MetaCPAN )
IN'  );
is( $out, 'OUT' );
is_deeply( $slurpy, [ 'FOO', 'BAR' ] );

my $sig2;
my $e = exception {
	$sig2 = signature pos => [ Int, { slurpy => 1 } ];
	$sig2->( 42 );
};
isnt $e, undef;

done_testing;
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/20-modules/Type-Params/coerce.t ( view source; MetaCPAN )
($arr)]->[0] ),
	refaddr($arr),
	'if value passes type constraint; no need to clone arrayref'
);

isnt(
	refaddr( [$chk2->($arr2)]->[0] ),
	refaddr($arr2),
	'if value fails type constraint; need to cl

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.