Perlito5
view release on metacpan or search on metacpan
lib/Perlito5X/Test2/Tools/Tiny.pm view on Meta::CPAN
use Test2::Hub::Interceptor::Terminator();
our $VERSION = '1.302073';
BEGIN { require Exporter; our @ISA = qw(Exporter) }
our @EXPORT = qw{
ok is isnt like unlike is_deeply diag note skip_all todo plan done_testing
warnings exception tests capture
};
sub ok($;$@) {
my ($bool, $name, @diag) = @_;
my $ctx = context();
$ctx->ok($bool, $name, \@diag);
$ctx->release;
return $bool ? 1 : 0;
}
sub is($$;$@) {
my ($got, $want, $name, @diag) = @_;
my $ctx = context();
my $bool;
if (defined($got) && defined($want)) {
$bool = "$got" eq "$want";
}
elsif (defined($got) xor defined($want)) {
$bool = 0;
}
( run in 1.546 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )