Acme-Test
view release on metacpan or search on metacpan
lib/Acme/Test.pm view on Meta::CPAN
package Acme::Test;
use Module::Load;
use Test::More 'no_plan';
use strict;
use vars qw[$VERSION];
$VERSION = 0.03;
my $href = {
CODE => { type => 'subroutine',
post => '()',
tests => [
'passed expected parameters',
'catches faulty input',
'works as expected with no input',
'return value OK',
]
},
SCALAR => { type => 'global scalar',
pre => '$',
tests => [
lib/Acme/Test.pm view on Meta::CPAN
my $status = $priv ? '[Private]' : '[Public]';
#next if $priv && $NO_PRIVATE;
### add sigils and the like ###
my $short = $name;
my $full = "${pkg}::$name";
for my $alias ($short, $full) {
$alias = $href->{$type}->{pre} . $alias
if $href->{$type}->{pre};
$alias .= $href->{$type}->{post} if $href->{$type}->{post};
}
diag("$status Testing $href->{$type}->{type} $full");
for my $test ( @{$href->{$type}->{tests}} ) {
ok( 1, " $short $test" );
}
}
}
}
( run in 2.056 seconds using v1.01-cache-2.11-cpan-5735350b133 )