CPAN-Changes-Group-Dependencies-Stats
view release on metacpan or search on metacpan
use strict;
use warnings;
use Test::More tests => 4;
# ABSTRACT: Things that fail
use CPAN::Changes::Group::Dependencies::Stats;
sub is_fail($$) {
my ( $reason, $code ) = @_;
local $@;
my $failed = 1;
eval {
$code->();
undef $failed;
};
if ($failed) {
@_ = 'died:' . $reason;
note explain $@;
goto \&pass;
}
else {
@_ = 'die expected:' . $reason;
goto \&fail;
}
}
sub isnt_fail($$) {
my ( $reason, $code ) = @_;
local $@;
my $failed = 1;
eval {
$code->();
undef $failed;
};
if ( not $failed ) {
@_ = 'lived:' . $reason;
goto \&pass;
( run in 0.504 second using v1.01-cache-2.11-cpan-65fba6d93b7 )