use strict;
use warnings;
-use Test::More 'no_plan';
+use Test::More;
use Devel::Declare ();
}
is($args, 'woot', 'sub installer worked');
+
+done_testing;
use strict;
use warnings;
-use Test::More 'no_plan';
+use Test::More;
sub method :lvalue {my $sv;}
};
ok(1, "Survived compilation");
+
+done_testing;
}
-use Test::More 'no_plan';
+use Test::More;
my $o = DeclareTest->new(attr => "value");
is_deeply([ map { $_->() } @test_list ], [ 1, 2, 3, 4], 'binding ok');
+done_testing;
use strict;
use warnings;
-use Test::More 'no_plan';
+use Test::More;
sub method {
my ($usepack, $name, $inpack, $sub) = @_;
is( __PACKAGE__->bar, 42 );
-
+done_testing;
use strict;
use warnings;
-use Test::More 'no_plan';
+use Test::More;
use Devel::Declare::MethodInstaller::Simple;
BEGIN {
eval 'method møø() { return "foo" }';
like($@, qr/Illegal\sdeclaration\sof\ssubroutine\smain\:\:m/, 'with unicode');
};
+
+done_testing;
#!/usr/bin/perl -w
use strict;
-use Test::More 'no_plan';
+use Test::More;
my $Have_Devel_BeginLift;
BEGIN {
is_deeply([ map { $_->() } @test_list ], [ 1, 2, 3, 4], 'binding ok');
+done_testing;
}
-use Test::More 'no_plan';
+use Test::More;
my $o = DeclareTest->new(attr => "value");
is($o->$test_method2('this'), 'DeclareTest2, this', 'anon method with proto ok');
is_deeply([ map { $_->() } @test_list ], [ 1, 2, 3, 4], 'binding ok');
+
+done_testing;
}
-use Test::More 'no_plan';
+use Test::More;
my $o = DeclareTest->new(attr => "value");
is($o->$test_method2('this'), 'DeclareTest2, this', 'anon method with proto ok');
is_deeply([ map { $_->() } @test_list ], [ 1, 2, 3, 4], 'binding ok');
+
+done_testing;
use Devel::Declare ();
-use Test::More qw(no_plan);
+use Test::More;
{
package FoomHandlers;
::is(foom KABOOM (zoom), "happy foom: KABOOM; zoom", "foom KABOOM (zoom)");
}
+
+done_testing;
use strict;
use warnings;
-use Test::More 'no_plan';
+use Test::More;
sub class { $_[0]->(); }
is($packname, 'Foo::Bar', 'Package saved ok');
is(__PACKAGE__, 'main', 'Package scoped correctly');
+
+done_testing;
use strict;
use warnings;
-use Test::More 'no_plan';
+use Test::More;
sub action (&) { return shift; }
$a->("SELF", "CONTEXT");
is($args, "SELF, CONTEXT", "args passed ok");
+
+done_testing;
use strict;
use warnings;
-use Test::More 'no_plan';
+use Test::More;
sub fun :lvalue { return my $sv; }
is($foo->(), '$a, $b: woot', 'proto declarator ok');
is(X(), 'what?', 'X sub restored ok');
+
+done_testing;
use strict;
use warnings;
-use Test::More 'no_plan';
+use Test::More;
sub method {
my ($usepack, $name, $inpack, $sub) = @_;
is($args1, 'main, 1, 2', 'Method bar args ok');
is($args2, 'main, 3, 4', 'Method baz args ok');
+done_testing;
use Devel::Declare ();
-use Test::More qw(no_plan);
+use Test::More;
{
package FoomHandlers;
::ok(1, 'Compiled as statement ok');
}
+
+done_testing;
}
-use Test::More 'no_plan';
+use Test::More;
my $o = DeclareTest->new(attr => "value");
is($o->$test_method2('this'), 'DeclareTest2, this', 'anon method with proto ok');
#warn map { $_->() } @test_list;
+
+done_testing;