Group
Extension

Matches 58

Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/20-modules/Type-Tiny-Enum/basic.t ( view source; MetaCPAN )
s retains order',
);

is_deeply(
	[@{ +FBB }],
	[qw/foo bar baz/],
	'overload retains order',
);

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

use Sca
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/20-modules/Type-Tiny/parameterization.t ( view source; MetaCPAN )
nt->create_child_type()];

is($p1->{uniq}, $p2->{uniq}, "Avoid duplicating parameterized types");
isnt($p1->{uniq}, $p3->{uniq}, "... except when necessary!");

my $p4 = ArrayRef[sub { $_ eq "Bob" }];
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/30-external/Object-Accessor/basic.t ( view source; MetaCPAN )
obj->foo, 12, 'write then read on accessor works');

my $e = exception {
	local $Object::Accessor::FATAL = 1;
	$obj->foo("Hello");
};
isnt($e, undef, 'exception thrown for bad value');

done_testing;
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/30-external/Function-Parameters/basic.t ( view source; MetaCPAN )
arameters qw(:strict);

fun foo ((Int) $x)
{
	return $x;
}

is(
	foo(4),
	4,
	'foo(4) works',
);

isnt(
	exception { foo(4.1) },
	undef,
	'foo(4.1) throws',
);

my $info = Function::Parameters::info(\
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/20-modules/Type-Tiny-Intersection/basic.t ( view source; MetaCPAN )
_inlined");
should_pass(2, $SmallEven);
should_fail(20, $SmallEven);
should_fail(3, $SmallEven);

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

d
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/20-modules/Type-Tiny/inline-assert.t ( view source; MetaCPAN )
undef $inline_assert;
my $e = exception {
	$inline_assert = $type->inline_assert('$VALUE[0]');
};
isnt($e, undef, 'cannot be done!');

note("INLINE ASSERTION, NON-INLINABLE TYPE, WITH TYPEVAR");
note(
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/21-types/NegativeOrZeroInt.t ( view source; MetaCPAN )
oercion");
ok(!NegativeOrZeroInt->is_parameterizable, "NegativeOrZeroInt isn't parameterizable");
isnt(NegativeOrZeroInt->type_default, undef, "NegativeOrZeroInt 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/StringLike.t ( view source; MetaCPAN )
esn't have a coercion");
ok(!StringLike->is_parameterizable, "StringLike isn't parameterizable");
isnt(StringLike->type_default, undef, "StringLike has a type_default");
is(StringLike->type_default->(
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/30-external/Sub-Quote/delayed-quoting.t ( view source; MetaCPAN )
ired for further testing";
	done_testing;
	exit(0);
};

my $coderef3 = $type->_overload_coderef;

isnt($coderef3, $coderef1, 'loading Sub::Quote triggers rebuilding overload coderef');

my $coderef4 =
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/21-types/ScalarRef.t ( view source; MetaCPAN )
Ref doesn't have a coercion");
ok(ScalarRef->is_parameterizable, "ScalarRef is parameterizable");
isnt(ScalarRef->type_default, undef, "ScalarRef has a type_default");
is_deeply(ScalarRef->type_defaul
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/21-types/NumRange.t ( view source; MetaCPAN )
Range doesn't have a coercion");
ok(NumRange->is_parameterizable, "NumRange is parameterizable");
isnt(NumRange->type_default, undef, "NumRange has a type_default");
is(NumRange->type_default->(), 0, 
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/21-types/StrMatch.t ( view source; MetaCPAN )
Match doesn't have a coercion");
ok(StrMatch->is_parameterizable, "StrMatch is parameterizable");
isnt(StrMatch->type_default, undef, "StrMatch has a type_default");
is(StrMatch->type_default->(), '',
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/21-types/Num.t ( view source; MetaCPAN )
rcion, "Num doesn't have a coercion");
ok(!Num->is_parameterizable, "Num isn't parameterizable");
isnt(Num->type_default, undef, "Num has a type_default");
is(Num->type_default->(), 0, "Num type_defau
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/21-types/LaxNum.t ( view source; MetaCPAN )
axNum doesn't have a coercion");
ok(!LaxNum->is_parameterizable, "LaxNum isn't parameterizable");
isnt(LaxNum->type_default, undef, "LaxNum has a type_default");
is(LaxNum->type_default->(), 0, "LaxNu
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/21-types/Any.t ( view source; MetaCPAN )
rcion, "Any doesn't have a coercion");
ok(!Any->is_parameterizable, "Any isn't parameterizable");
isnt(Any->type_default, undef, "Any has a type_default");
is(Any->type_default->(), undef, "Any type_d
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/21-types/ArrayLike.t ( view source; MetaCPAN )
ike doesn't have a coercion");
ok(ArrayLike->is_parameterizable, "ArrayLike is parameterizable");
isnt(ArrayLike->type_default, undef, "ArrayLike has a type_default");
is_deeply(ArrayLike->type_defaul
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/21-types/BoolLike.t ( view source; MetaCPAN )
"BoolLike has no coercion");
ok(!BoolLike->is_parameterizable, "BoolLike isn't parameterizable");
isnt(BoolLike->type_default, undef, "BoolLike has a type_default");
is(BoolLike->type_default->(), !!0
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; MetaCPAN )
Type-Tiny/t/21-types/SingleDigit.t ( view source; MetaCPAN )
n't have a coercion");
ok(!SingleDigit->is_parameterizable, "SingleDigit isn't parameterizable");
isnt(SingleDigit->type_default, undef, "SingleDigit has a type_default");
is(SingleDigit->type_default

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