From: Karen Etheridge Date: Mon, 31 Mar 2014 16:43:07 +0000 (-0700) Subject: gotta have a plan X-Git-Tag: v0.006016~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b52072dc659832e3465ecb4801024bc7c05ddad7;p=p5sagit%2FDevel-Declare.git gotta have a plan --- diff --git a/t/build_sub_installer.t b/t/build_sub_installer.t index 8a73730..c5e8d92 100644 --- a/t/build_sub_installer.t +++ b/t/build_sub_installer.t @@ -1,6 +1,6 @@ use strict; use warnings; -use Test::More 'no_plan'; +use Test::More; use Devel::Declare (); @@ -18,3 +18,5 @@ my $args; } is($args, 'woot', 'sub installer worked'); + +done_testing; diff --git a/t/combi.t b/t/combi.t index facda8f..2a45094 100644 --- a/t/combi.t +++ b/t/combi.t @@ -1,6 +1,6 @@ use strict; use warnings; -use Test::More 'no_plan'; +use Test::More; sub method :lvalue {my $sv;} @@ -29,3 +29,5 @@ method wahey () { }; ok(1, "Survived compilation"); + +done_testing; diff --git a/t/ctx-simple.t b/t/ctx-simple.t index 7b1b888..02bf1d7 100644 --- a/t/ctx-simple.t +++ b/t/ctx-simple.t @@ -131,7 +131,7 @@ my ($test_method1, $test_method2, @test_list); } -use Test::More 'no_plan'; +use Test::More; my $o = DeclareTest->new(attr => "value"); @@ -171,3 +171,4 @@ 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; diff --git a/t/eval.t b/t/eval.t index 13b2d72..36cbba0 100644 --- a/t/eval.t +++ b/t/eval.t @@ -1,6 +1,6 @@ use strict; use warnings; -use Test::More 'no_plan'; +use Test::More; sub method { my ($usepack, $name, $inpack, $sub) = @_; @@ -22,4 +22,4 @@ diag $@ if $@; is( __PACKAGE__->bar, 42 ); - +done_testing; diff --git a/t/fail.t b/t/fail.t index da59924..bb51978 100644 --- a/t/fail.t +++ b/t/fail.t @@ -1,6 +1,6 @@ use strict; use warnings; -use Test::More 'no_plan'; +use Test::More; use Devel::Declare::MethodInstaller::Simple; BEGIN { @@ -29,3 +29,5 @@ TODO: { eval 'method møø() { return "foo" }'; like($@, qr/Illegal\sdeclaration\sof\ssubroutine\smain\:\:m/, 'with unicode'); }; + +done_testing; diff --git a/t/methinstaller-simple.t b/t/methinstaller-simple.t index 6e082e0..3f8d33e 100644 --- a/t/methinstaller-simple.t +++ b/t/methinstaller-simple.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w use strict; -use Test::More 'no_plan'; +use Test::More; my $Have_Devel_BeginLift; BEGIN { @@ -124,3 +124,4 @@ 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; diff --git a/t/method-no-semi.t b/t/method-no-semi.t index 86eda8e..d64fdbf 100644 --- a/t/method-no-semi.t +++ b/t/method-no-semi.t @@ -154,7 +154,7 @@ my ($test_method1, $test_method2, @test_list); } -use Test::More 'no_plan'; +use Test::More; my $o = DeclareTest->new(attr => "value"); @@ -177,3 +177,5 @@ is($o->$test_method1('no', 'yes'), 'value, yes', 'anon method with @_ ok'); 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; diff --git a/t/method.t b/t/method.t index 7335635..94868c5 100644 --- a/t/method.t +++ b/t/method.t @@ -138,7 +138,7 @@ my ($test_method1, $test_method2, @test_list); } -use Test::More 'no_plan'; +use Test::More; my $o = DeclareTest->new(attr => "value"); @@ -161,3 +161,5 @@ is($o->$test_method1('no', 'yes'), 'value, yes', 'anon method with @_ ok'); 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; diff --git a/t/new.t b/t/new.t index dc1d6ed..a978e4d 100644 --- a/t/new.t +++ b/t/new.t @@ -1,5 +1,5 @@ use Devel::Declare (); -use Test::More qw(no_plan); +use Test::More; { package FoomHandlers; @@ -101,3 +101,5 @@ use Test::More qw(no_plan); ::is(foom KABOOM (zoom), "happy foom: KABOOM; zoom", "foom KABOOM (zoom)"); } + +done_testing; diff --git a/t/pack.t b/t/pack.t index c4711d4..d69e089 100644 --- a/t/pack.t +++ b/t/pack.t @@ -1,6 +1,6 @@ use strict; use warnings; -use Test::More 'no_plan'; +use Test::More; sub class { $_[0]->(); } @@ -20,3 +20,5 @@ class Foo::Bar { is($packname, 'Foo::Bar', 'Package saved ok'); is(__PACKAGE__, 'main', 'Package scoped correctly'); + +done_testing; diff --git a/t/padstuff.t b/t/padstuff.t index 129a1b7..85f8f52 100644 --- a/t/padstuff.t +++ b/t/padstuff.t @@ -1,6 +1,6 @@ use strict; use warnings; -use Test::More 'no_plan'; +use Test::More; sub action (&) { return shift; } @@ -20,3 +20,5 @@ my $a = action { $a->("SELF", "CONTEXT"); is($args, "SELF, CONTEXT", "args passed ok"); + +done_testing; diff --git a/t/proto.t b/t/proto.t index ab08455..bf13c92 100644 --- a/t/proto.t +++ b/t/proto.t @@ -1,6 +1,6 @@ use strict; use warnings; -use Test::More 'no_plan'; +use Test::More; sub fun :lvalue { return my $sv; } @@ -24,3 +24,5 @@ my $foo = fun ($a, $b) { "woot" }; is($foo->(), '$a, $b: woot', 'proto declarator ok'); is(X(), 'what?', 'X sub restored ok'); + +done_testing; diff --git a/t/simple.t b/t/simple.t index edc09d3..0a44fe8 100644 --- a/t/simple.t +++ b/t/simple.t @@ -1,6 +1,6 @@ use strict; use warnings; -use Test::More 'no_plan'; +use Test::More; sub method { my ($usepack, $name, $inpack, $sub) = @_; @@ -34,3 +34,4 @@ __PACKAGE__->baz(qw(3 4)); is($args1, 'main, 1, 2', 'Method bar args ok'); is($args2, 'main, 3, 4', 'Method baz args ok'); +done_testing; diff --git a/t/statement.t b/t/statement.t index 9116dbb..06e335b 100644 --- a/t/statement.t +++ b/t/statement.t @@ -1,5 +1,5 @@ use Devel::Declare (); -use Test::More qw(no_plan); +use Test::More; { package FoomHandlers; @@ -110,3 +110,5 @@ use Test::More qw(no_plan); ::ok(1, 'Compiled as statement ok'); } + +done_testing; diff --git a/t/sugar.t b/t/sugar.t index a582e4b..fd547ee 100644 --- a/t/sugar.t +++ b/t/sugar.t @@ -64,7 +64,7 @@ my ($test_method1, $test_method2, @test_list); } -use Test::More 'no_plan'; +use Test::More; my $o = DeclareTest->new(attr => "value"); @@ -87,3 +87,5 @@ is($o->$test_method1('no', 'yes'), 'value, yes', 'anon method with @_ ok'); is($o->$test_method2('this'), 'DeclareTest2, this', 'anon method with proto ok'); #warn map { $_->() } @test_list; + +done_testing;