From: Florian Ragwitz Date: Fri, 11 Dec 2009 21:36:18 +0000 (+0100) Subject: Convert all tests to done_testing. X-Git-Tag: 0.93_01~37 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a28e50e44945358d15eb19e4688573741a319fe0;hp=1b806c9945d6c57dca3805ae7924571df08aec03;p=gitmo%2FMoose.git Convert all tests to done_testing. --- diff --git a/t/000_load.t b/t/000_load.t index 697464c..38e83d5 100644 --- a/t/000_load.t +++ b/t/000_load.t @@ -3,12 +3,14 @@ use strict; use warnings; -use Test::More tests => 1; +use Test::More; -package Foo; - -# Moose will issue a warning if we try to load it from the main -# package. -::use_ok('Moose'); +{ + package Foo; + # Moose will issue a warning if we try to load it from the main + # package. + ::use_ok('Moose'); +} +done_testing; diff --git a/t/000_recipes/basics-recipe10.t b/t/000_recipes/basics-recipe10.t index c9f34eb..bacc899 100644 --- a/t/000_recipes/basics-recipe10.t +++ b/t/000_recipes/basics-recipe10.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 10; +use Test::More; { @@ -218,3 +218,4 @@ foreach my $set (@$parent_sets) { # AUTHOR: Aran Clary Deltac +done_testing; diff --git a/t/010_basics/001_basic_class_setup.t b/t/010_basics/001_basic_class_setup.t index 7d5aaf7..b8130f9 100644 --- a/t/010_basics/001_basic_class_setup.t +++ b/t/010_basics/001_basic_class_setup.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 29; +use Test::More; use Test::Exception; - { package Foo; use Moose; @@ -49,3 +48,5 @@ foreach my $import (qw( local $TODO = $import eq 'blessed' ? "no automatic namespace cleaning yet" : undef; ok(!Foo->can($import), "no namespace pollution in Moose::Object ($import)" ); } + +done_testing; diff --git a/t/010_basics/002_require_superclasses.t b/t/010_basics/002_require_superclasses.t index 1d311a5..9757c35 100644 --- a/t/010_basics/002_require_superclasses.t +++ b/t/010_basics/002_require_superclasses.t @@ -5,11 +5,10 @@ use warnings; use lib 't/lib', 'lib'; -use Test::More tests => 4; +use Test::More; use Test::Exception; - { package Bar; @@ -45,3 +44,4 @@ use Test::Exception; 'correct error when superclass could not be found'; } +done_testing; diff --git a/t/010_basics/003_super_and_override.t b/t/010_basics/003_super_and_override.t index 9484082..7ea63ea 100644 --- a/t/010_basics/003_super_and_override.t +++ b/t/010_basics/003_super_and_override.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 16; +use Test::More; use Test::Exception; - { package Foo; use Moose; @@ -79,3 +78,4 @@ is($foo->baz(), 'Foo::baz', '... got the right value from &baz'); } +done_testing; diff --git a/t/010_basics/004_inner_and_augment.t b/t/010_basics/004_inner_and_augment.t index 4957d26..eecd547 100644 --- a/t/010_basics/004_inner_and_augment.t +++ b/t/010_basics/004_inner_and_augment.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 16; +use Test::More; use Test::Exception; - { package Foo; use Moose; @@ -84,3 +83,4 @@ is($foo->baz(), 'Foo::baz()', '... got the right value from &baz'); } +done_testing; diff --git a/t/010_basics/005_override_augment_inner_super.t b/t/010_basics/005_override_augment_inner_super.t index 295601e..2586d57 100644 --- a/t/010_basics/005_override_augment_inner_super.t +++ b/t/010_basics/005_override_augment_inner_super.t @@ -3,8 +3,7 @@ use strict; use warnings; -use Test::More tests => 5; - +use Test::More; { @@ -68,3 +67,5 @@ Confusing I know, but it is correct :) is($baz->bar, 'Bar::bar -> Foo::bar(Baz::bar)', '... got the right value from mixed augment/override bar'); + +done_testing; diff --git a/t/010_basics/006_override_and_foreign_classes.t b/t/010_basics/006_override_and_foreign_classes.t index 28907aa..05761c9 100644 --- a/t/010_basics/006_override_and_foreign_classes.t +++ b/t/010_basics/006_override_and_foreign_classes.t @@ -3,8 +3,7 @@ use strict; use warnings; -use Test::More tests => 15; - +use Test::More; =pod @@ -70,4 +69,6 @@ isa_ok($foo, 'Foo'); is($foo->foo(), 'Foo::foo', '... got the right value from &foo'); is($foo->bar(), 'Foo::bar', '... got the right value from &bar'); -is($foo->baz(), 'Foo::baz', '... got the right value from &baz'); \ No newline at end of file +is($foo->baz(), 'Foo::baz', '... got the right value from &baz'); + +done_testing; diff --git a/t/010_basics/007_always_strict_warnings.t b/t/010_basics/007_always_strict_warnings.t index 8112ed4..a10d94a 100644 --- a/t/010_basics/007_always_strict_warnings.t +++ b/t/010_basics/007_always_strict_warnings.t @@ -1,6 +1,6 @@ #!/usr/bin/perl -use Test::More tests => 15; +use Test::More; # for classes ... { @@ -67,3 +67,5 @@ use Test::More tests => 15; ::like($warn, qr/Argument \"hello\" isn\'t numeric in addition \(\+\)/, '.. and it is the right warning'); } } + +done_testing; diff --git a/t/010_basics/008_wrapped_method_cxt_propagation.t b/t/010_basics/008_wrapped_method_cxt_propagation.t index 3147e4e..ff8034a 100644 --- a/t/010_basics/008_wrapped_method_cxt_propagation.t +++ b/t/010_basics/008_wrapped_method_cxt_propagation.t @@ -3,8 +3,7 @@ use strict; use warnings; -use Test::More tests => 7; - +use Test::More; { @@ -56,3 +55,4 @@ foreach my $obj ( $base, $after ) { } } +done_testing; diff --git a/t/010_basics/009_import_unimport.t b/t/010_basics/009_import_unimport.t index f956bee..fcf15d0 100644 --- a/t/010_basics/009_import_unimport.t +++ b/t/010_basics/009_import_unimport.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 41; +use Test::More; my @moose_exports = qw( @@ -71,3 +71,5 @@ ok(!Bar->can($_), '... Bar can no longer do ' . $_) for @moose_type_constraint_e } can_ok( 'Baz', 'blessed' ); + +done_testing; diff --git a/t/010_basics/010_method_modifier_with_regexp.t b/t/010_basics/010_method_modifier_with_regexp.t index 64553f7..bc51d34 100644 --- a/t/010_basics/010_method_modifier_with_regexp.t +++ b/t/010_basics/010_method_modifier_with_regexp.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More; use Test::Exception; - { package Dog; @@ -84,3 +83,4 @@ is( $Cat::AFTER_BARK_COUNTER, 2, 'after modifier is called twice' ); } +done_testing; diff --git a/t/010_basics/011_moose_respects_type_constraints.t b/t/010_basics/011_moose_respects_type_constraints.t index 764df60..3e0997a 100644 --- a/t/010_basics/011_moose_respects_type_constraints.t +++ b/t/010_basics/011_moose_respects_type_constraints.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 7; +use Test::More; use Test::Exception; use Moose::Util::TypeConstraints; @@ -58,5 +58,4 @@ dies_ok { $bar->foo(Foo->new); } '... checked the type constraint correctly'; - - +done_testing; diff --git a/t/010_basics/012_rebless.t b/t/010_basics/012_rebless.t index 04a0880..77ed3eb 100644 --- a/t/010_basics/012_rebless.t +++ b/t/010_basics/012_rebless.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 11; +use Test::More; use Test::Exception; use Scalar::Util 'blessed'; @@ -83,3 +83,5 @@ is($bar->lazy_classname, 'Child', "lazy attribute just now initialized"); throws_ok { $foo->type_constrained(10.5) } qr/^Attribute \(type_constrained\) does not pass the type constraint because\: Validation failed for 'Int' failed with value 10\.5/, '... this failed cause of type check'; + +done_testing; diff --git a/t/010_basics/013_create.t b/t/010_basics/013_create.t index a21b37d..1c8003b 100644 --- a/t/010_basics/013_create.t +++ b/t/010_basics/013_create.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 7; +use Test::More; use Test::Exception; { @@ -58,3 +58,4 @@ dies_ok { # XXX: Continuing::To::Fail gets created anyway +done_testing; diff --git a/t/010_basics/014_create_anon.t b/t/010_basics/014_create_anon.t index c75cc81..c600635 100644 --- a/t/010_basics/014_create_anon.t +++ b/t/010_basics/014_create_anon.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More; use Moose::Meta::Class; @@ -70,3 +70,5 @@ use Moose::Meta::Class; ok $class_and_bar->name->bar_role_applied; } + +done_testing; diff --git a/t/010_basics/015_buildargs.t b/t/010_basics/015_buildargs.t index ac291a1..0c4bf50 100644 --- a/t/010_basics/015_buildargs.t +++ b/t/010_basics/015_buildargs.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 14; +use Test::More; { package Foo; @@ -40,4 +40,4 @@ foreach my $class qw(Foo Bar) { } } - +done_testing; diff --git a/t/010_basics/016_load_into_main.t b/t/010_basics/016_load_into_main.t index b0036b8..4198721 100644 --- a/t/010_basics/016_load_into_main.t +++ b/t/010_basics/016_load_into_main.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 4; +use Test::More; use Test::Exception; lives_ok { @@ -15,3 +15,4 @@ isa_ok( main->meta, "Moose::Meta::Class" ); isa_ok( main->new, "main"); isa_ok( main->new, "Moose::Object" ); +done_testing; diff --git a/t/010_basics/017_error_handling.t b/t/010_basics/017_error_handling.t index 958c6d3..542c79c 100644 --- a/t/010_basics/017_error_handling.t +++ b/t/010_basics/017_error_handling.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 3; +use Test::More; use Test::Exception; # This tests the error handling in Moose::Object only @@ -20,3 +20,5 @@ throws_ok { Foo->new(undef) } qr/^\QSingle parameters to new() must be a HASH re throws_ok { Foo->does() } qr/^\QYou must supply a role name to does()/, 'Cannot call does() without a role name'; + +done_testing; diff --git a/t/010_basics/018_methods.t b/t/010_basics/018_methods.t index 84fb963..aa3bb4b 100644 --- a/t/010_basics/018_methods.t +++ b/t/010_basics/018_methods.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 6; +use Test::More; my $test1 = Moose::Meta::Class->create_anon_class; @@ -42,3 +42,5 @@ isa_ok( is( $t2_am->name(), 'Test2', 'associated_metaclass->name is Test2' ); + +done_testing; diff --git a/t/010_basics/019-destruction.t b/t/010_basics/019-destruction.t index fecdad8..1be4158 100644 --- a/t/010_basics/019-destruction.t +++ b/t/010_basics/019-destruction.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 3; +use Test::More; our @demolished; package Foo; @@ -49,3 +49,5 @@ is_deeply(\@demolished, ['Foo::Sub', 'Foo'], "Foo::Sub demolished properly"); is_deeply(\@demolished, ['Foo::Sub::Sub', 'Foo::Sub', 'Foo'], "Foo::Sub::Sub demolished properly"); @demolished = (); + +done_testing; diff --git a/t/010_basics/020-global-destruction.t b/t/010_basics/020-global-destruction.t index 79ee4d3..9811319 100644 --- a/t/010_basics/020-global-destruction.t +++ b/t/010_basics/020-global-destruction.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 4; +use Test::More; { package Foo; @@ -48,3 +48,4 @@ ok( 'in_global_destruction state is passed to DEMOLISH properly (true)' ) for split //, `$^X t/010_basics/020-global-destruction-helper.pl`; +done_testing; diff --git a/t/020_attributes/001_attribute_reader_generation.t b/t/020_attributes/001_attribute_reader_generation.t index 407633d..f51140b 100644 --- a/t/020_attributes/001_attribute_reader_generation.t +++ b/t/020_attributes/001_attribute_reader_generation.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 20; +use Test::More; use Test::Exception; - { package Foo; use Moose; @@ -83,5 +82,4 @@ use Test::Exception; is($foo->get_lazy_foo(), 100, '... got the correct value'); } - - +done_testing; diff --git a/t/020_attributes/002_attribute_writer_generation.t b/t/020_attributes/002_attribute_writer_generation.t index f7f776c..f166150 100644 --- a/t/020_attributes/002_attribute_writer_generation.t +++ b/t/020_attributes/002_attribute_writer_generation.t @@ -3,13 +3,12 @@ use strict; use warnings; -use Test::More tests => 29; +use Test::More; use Test::Exception; use Scalar::Util 'isweak'; - { package Foo; use Moose; @@ -117,5 +116,4 @@ use Scalar::Util 'isweak'; ok(isweak($foo->{foo_weak}), '... it is a weak reference'); } - - +done_testing; diff --git a/t/020_attributes/003_attribute_accessor_generation.t b/t/020_attributes/003_attribute_accessor_generation.t index 73487c1..0603f95 100644 --- a/t/020_attributes/003_attribute_accessor_generation.t +++ b/t/020_attributes/003_attribute_accessor_generation.t @@ -3,13 +3,12 @@ use strict; use warnings; -use Test::More tests => 57; +use Test::More; use Test::Exception; use Scalar::Util 'isweak'; - { package Foo; use Moose; @@ -204,5 +203,4 @@ use Scalar::Util 'isweak'; is_deeply( \%hash, { foo => 1, bar => 2 }, "list context"); } - - +done_testing; diff --git a/t/020_attributes/004_attribute_triggers.t b/t/020_attributes/004_attribute_triggers.t index 974879d..b8ec580 100644 --- a/t/020_attributes/004_attribute_triggers.t +++ b/t/020_attributes/004_attribute_triggers.t @@ -5,11 +5,10 @@ use warnings; use Scalar::Util 'isweak'; -use Test::More tests => 43; +use Test::More; use Test::Exception; - { package Foo; use Moose; @@ -219,4 +218,4 @@ use Test::Exception; Foo->meta->make_immutable, redo if Foo->meta->is_mutable; } - +done_testing; diff --git a/t/020_attributes/005_attribute_does.t b/t/020_attributes/005_attribute_does.t index b0ef886..6d00c67 100644 --- a/t/020_attributes/005_attribute_does.t +++ b/t/020_attributes/005_attribute_does.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More; use Test::Exception; - { package Foo::Role; use Moose::Role; @@ -100,5 +99,4 @@ lives_ok { } '... cannot have a isa() which is cannot does()'; } - - +done_testing; diff --git a/t/020_attributes/006_attribute_required.t b/t/020_attributes/006_attribute_required.t index 0975765..5df07cc 100644 --- a/t/020_attributes/006_attribute_required.t +++ b/t/020_attributes/006_attribute_required.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 15; +use Test::More; use Test::Exception; - { package Foo; use Moose; @@ -66,3 +65,4 @@ throws_ok { Foo->new; } qr/^Attribute \(bar\) is required/, '... must supply all the required attribute'; +done_testing; diff --git a/t/020_attributes/007_attribute_custom_metaclass.t b/t/020_attributes/007_attribute_custom_metaclass.t index 25c3d1b..58c1ec1 100644 --- a/t/020_attributes/007_attribute_custom_metaclass.t +++ b/t/020_attributes/007_attribute_custom_metaclass.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 16; +use Test::More; use Test::Exception; - { package Foo::Meta::Attribute; use Moose; @@ -90,4 +89,4 @@ use Test::Exception; isa_ok($bar_attr, 'Moose::Meta::Attribute'); } - +done_testing; diff --git a/t/020_attributes/008_attribute_type_unions.t b/t/020_attributes/008_attribute_type_unions.t index 86dfbcf..f2ad610 100644 --- a/t/020_attributes/008_attribute_type_unions.t +++ b/t/020_attributes/008_attribute_type_unions.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 18; +use Test::More; use Test::Exception; - { package Foo; use Moose; @@ -96,4 +95,4 @@ dies_ok { Bar->new(baz => {}) } '... didnt create a new Bar with baz as a HASH ref'; - +done_testing; diff --git a/t/020_attributes/009_attribute_inherited_slot_specs.t b/t/020_attributes/009_attribute_inherited_slot_specs.t index 62c1958..593c9d4 100644 --- a/t/020_attributes/009_attribute_inherited_slot_specs.t +++ b/t/020_attributes/009_attribute_inherited_slot_specs.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 84; +use Test::More; use Test::Exception; - { package Thing; use Moose; @@ -261,4 +260,4 @@ ok(!Foo->meta->get_attribute('bling')->has_handles, ok(Bar->meta->get_attribute('bling')->has_handles, '... Bar::foo should handles'); - +done_testing; diff --git a/t/020_attributes/010_attribute_delegation.t b/t/020_attributes/010_attribute_delegation.t index 95bd73c..16ec30e 100644 --- a/t/020_attributes/010_attribute_delegation.t +++ b/t/020_attributes/010_attribute_delegation.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 92; +use Test::More; use Test::Exception; - # ------------------------------------------------------------------- # HASH handles # ------------------------------------------------------------------- @@ -434,3 +433,5 @@ is($car->stop, 'Engine::stop', '... got the right value from ->stop'); my $k = Bar->new(foo => "Foo"); lives_ok { $k->foo_baz } "but not for class name"; } + +done_testing; diff --git a/t/020_attributes/011_more_attr_delegation.t b/t/020_attributes/011_more_attr_delegation.t index 34fdb45..18b8fc1 100644 --- a/t/020_attributes/011_more_attr_delegation.t +++ b/t/020_attributes/011_more_attr_delegation.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 48; +use Test::More; use Test::Exception; =pod @@ -259,3 +259,5 @@ is( $p->child_g_method_1, "g1", "delegate to moose class without reader (child_g can_ok( $p, "child_i_method_1" ); is( $p->parent_method_1, "parent_1", "delegate doesn't override existing method" ); + +done_testing; diff --git a/t/020_attributes/012_misc_attribute_tests.t b/t/020_attributes/012_misc_attribute_tests.t index b788d7c..80c2330 100644 --- a/t/020_attributes/012_misc_attribute_tests.t +++ b/t/020_attributes/012_misc_attribute_tests.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 47; +use Test::More; use Test::Exception; - { { package Test::Attribute::Inline::Documentation; @@ -274,3 +273,5 @@ ok(OutOfClassTest->meta->get_attribute('bar'), 'attr created from can'); } } + +done_testing; diff --git a/t/020_attributes/013_attr_dereference_test.t b/t/020_attributes/013_attr_dereference_test.t index faa8a15..fa78897 100644 --- a/t/020_attributes/013_attr_dereference_test.t +++ b/t/020_attributes/013_attr_dereference_test.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 11; +use Test::More; use Test::Exception; - { package Customer; use Moose; @@ -79,3 +78,5 @@ use Test::Exception; is_deeply [ $autoderef->bar ], [ 1, 2, 3 ], '... auto-dereffed correctly'; } + +done_testing; diff --git a/t/020_attributes/014_misc_attribute_coerce_lazy.t b/t/020_attributes/014_misc_attribute_coerce_lazy.t index 5a47246..fe61494 100644 --- a/t/020_attributes/014_misc_attribute_coerce_lazy.t +++ b/t/020_attributes/014_misc_attribute_coerce_lazy.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 2; +use Test::More; use Test::Exception; @@ -47,5 +47,4 @@ lives_ok { $r->headers; } '... this coerces and passes the type constraint even with lazy'; - - +done_testing; diff --git a/t/020_attributes/015_attribute_traits.t b/t/020_attributes/015_attribute_traits.t index fc40435..428919e 100644 --- a/t/020_attributes/015_attribute_traits.t +++ b/t/020_attributes/015_attribute_traits.t @@ -3,12 +3,11 @@ use strict; use warnings; -use Test::More tests => 12; +use Test::More; use Test::Exception; use Test::Moose; - { package My::Attribute::Trait; use Moose::Role; @@ -64,5 +63,4 @@ ok(!$gorch_attr->does('My::Attribute::Trait'), '... gorch doesnt do the trait'); ok(!$gorch_attr->has_applied_traits, '... no traits applied'); is($gorch_attr->applied_traits, undef, '... no traits applied'); - - +done_testing; diff --git a/t/020_attributes/016_attribute_traits_registered.t b/t/020_attributes/016_attribute_traits_registered.t index 91dc88a..14cd0df 100644 --- a/t/020_attributes/016_attribute_traits_registered.t +++ b/t/020_attributes/016_attribute_traits_registered.t @@ -3,12 +3,11 @@ use strict; use warnings; -use Test::More tests => 23; +use Test::More; use Test::Exception; use Test::Moose; - { package My::Attribute::Trait; use Moose::Role; @@ -115,3 +114,4 @@ ok(!$derived_bar_attr->does('Fictional'), "attr->does returns false for nonexist can_ok($quux, 'additional_method'); is(eval { $quux->additional_method }, 42, '... got the right value for additional_method'); +done_testing; diff --git a/t/020_attributes/017_attribute_traits_n_meta.t b/t/020_attributes/017_attribute_traits_n_meta.t index 2aa1114..7815564 100644 --- a/t/020_attributes/017_attribute_traits_n_meta.t +++ b/t/020_attributes/017_attribute_traits_n_meta.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 7; +use Test::More; use Test::Exception; use Test::Moose; @@ -63,6 +63,4 @@ isa_ok($c->meta->get_attribute('bar'), 'My::Meta::Attribute::DefaultReadOnly'); does_ok($c->meta->get_attribute('bar'), 'My::Attribute::Trait'); is($c->meta->get_attribute('bar')->_is_metadata, 'ro', '... got the right metaclass customization'); - - - +done_testing; diff --git a/t/020_attributes/018_no_init_arg.t b/t/020_attributes/018_no_init_arg.t index 62f6e5a..e5ea6c2 100644 --- a/t/020_attributes/018_no_init_arg.t +++ b/t/020_attributes/018_no_init_arg.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 4; +use Test::More; use Test::Exception; @@ -31,3 +31,5 @@ use Test::Exception; is( $foo->foo, "blah", "field is set via setter" ); } + +done_testing; diff --git a/t/020_attributes/019_attribute_lazy_initializer.t b/t/020_attributes/019_attribute_lazy_initializer.t index 06f631f..3ac82d8 100644 --- a/t/020_attributes/019_attribute_lazy_initializer.t +++ b/t/020_attributes/019_attribute_lazy_initializer.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 23; +use Test::More; use Test::Exception; - { package Foo; use Moose; @@ -148,3 +147,4 @@ dies_ok { Fail::Bar->new(foo => 10) } '... this fails, because initializer returns a bad type'; +done_testing; diff --git a/t/020_attributes/020_trigger_and_coerce.t b/t/020_attributes/020_trigger_and_coerce.t index 182d03d..c3aac65 100644 --- a/t/020_attributes/020_trigger_and_coerce.t +++ b/t/020_attributes/020_trigger_and_coerce.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 11; +use Test::More; use Test::Exception; - { package Fake::DateTime; @@ -54,3 +53,4 @@ ok( Mortgage->meta->is_immutable, '... Mortgage is now immutable' ); isa_ok( $mtg->closing_date, 'Fake::DateTime' ); } +done_testing; diff --git a/t/020_attributes/021_method_generation_rules.t b/t/020_attributes/021_method_generation_rules.t index d634e57..646e572 100644 --- a/t/020_attributes/021_method_generation_rules.t +++ b/t/020_attributes/021_method_generation_rules.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 17; +use Test::More; use Test::Exception; - =pod is => rw, writer => _foo # turns into (reader => foo, writer => _foo) @@ -61,3 +60,4 @@ is($obj->_foo(), 1, "$class->foo is reader"); dies_ok { make_class('ro', 'accessor', "Test::Class::AccessorRO"); } "Cant define attr with ro + accessor"; +done_testing; diff --git a/t/020_attributes/022_legal_options_for_inheritance.t b/t/020_attributes/022_legal_options_for_inheritance.t index c44b7d1..ca21b6f 100644 --- a/t/020_attributes/022_legal_options_for_inheritance.t +++ b/t/020_attributes/022_legal_options_for_inheritance.t @@ -2,8 +2,7 @@ use strict; use warnings; -use Test::More tests => 2; - +use Test::More; { @@ -47,3 +46,5 @@ my ($legal_option) = grep { is($legal_option, 'my_legal_option', '... added my_legal_option as legal option for inheritance' ); is($bar_attr->my_legal_option->(), 'Bar::B', '... overloaded my_legal_option'); + +done_testing; diff --git a/t/020_attributes/023_attribute_names.t b/t/020_attributes/023_attribute_names.t index 9656e47..ebcfd09 100644 --- a/t/020_attributes/023_attribute_names.t +++ b/t/020_attributes/023_attribute_names.t @@ -2,7 +2,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More; use Test::Exception; my $exception_regex = qr/You must provide a name for the attribute/; @@ -56,3 +56,4 @@ my $exception_regex = qr/You must provide a name for the attribute/; } 'has 0; works now'; } +done_testing; diff --git a/t/020_attributes/024_attribute_traits_parameterized.t b/t/020_attributes/024_attribute_traits_parameterized.t index 8b473e5..dc434cf 100644 --- a/t/020_attributes/024_attribute_traits_parameterized.t +++ b/t/020_attributes/024_attribute_traits_parameterized.t @@ -1,7 +1,7 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 5; +use Test::More; { package My::Attribute::Trait; @@ -55,3 +55,4 @@ is($other_attr->reversed, 'oof', 'the aliased method is in the attribute'); ok(!$other_attr->can('enam'), "the method was not installed under the other class' alias"); ok(!$other_attr->can('reversed_name'), "the method was not installed under the original name when that was excluded"); +done_testing; diff --git a/t/020_attributes/025_chained_coercion.t b/t/020_attributes/025_chained_coercion.t index 3975200..59cc470 100644 --- a/t/020_attributes/025_chained_coercion.t +++ b/t/020_attributes/025_chained_coercion.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 4; +use Test::More; use Test::Exception; { @@ -46,4 +46,4 @@ isa_ok($foo->bar, 'Bar'); isa_ok($foo->bar->baz, 'Baz'); is($foo->bar->baz->hello, 'World', '... this all worked fine'); - +done_testing; diff --git a/t/020_attributes/026_attribute_without_any_methods.t b/t/020_attributes/026_attribute_without_any_methods.t index e932718..0a2d579 100644 --- a/t/020_attributes/026_attribute_without_any_methods.t +++ b/t/020_attributes/026_attribute_without_any_methods.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 2; +use Test::More; use Moose (); use Moose::Meta::Class; @@ -20,3 +20,5 @@ like $warn, qr/Attribute \(foo\) of class Banana has no associated methods/, $warn = ''; $meta->add_attribute('bar', is => 'bare'); is $warn, '', 'add attribute with no methods and is => "bare"'; + +done_testing; diff --git a/t/020_attributes/027_accessor_override_method.t b/t/020_attributes/027_accessor_override_method.t index 16ab21a..3c84cf7 100644 --- a/t/020_attributes/027_accessor_override_method.t +++ b/t/020_attributes/027_accessor_override_method.t @@ -6,7 +6,6 @@ use Test::More; BEGIN { eval "use Test::Output;"; plan skip_all => "Test::Output is required for this test" if $@; - plan tests => 5; } { @@ -31,3 +30,5 @@ stderr_like(sub { $foo_meta->add_attribute(d => (clearer => 'clear_d')) }, qr/^You are overwriting a locally defined method \(clear_d\) with an accessor/, 'clearer overriding gives proper warning'); stderr_like(sub { $foo_meta->add_attribute(e => (is => 'rw')) }, qr/^You are overwriting a locally defined method \(e\) with an accessor/, 'accessor overriding gives proper warning'); + +done_testing; diff --git a/t/020_attributes/028_no_slot_access.t b/t/020_attributes/028_no_slot_access.t index cb6efa3..7587bbb 100644 --- a/t/020_attributes/028_no_slot_access.t +++ b/t/020_attributes/028_no_slot_access.t @@ -60,7 +60,7 @@ use warnings; use Moose; use Moose::Util::MetaRole; - use Test::More tests => 3; + use Test::More; use Test::Exception; Moose::Util::MetaRole::apply_metaclass_roles( @@ -87,4 +87,6 @@ use warnings; lives_ok { __PACKAGE__->meta->make_immutable; } "Inling constructor does not use inline_slot_access"; + + done_testing; } diff --git a/t/020_attributes/029_accessor_context.t b/t/020_attributes/029_accessor_context.t index a024af5..b13a594 100644 --- a/t/020_attributes/029_accessor_context.t +++ b/t/020_attributes/029_accessor_context.t @@ -2,7 +2,7 @@ use strict; use warnings; -use Test::More tests => 14; +use Test::More; use Test::Exception; lives_ok { @@ -66,3 +66,5 @@ lives_ok { is_deeply [$o->h_ro], [], 'uninitialized HashRef attribute/ro in list context'; } 'testing'; + +done_testing; diff --git a/t/020_attributes/030_non_alpha_attr_names.t b/t/020_attributes/030_non_alpha_attr_names.t index efbc0fc..c2b1fb6 100644 --- a/t/020_attributes/030_non_alpha_attr_names.t +++ b/t/020_attributes/030_non_alpha_attr_names.t @@ -1,7 +1,7 @@ use strict; use warnings; -use Test::More tests => 12; +use Test::More; { package Foo; @@ -39,3 +39,5 @@ use Test::More tests => 12; Foo->meta->make_immutable, redo if Foo->meta->is_mutable; } + +done_testing; diff --git a/t/020_attributes/031_delegation_and_modifiers.t b/t/020_attributes/031_delegation_and_modifiers.t index 78ab291..cab7f0d 100644 --- a/t/020_attributes/031_delegation_and_modifiers.t +++ b/t/020_attributes/031_delegation_and_modifiers.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 5; +use Test::More; use Test::Exception; { @@ -54,10 +54,4 @@ is($foo->baz, 'Bar::baz', '... got the right delegated method'); ok($foo->test, '... the test value has now been changed'); - - - - - - - +done_testing; diff --git a/t/020_attributes/032_delegation_arg_aliasing.t b/t/020_attributes/032_delegation_arg_aliasing.t index 4e1ec42..591e1f8 100644 --- a/t/020_attributes/032_delegation_arg_aliasing.t +++ b/t/020_attributes/032_delegation_arg_aliasing.t @@ -1,7 +1,7 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 3; +use Test::More; { package Foo; @@ -37,3 +37,5 @@ is($x, 'foo', "delegated aliasing works"); undef $x; $hasfoo->foo_aliased_curried($x); is($x, 'bar', "delegated aliasing with currying works"); + +done_testing; diff --git a/t/030_roles/001_meta_role.t b/t/030_roles/001_meta_role.t index a977ec3..309f4b1 100644 --- a/t/030_roles/001_meta_role.t +++ b/t/030_roles/001_meta_role.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 27; +use Test::More; use Test::Exception; use Moose::Meta::Role; @@ -104,3 +104,5 @@ is_deeply( [ $foo_role->get_method_modifier_list('before') ], [ 'boo' ], '... got the right list of before method modifiers'); + +done_testing; diff --git a/t/030_roles/002_role.t b/t/030_roles/002_role.t index 3e0f99f..778cd5d 100644 --- a/t/030_roles/002_role.t +++ b/t/030_roles/002_role.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 41; +use Test::More; use Test::Exception; =pod @@ -153,3 +153,4 @@ is_deeply( [ 'bling', 'fling' ], '... got the right list of override method modifiers'); +done_testing; diff --git a/t/030_roles/003_apply_role.t b/t/030_roles/003_apply_role.t index 1ccff67..d474213 100644 --- a/t/030_roles/003_apply_role.t +++ b/t/030_roles/003_apply_role.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 86; +use Test::More; use Test::Exception; { @@ -183,3 +183,5 @@ foreach my $foo ( $foo, $foobar ) { is( $foo->bar, $foo2, '... got the right value for bar now' ); } + +done_testing; diff --git a/t/030_roles/004_role_composition_errors.t b/t/030_roles/004_role_composition_errors.t index ce8918f..b2c58f4 100644 --- a/t/030_roles/004_role_composition_errors.t +++ b/t/030_roles/004_role_composition_errors.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 14; +use Test::More; use Test::Exception; - { package Foo::Role; @@ -155,3 +154,5 @@ is_deeply( qr/'Quux::Role' requires the methods 'meth3' and 'meth4' to be implemented by 'Quux::Class4'/, 'exception mentions all the require methods that are accessors at once, as well as missing methods, but not the one that exists'; } + +done_testing; diff --git a/t/030_roles/005_role_conflict_detection.t b/t/030_roles/005_role_conflict_detection.t index 7da76ad..d33b1c0 100644 --- a/t/030_roles/005_role_conflict_detection.t +++ b/t/030_roles/005_role_conflict_detection.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 88; +use Test::More; use Test::Exception; =pod @@ -573,3 +573,5 @@ isa_ok($test26, 'My::Test26'); is($test26->ghost, 'My::Test26::ghost', '... we access the attribute from the class and ignore the role attribute and method'); =cut + +done_testing; diff --git a/t/030_roles/006_role_exclusion.t b/t/030_roles/006_role_exclusion.t index 762cefd..1d80e84 100644 --- a/t/030_roles/006_role_exclusion.t +++ b/t/030_roles/006_role_exclusion.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 22; +use Test::More; use Test::Exception; =pod @@ -121,3 +121,4 @@ ok(My::Test4->meta->does_role('Molecule::Organic'), '... My::Test4 meat does_rol ok(My::Test4->meta->excludes_role('Molecule::Inorganic'), '... My::Test4 meta excludes Molecule::Organic'); ok(!My::Test4->does('Molecule::Inorganic'), '... My::Test4 does Molecule::Inorganic'); +done_testing; diff --git a/t/030_roles/007_roles_and_req_method_edge_cases.t b/t/030_roles/007_roles_and_req_method_edge_cases.t index b99348b..bdbcf45 100644 --- a/t/030_roles/007_roles_and_req_method_edge_cases.t +++ b/t/030_roles/007_roles_and_req_method_edge_cases.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 15; +use Test::More; use Test::Exception; =pod @@ -275,3 +275,5 @@ method modifier. with 'Bar2::Role'; } 'required method exists in superclass as non-modifier, so we live'; } + +done_testing; diff --git a/t/030_roles/008_role_conflict_edge_cases.t b/t/030_roles/008_role_conflict_edge_cases.t index 22cc706..aff9bd9 100644 --- a/t/030_roles/008_role_conflict_edge_cases.t +++ b/t/030_roles/008_role_conflict_edge_cases.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 32; +use Test::More; use Test::Exception; =pod @@ -186,3 +186,5 @@ ok(Role::Derived8->meta->has_attribute('foo'), '... have the attribute foo as ex ok(My::Test::Class4->meta->has_attribute('foo'), '... have the attribute foo as expected'); is(My::Test::Class4->new->foo, 'Role::Base::foo', '... got the right value from method'); + +done_testing; diff --git a/t/030_roles/009_more_role_edge_cases.t b/t/030_roles/009_more_role_edge_cases.t index e9923f0..4a4fde0 100644 --- a/t/030_roles/009_more_role_edge_cases.t +++ b/t/030_roles/009_more_role_edge_cases.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 74; +use Test::More; use Test::Exception; - { # NOTE: # this tests that repeated role @@ -254,3 +253,5 @@ use Test::Exception; is( eval { $class->method }, "concrete b", "provided by concrete b" ); } } + +done_testing; diff --git a/t/030_roles/010_run_time_role_composition.t b/t/030_roles/010_run_time_role_composition.t index 08354c5..4ec636c 100644 --- a/t/030_roles/010_run_time_role_composition.t +++ b/t/030_roles/010_run_time_role_composition.t @@ -3,12 +3,11 @@ use strict; use warnings; -use Test::More tests => 27; +use Test::More; use Scalar::Util qw(blessed); - =pod This test can be used as a basis for the runtime role composition. @@ -101,6 +100,4 @@ isa_ok($obj2, 'My::Class'); is(blessed($obj), blessed($obj2), '... they share the same anon-class/role thing again'); } - - - +done_testing; diff --git a/t/030_roles/011_overriding.t b/t/030_roles/011_overriding.t index 32bd113..300a39f 100644 --- a/t/030_roles/011_overriding.t +++ b/t/030_roles/011_overriding.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 39; +use Test::More; use Test::Exception; - { # test no conflicts here package Role::A; @@ -227,3 +226,4 @@ ok(Role::I->meta->requires_method('foo'), '... Role::I still have the &foo requi } +done_testing; diff --git a/t/030_roles/012_method_exclusion_in_composition.t b/t/030_roles/012_method_exclusion_in_composition.t index 8c3456e..fa74523 100644 --- a/t/030_roles/012_method_exclusion_in_composition.t +++ b/t/030_roles/012_method_exclusion_in_composition.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 19; +use Test::More; use Test::Exception; - { package My::Role; use Moose::Role; @@ -111,5 +110,4 @@ ok(!My::Foo::Role->meta->requires_method('foo'), '... and the &foo method is not ok(!My::Foo::Role::Other->meta->has_method('foo'), "we dont have a foo method"); ok(My::Foo::Role::Other->meta->requires_method('foo'), '... and the &foo method is required'); - - +done_testing; diff --git a/t/030_roles/013_method_aliasing_in_composition.t b/t/030_roles/013_method_aliasing_in_composition.t index 3f518ee..6487561 100644 --- a/t/030_roles/013_method_aliasing_in_composition.t +++ b/t/030_roles/013_method_aliasing_in_composition.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 46; +use Test::More; use Test::Exception; - { package My::Role; use Moose::Role; @@ -212,3 +211,5 @@ ok(My::Foo::AliasOnly->meta->has_method('foo_foo'), '.. and the aliased foo_foo for qw( x1 foo_x1 ); ok( ! $baz->has_method('y1'), 'Role::Baz has no y1 method' ); } + +done_testing; diff --git a/t/030_roles/014_more_alias_and_exclude.t b/t/030_roles/014_more_alias_and_exclude.t index 60b3731..1bba604 100644 --- a/t/030_roles/014_more_alias_and_exclude.t +++ b/t/030_roles/014_more_alias_and_exclude.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More; use Test::Exception; - { package Foo; use Moose::Role; @@ -66,7 +65,4 @@ is($c->foo_gorch, 'Foo::gorch', '... got the right method'); is($c->baz_foo, 'Baz::foo', '... got the right method'); is($c->baz_bar, 'Baz::bar', '... got the right method'); - - - - +done_testing; diff --git a/t/030_roles/015_runtime_roles_and_attrs.t b/t/030_roles/015_runtime_roles_and_attrs.t index 55a3847..865e252 100644 --- a/t/030_roles/015_runtime_roles_and_attrs.t +++ b/t/030_roles/015_runtime_roles_and_attrs.t @@ -3,13 +3,11 @@ use strict; use warnings; -use Test::More tests => 11; +use Test::More; use Test::Exception; use Scalar::Util 'blessed'; - - { package Dog; use Moose::Role; @@ -55,3 +53,5 @@ lives_ok { } '... and setting the accessor is okay'; is($obj->fur, "dirty", "role attr initialized"); + +done_testing; diff --git a/t/030_roles/016_runtime_roles_and_nonmoose.t b/t/030_roles/016_runtime_roles_and_nonmoose.t index be31150..ec4e657 100644 --- a/t/030_roles/016_runtime_roles_and_nonmoose.t +++ b/t/030_roles/016_runtime_roles_and_nonmoose.t @@ -3,13 +3,11 @@ use strict; use warnings; -use Test::More tests => 7; +use Test::More; use Test::Exception; use Scalar::Util 'blessed'; - - { package Dog; use Moose::Role; @@ -55,3 +53,4 @@ lives_ok { $foo->dog($bar) } '... and setting the accessor is okay'; +done_testing; diff --git a/t/030_roles/017_extending_role_attrs.t b/t/030_roles/017_extending_role_attrs.t index e960a67..b475be3 100644 --- a/t/030_roles/017_extending_role_attrs.t +++ b/t/030_roles/017_extending_role_attrs.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 27; +use Test::More; use Test::Exception; - =pod This basically just makes sure that using +name @@ -173,3 +172,4 @@ is_deeply($quux->quux, ["hi"], "... still has the old ArrayRef value"); } "or add new types to the union"; } +done_testing; diff --git a/t/030_roles/018_runtime_roles_w_params.t b/t/030_roles/018_runtime_roles_w_params.t index 33de3c3..0ca57ed 100644 --- a/t/030_roles/018_runtime_roles_w_params.t +++ b/t/030_roles/018_runtime_roles_w_params.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 21; +use Test::More; use Test::Exception; - { package Foo; use Moose; @@ -70,4 +69,4 @@ use Test::Exception; is($foo->baz, 'FOO-BAZ', '... got the expect value'); } - +done_testing; diff --git a/t/030_roles/019_build.t b/t/030_roles/019_build.t index cd973cd..1dfc912 100644 --- a/t/030_roles/019_build.t +++ b/t/030_roles/019_build.t @@ -5,7 +5,6 @@ use Test::More; BEGIN { eval "use Test::Output;"; plan skip_all => "Test::Output is required for this test" if $@; - plan tests => 8; } # this test script ensures that my idiom of: @@ -78,3 +77,4 @@ do { } } +done_testing; diff --git a/t/030_roles/020_role_composite.t b/t/030_roles/020_role_composite.t index 9f3b001..1362868 100644 --- a/t/030_roles/020_role_composite.t +++ b/t/030_roles/020_role_composite.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 14; +use Test::More; use Test::Exception; use Moose::Meta::Role::Application::RoleSummation; @@ -78,3 +78,5 @@ use Moose::Meta::Role::Composite; ); } } + +done_testing; diff --git a/t/030_roles/021_role_composite_exclusion.t b/t/030_roles/021_role_composite_exclusion.t index f12cb08..322cd0a 100644 --- a/t/030_roles/021_role_composite_exclusion.t +++ b/t/030_roles/021_role_composite_exclusion.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 12; +use Test::More; use Test::Exception; use Moose::Meta::Role::Application::RoleSummation; @@ -106,4 +106,4 @@ dies_ok { ); } '... this fails as expected'; - +done_testing; diff --git a/t/030_roles/022_role_composition_req_methods.t b/t/030_roles/022_role_composition_req_methods.t index 2e6727e..e3f1beb 100644 --- a/t/030_roles/022_role_composition_req_methods.t +++ b/t/030_roles/022_role_composition_req_methods.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 16; +use Test::More; use Test::Exception; use Moose::Meta::Role::Application::RoleSummation; @@ -122,4 +122,4 @@ use Moose::Meta::Role::Composite; ); } - +done_testing; diff --git a/t/030_roles/023_role_composition_attributes.t b/t/030_roles/023_role_composition_attributes.t index 0086435..b8f8af0 100644 --- a/t/030_roles/023_role_composition_attributes.t +++ b/t/030_roles/023_role_composition_attributes.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 7; +use Test::More; use Test::Exception; use Moose::Meta::Role::Application::RoleSummation; @@ -92,3 +92,4 @@ dies_ok { ); } '... this fails as expected'; +done_testing; diff --git a/t/030_roles/024_role_composition_methods.t b/t/030_roles/024_role_composition_methods.t index bf5c517..5183245 100644 --- a/t/030_roles/024_role_composition_methods.t +++ b/t/030_roles/024_role_composition_methods.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 19; +use Test::More; use Test::Exception; use Moose::Meta::Role::Application::RoleSummation; @@ -149,3 +149,4 @@ use Moose::Meta::Role::Composite; ); } +done_testing; diff --git a/t/030_roles/025_role_composition_override.t b/t/030_roles/025_role_composition_override.t index d47fd3b..4c428f2 100644 --- a/t/030_roles/025_role_composition_override.t +++ b/t/030_roles/025_role_composition_override.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More; use Test::Exception; use Moose::Meta::Role::Application::RoleSummation; @@ -110,3 +110,5 @@ dies_ok { ) ); } '... this fails as expected'; + +done_testing; diff --git a/t/030_roles/026_role_composition_method_mods.t b/t/030_roles/026_role_composition_method_mods.t index 9de99b4..5df6523 100644 --- a/t/030_roles/026_role_composition_method_mods.t +++ b/t/030_roles/026_role_composition_method_mods.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 7; +use Test::More; use Test::Exception; use Moose::Meta::Role::Application::RoleSummation; @@ -84,3 +84,5 @@ use Moose::Meta::Role::Composite; '... got the right list of methods' ); } + +done_testing; diff --git a/t/030_roles/031_roles_applied_in_create.t b/t/030_roles/031_roles_applied_in_create.t index 8aed354..10d698c 100644 --- a/t/030_roles/031_roles_applied_in_create.t +++ b/t/030_roles/031_roles_applied_in_create.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 1; +use Test::More; use Test::Exception; use Moose::Meta::Class; use Moose::Util; @@ -25,3 +25,4 @@ lives_ok( 'Create a new class with several roles' ); +done_testing; diff --git a/t/030_roles/032_roles_and_method_cloning.t b/t/030_roles/032_roles_and_method_cloning.t index 9cd45e0..d697f37 100644 --- a/t/030_roles/032_roles_and_method_cloning.t +++ b/t/030_roles/032_roles_and_method_cloning.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 17; +use Test::More; { @@ -79,3 +79,5 @@ isnt( ClassA->foo, "ClassB::foo", "ClassA::foo is not confused with ClassB::foo" is( ClassB->foo, 'ClassB::foo', 'ClassB::foo knows its name' ); is( ClassA->foo, 'ClassA::foo', 'ClassA::foo knows its name' ); } + +done_testing; diff --git a/t/030_roles/033_role_exclusion_and_alias_bug.t b/t/030_roles/033_role_exclusion_and_alias_bug.t index ac1b11a..e05f896 100644 --- a/t/030_roles/033_role_exclusion_and_alias_bug.t +++ b/t/030_roles/033_role_exclusion_and_alias_bug.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 17; +use Test::More; use Test::Moose; { @@ -66,4 +66,4 @@ use Test::Moose; is($x->gorch, 'BAR', '... got the right value'); } - +done_testing; diff --git a/t/030_roles/034_create_role.t b/t/030_roles/034_create_role.t index 8c1eb4e..204c66d 100644 --- a/t/030_roles/034_create_role.t +++ b/t/030_roles/034_create_role.t @@ -1,7 +1,7 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 4; +use Test::More; use Moose (); my $role = Moose::Meta::Role->create( @@ -30,3 +30,4 @@ ok(!$visored->is_worn, "method was consumed"); ok(!$role->is_anon_role, "the role is not anonymous"); +done_testing; diff --git a/t/030_roles/035_anonymous_roles.t b/t/030_roles/035_anonymous_roles.t index 0d36658..dc58861 100644 --- a/t/030_roles/035_anonymous_roles.t +++ b/t/030_roles/035_anonymous_roles.t @@ -1,7 +1,7 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 7; +use Test::More; use Moose (); my $role = Moose::Meta::Role->create_anon_role( @@ -33,3 +33,4 @@ ok($role->is_anon_role, "the role knows it's anonymous"); ok(Class::MOP::is_class_loaded(Moose::Meta::Role->create_anon_role->name), "creating an anonymous role satisifes is_class_loaded"); ok(Class::MOP::class_of(Moose::Meta::Role->create_anon_role->name), "creating an anonymous role satisifes class_of"); +done_testing; diff --git a/t/030_roles/036_free_anonymous_roles.t b/t/030_roles/036_free_anonymous_roles.t index f0197d9..855e2bf 100644 --- a/t/030_roles/036_free_anonymous_roles.t +++ b/t/030_roles/036_free_anonymous_roles.t @@ -1,7 +1,7 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 4; +use Test::More; use Moose (); use Scalar::Util 'weaken'; @@ -32,3 +32,5 @@ do { ok(!$weak, "the role metaclass is freed after its last reference (from a consuming anonymous class) is freed"); ok(!$name->can('improperly_freed'), "we blew away the role's symbol table entries"); + +done_testing; diff --git a/t/030_roles/037_create_role_subclass.t b/t/030_roles/037_create_role_subclass.t index ff436f6..c6e2e2d 100644 --- a/t/030_roles/037_create_role_subclass.t +++ b/t/030_roles/037_create_role_subclass.t @@ -1,7 +1,7 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 2; +use Test::More; use Moose (); do { @@ -24,3 +24,4 @@ is($role->test_serial, 1, "default value for the serial attribute"); my $nine_role = My::Meta::Role->create_anon_role(test_serial => 9); is($nine_role->test_serial, 9, "parameter value for the serial attribute"); +done_testing; diff --git a/t/030_roles/038_new_meta_role.t b/t/030_roles/038_new_meta_role.t index 000fd8e..ff3a98a 100644 --- a/t/030_roles/038_new_meta_role.t +++ b/t/030_roles/038_new_meta_role.t @@ -1,7 +1,7 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 1; +use Test::More; do { package My::Meta::Role; @@ -16,3 +16,4 @@ do { is(My::Role->meta->meta->name, 'My::Meta::Role'); +done_testing; diff --git a/t/030_roles/039_application_toclass.t b/t/030_roles/039_application_toclass.t index 573cec1..faf0b01 100644 --- a/t/030_roles/039_application_toclass.t +++ b/t/030_roles/039_application_toclass.t @@ -1,7 +1,7 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 24; +use Test::More; do { package Role::Foo; @@ -73,3 +73,4 @@ is_deeply($excludes->get_method_exclusions, ['foo']); is_deeply($aliases->get_method_exclusions, []); is_deeply($overrides->get_method_exclusions, []); +done_testing; diff --git a/t/030_roles/040_role_for_combination.t b/t/030_roles/040_role_for_combination.t index 77dc7a2..3a297ea 100644 --- a/t/030_roles/040_role_for_combination.t +++ b/t/030_roles/040_role_for_combination.t @@ -1,7 +1,7 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 3; +use Test::More; my $OPTS; do { @@ -43,3 +43,4 @@ is(My::Class->foo, 'My::Singleton::Role', 'role_for_combination applied'); is(My::Class->bar, 'My::Usual::Role', 'collateral role'); is_deeply($OPTS, { number => 1 }); +done_testing; diff --git a/t/030_roles/041_empty_method_modifiers_meta_bug.t b/t/030_roles/041_empty_method_modifiers_meta_bug.t index e7a0f9f..ae15abb 100644 --- a/t/030_roles/041_empty_method_modifiers_meta_bug.t +++ b/t/030_roles/041_empty_method_modifiers_meta_bug.t @@ -2,7 +2,7 @@ use strict; use warnings; -use Test::More tests => 6; +use Test::More; # test role and class package SomeRole; @@ -26,3 +26,5 @@ for my $modifier_type (qw[ before around after ]) { is($@, '', "$get_func for no method mods does not die"); is(scalar(@mms),0,'is an empty list'); } + +done_testing; diff --git a/t/030_roles/042_compose_overloading.t b/t/030_roles/042_compose_overloading.t index cb7bf0c..d6f56a1 100644 --- a/t/030_roles/042_compose_overloading.t +++ b/t/030_roles/042_compose_overloading.t @@ -1,6 +1,6 @@ use strict; use warnings; -use Test::More tests => 1; +use Test::More; { package Foo; @@ -26,3 +26,5 @@ TODO: { local $TODO = "the special () method isn't properly composed into the class"; is("$bar", 42, 'overloading can be composed'); } + +done_testing; diff --git a/t/030_roles/043_conflict_many_methods.t b/t/030_roles/043_conflict_many_methods.t index 384f97f..785d48f 100644 --- a/t/030_roles/043_conflict_many_methods.t +++ b/t/030_roles/043_conflict_many_methods.t @@ -2,7 +2,7 @@ use strict; use warnings; -use Test::More tests => 2; +use Test::More; use Test::Exception; { @@ -29,17 +29,20 @@ use Test::Exception; sub bark { } } -package PracticalJoke; -use Moose; - -::throws_ok { - with 'Bomb', 'Spouse'; -} qr/Due to method name conflicts in roles 'Bomb' and 'Spouse', the methods 'explode' and 'fuse' must be implemented or excluded by 'PracticalJoke'/; - -::throws_ok { - with ( - 'Bomb', 'Spouse', - 'Caninish', 'Treeve', - ); -} qr/Due to a method name conflict in roles 'Caninish' and 'Treeve', the method 'bark' must be implemented or excluded by 'PracticalJoke'/; +{ + package PracticalJoke; + use Moose; + + ::throws_ok { + with 'Bomb', 'Spouse'; + } qr/Due to method name conflicts in roles 'Bomb' and 'Spouse', the methods 'explode' and 'fuse' must be implemented or excluded by 'PracticalJoke'/; + + ::throws_ok { + with ( + 'Bomb', 'Spouse', + 'Caninish', 'Treeve', + ); + } qr/Due to a method name conflict in roles 'Caninish' and 'Treeve', the method 'bark' must be implemented or excluded by 'PracticalJoke'/; +} +done_testing; diff --git a/t/040_type_constraints/001_util_type_constraints.t b/t/040_type_constraints/001_util_type_constraints.t index cf4e7e5..b0e6069 100644 --- a/t/040_type_constraints/001_util_type_constraints.t +++ b/t/040_type_constraints/001_util_type_constraints.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 85; +use Test::More; use Test::Exception; use Scalar::Util (); @@ -225,3 +225,4 @@ throws_ok {$r->add_type_constraint(bless {}, 'SomeClass')} qr/not a valid type c ok( ! $subtype->check('Foo'), '... this is not a Natural'); } +done_testing; diff --git a/t/040_type_constraints/002_util_type_constraints_export.t b/t/040_type_constraints/002_util_type_constraints_export.t index 7ef7ad1..2dff998 100644 --- a/t/040_type_constraints/002_util_type_constraints_export.t +++ b/t/040_type_constraints/002_util_type_constraints_export.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 4; +use Test::More; use Test::Exception; { @@ -26,3 +26,5 @@ use Test::Exception; ::ok( MyRef( {} ), '... Ref worked correctly' ); ::ok( MyArrayRef( [] ), '... ArrayRef worked correctly' ); } + +done_testing; diff --git a/t/040_type_constraints/003_util_std_type_constraints.t b/t/040_type_constraints/003_util_std_type_constraints.t index 0af079a..00c1179 100644 --- a/t/040_type_constraints/003_util_std_type_constraints.t +++ b/t/040_type_constraints/003_util_std_type_constraints.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 298; +use Test::More; use Test::Exception; use Scalar::Util (); @@ -359,3 +359,5 @@ ok(!defined RoleName('Moose::Meta::TypeConstraint'), '... RoleName accepts anyt ok(defined RoleName('Quux::Wibble::Role'), '... RoleName accepts anything which is a RoleName'); close($fh) || die "Could not close the filehandle $0 for test"; + +done_testing; diff --git a/t/040_type_constraints/004_util_find_type_constraint.t b/t/040_type_constraints/004_util_find_type_constraint.t index 8fe6a6b..63c9d02 100644 --- a/t/040_type_constraints/004_util_find_type_constraint.t +++ b/t/040_type_constraints/004_util_find_type_constraint.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 18; +use Test::More; use Test::Exception; BEGIN { @@ -36,3 +36,5 @@ foreach my $type_name (qw( # TODO: # add tests for is_subtype_of which confirm the hierarchy + +done_testing; diff --git a/t/040_type_constraints/005_util_type_coercion.t b/t/040_type_constraints/005_util_type_coercion.t index 86a158c..4d64909 100644 --- a/t/040_type_constraints/005_util_type_coercion.t +++ b/t/040_type_constraints/005_util_type_coercion.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 26; +use Test::More; use Test::Exception; BEGIN { @@ -100,3 +100,5 @@ coerce 'StrWithTrailingX' my $tc = find_type_constraint('StrWithTrailingX'); is($tc->coerce("foo"), "fooX", "coerce when needed"); is($tc->coerce("fooX"), "fooX", "do not coerce when unneeded"); + +done_testing; diff --git a/t/040_type_constraints/006_util_type_reloading.t b/t/040_type_constraints/006_util_type_reloading.t index 4cde153..d1acfc2 100644 --- a/t/040_type_constraints/006_util_type_reloading.t +++ b/t/040_type_constraints/006_util_type_reloading.t @@ -5,11 +5,10 @@ use warnings; use lib 't/lib', 'lib'; -use Test::More tests => 4; +use Test::More; use Test::Exception; - $SIG{__WARN__} = sub { 0 }; eval { require Foo; }; @@ -26,4 +25,6 @@ ok(!$@, '... loaded Bar successfully') || diag $@; delete $INC{'Bar.pm'}; eval { require Bar; }; -ok(!$@, '... re-loaded Bar successfully') || diag $@; \ No newline at end of file +ok(!$@, '... re-loaded Bar successfully') || diag $@; + +done_testing; diff --git a/t/040_type_constraints/007_util_more_type_coercion.t b/t/040_type_constraints/007_util_more_type_coercion.t index cd29ea0..766e4ec 100644 --- a/t/040_type_constraints/007_util_more_type_coercion.t +++ b/t/040_type_constraints/007_util_more_type_coercion.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 25; +use Test::More; use Test::Exception; - { package HTTPHeader; use Moose; @@ -115,3 +114,4 @@ dies_ok { Engine->new(header => \(my $var)); } '... dies correctly with bad params'; +done_testing; diff --git a/t/040_type_constraints/008_union_types.t b/t/040_type_constraints/008_union_types.t index e192b20..cff7248 100644 --- a/t/040_type_constraints/008_union_types.t +++ b/t/040_type_constraints/008_union_types.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 35; +use Test::More; use Test::Exception; BEGIN { @@ -78,3 +78,4 @@ is($HashOrArray->validate(50), 'Validation failed for \'ArrayRef\' failed with value 50 and Validation failed for \'HashRef\' failed with value 50 in (ArrayRef|HashRef)', '... (ArrayRef | HashRef) cannot accept Numbers'); +done_testing; diff --git a/t/040_type_constraints/009_union_types_and_coercions.t b/t/040_type_constraints/009_union_types_and_coercions.t index 20690d9..88be3b6 100644 --- a/t/040_type_constraints/009_union_types_and_coercions.t +++ b/t/040_type_constraints/009_union_types_and_coercions.t @@ -9,11 +9,9 @@ use Test::Exception; BEGIN { eval "use IO::String; use IO::File;"; plan skip_all => "IO::String and IO::File are required for this test" if $@; - plan tests => 28; } - { package Email::Moose; use Moose; @@ -158,5 +156,4 @@ BEGIN { is($email->raw_body, $fh, '... and it is the one we expected'); } - - +done_testing; diff --git a/t/040_type_constraints/010_misc_type_tests.t b/t/040_type_constraints/010_misc_type_tests.t index 2cf0985..65987b6 100644 --- a/t/040_type_constraints/010_misc_type_tests.t +++ b/t/040_type_constraints/010_misc_type_tests.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 11; +use Test::More; use Test::Exception; BEGIN { @@ -65,3 +65,5 @@ ok $subtype2 => 'made a subtype of our subtype'; "correct error thrown" ); } + +done_testing; diff --git a/t/040_type_constraints/011_container_type_constraint.t b/t/040_type_constraints/011_container_type_constraint.t index c27d4b8..b349f93 100644 --- a/t/040_type_constraints/011_container_type_constraint.t +++ b/t/040_type_constraints/011_container_type_constraint.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 24; +use Test::More; use Test::Exception; BEGIN { @@ -71,3 +71,5 @@ ok(!$array_of_array_of_ints->check( my $param_type = $anon_type->type_parameter; isa_ok( $param_type, 'Moose::Meta::TypeConstraint::Class' ); } + +done_testing; diff --git a/t/040_type_constraints/012_container_type_coercion.t b/t/040_type_constraints/012_container_type_coercion.t index f6237e8..9a4c98d 100644 --- a/t/040_type_constraints/012_container_type_coercion.t +++ b/t/040_type_constraints/012_container_type_coercion.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 10; +use Test::More; use Test::Exception; BEGIN { @@ -65,4 +65,4 @@ isa_ok($foo, 'Foo'); is_deeply([ sort @{$foo->bar} ], [ 1, 2, 3 ], '... our coercion worked!'); - +done_testing; diff --git a/t/040_type_constraints/013_advanced_type_creation.t b/t/040_type_constraints/013_advanced_type_creation.t index 0a40a9f..8de07c9 100644 --- a/t/040_type_constraints/013_advanced_type_creation.t +++ b/t/040_type_constraints/013_advanced_type_creation.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 33; +use Test::More; use Test::Exception; BEGIN { @@ -97,5 +97,4 @@ ok(!$array_of_array_of_array_of_ints->check( [[[ 1, 2, 3 ]], [[ qw/foo bar/ ]]] ), '... [[[ 1, 2, 3 ]], [[ qw/foo bar/ ]]] failed successfully'); - - +done_testing; diff --git a/t/040_type_constraints/014_type_notation_parser.t b/t/040_type_constraints/014_type_notation_parser.t index bf48b5f..a62e24a 100644 --- a/t/040_type_constraints/014_type_notation_parser.t +++ b/t/040_type_constraints/014_type_notation_parser.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 41; +use Test::More; BEGIN { use_ok("Moose::Util::TypeConstraints"); @@ -103,3 +103,5 @@ ok(!Moose::Util::TypeConstraints::_detect_type_constraint_union($_), '... this correctly split the union (' . $_ . ')' ) for keys %split_tests; } + +done_testing; diff --git a/t/040_type_constraints/015_enum.t b/t/040_type_constraints/015_enum.t index 931e15d..4eaa818 100644 --- a/t/040_type_constraints/015_enum.t +++ b/t/040_type_constraints/015_enum.t @@ -28,11 +28,6 @@ my @invalid_metacharacters = qw/< > & % $ @ ! ~ `/; push @invalid_metacharacters, qw/.* fish(sticks)? atreides/; push @invalid_metacharacters, '^1?$|^(11+?)\1+$'; -plan tests => @valid_letters + @invalid_letters - + @valid_languages + @invalid_languages - + @valid_metacharacters + @invalid_metacharacters - + @valid_languages + 10; - Moose::Util::TypeConstraints->export_type_constraints_as_functions(); ok(Letter($_), "'$_' is a letter") for @valid_letters; @@ -66,3 +61,4 @@ ok( !$anon_enum->is_a_type_of('Object'), 'enum not type of Object'); ok( !$anon_enum->is_subtype_of('ThisTypeDoesNotExist'), 'enum not a subtype of nonexistant type'); ok( !$anon_enum->is_a_type_of('ThisTypeDoesNotExist'), 'enum not type of nonexistant type'); +done_testing; diff --git a/t/040_type_constraints/016_subtyping_parameterized_types.t b/t/040_type_constraints/016_subtyping_parameterized_types.t index 81d7ff1..993c63d 100644 --- a/t/040_type_constraints/016_subtyping_parameterized_types.t +++ b/t/040_type_constraints/016_subtyping_parameterized_types.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 39; +use Test::More; use Test::Exception; BEGIN { @@ -119,3 +119,5 @@ lives_ok { as 'SubOfMyArrayRef[Str]'; }, qr/Str is not a subtype of BiggerInt/, 'Failed to parameterize with a bad type parameter'; } + +done_testing; diff --git a/t/040_type_constraints/017_subtyping_union_types.t b/t/040_type_constraints/017_subtyping_union_types.t index 626a4bb..b76ae7c 100644 --- a/t/040_type_constraints/017_subtyping_union_types.t +++ b/t/040_type_constraints/017_subtyping_union_types.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 21; +use Test::More; use Test::Exception; BEGIN { @@ -66,4 +66,4 @@ lives_ok { ok(!$t->check(1), '... validated it correctly'); } - +done_testing; diff --git a/t/040_type_constraints/018_custom_parameterized_types.t b/t/040_type_constraints/018_custom_parameterized_types.t index 2de911b..c4969e5 100644 --- a/t/040_type_constraints/018_custom_parameterized_types.t +++ b/t/040_type_constraints/018_custom_parameterized_types.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 28; +use Test::More; use Test::Exception; BEGIN { @@ -84,3 +84,4 @@ dies_ok { ); } 'non-containers cannot be parameterized'; +done_testing; diff --git a/t/040_type_constraints/019_coerced_parameterized_types.t b/t/040_type_constraints/019_coerced_parameterized_types.t index 724b1c0..84de514 100644 --- a/t/040_type_constraints/019_coerced_parameterized_types.t +++ b/t/040_type_constraints/019_coerced_parameterized_types.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 11; +use Test::More; use Test::Exception; BEGIN { @@ -56,3 +56,4 @@ ok($evenlist->check(MyList->new(10, 20, 30, 40)), '... validated it correctly (p ok(!$evenlist->check(MyList->new(10, "two")), '... validated it correctly (fail)'); ok(!$evenlist->check([10, 20]), '... validated it correctly (fail)'); +done_testing; diff --git a/t/040_type_constraints/020_class_type_constraint.t b/t/040_type_constraints/020_class_type_constraint.t index ec6bd50..64aff96 100644 --- a/t/040_type_constraints/020_class_type_constraint.t +++ b/t/040_type_constraints/020_class_type_constraint.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 20; +use Test::More; use Test::Exception; BEGIN { @@ -58,3 +58,4 @@ ok( $type->equals(Moose::Meta::TypeConstraint::Class->new( name => "Oink", class ok( !$type->equals(Moose::Meta::TypeConstraint::Class->new( name => "__ANON__", class => "Bar" )), "doesn't equal other anon constraint" ); ok( $type->is_subtype_of(Moose::Meta::TypeConstraint::Class->new( name => "__ANON__", class => "Bar" )), "subtype of other anon constraint" ); +done_testing; diff --git a/t/040_type_constraints/021_maybe_type_constraint.t b/t/040_type_constraints/021_maybe_type_constraint.t index 233a17f..4974e09 100644 --- a/t/040_type_constraints/021_maybe_type_constraint.t +++ b/t/040_type_constraints/021_maybe_type_constraint.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 36; +use Test::More; use Test::Exception; use Moose::Util::TypeConstraints; @@ -131,3 +131,5 @@ ok !$Maybe_Int->check("a") throws_ok sub { $obj->Maybe_Int("a") }, qr/Attribute \(Maybe_Int\) does not pass the type constraint/ => 'failed assigned ("a")'; + +done_testing; diff --git a/t/040_type_constraints/022_custom_type_errors.t b/t/040_type_constraints/022_custom_type_errors.t index c3599b4..f570474 100644 --- a/t/040_type_constraints/022_custom_type_errors.t +++ b/t/040_type_constraints/022_custom_type_errors.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More; use Test::Exception; { @@ -57,3 +57,4 @@ throws_ok { $gimp->leg_count } qr/This number \(0\) is not less than ten!/, 'gave custom supertype error message on lazy set to 0'; +done_testing; diff --git a/t/040_type_constraints/023_types_and_undef.t b/t/040_type_constraints/023_types_and_undef.t index 32921b8..1c2e7ee 100644 --- a/t/040_type_constraints/023_types_and_undef.t +++ b/t/040_type_constraints/023_types_and_undef.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 54; +use Test::More; use Test::Exception; - { package Foo; use Moose; @@ -108,6 +107,4 @@ dies_ok { $foo->v_lazy_Number() } '... undef is NOT a Foo->Number'; dies_ok { $foo->v_lazy_Str() } '... undef is NOT a Foo->Str'; dies_ok { $foo->v_lazy_String() } '... undef is NOT a Foo->String'; - - - +done_testing; diff --git a/t/040_type_constraints/024_role_type_constraint.t b/t/040_type_constraints/024_role_type_constraint.t index 6273f54..163bfca 100644 --- a/t/040_type_constraints/024_role_type_constraint.t +++ b/t/040_type_constraints/024_role_type_constraint.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 18; +use Test::More; use Test::Exception; BEGIN { @@ -64,3 +64,4 @@ ok( $type->equals(Moose::Meta::TypeConstraint::Role->new( name => "Oink", role = ok( !$type->equals(Moose::Meta::TypeConstraint::Role->new( name => "__ANON__", role => "Bar" )), "doesn't equal other anon constraint" ); ok( $type->is_subtype_of(Moose::Meta::TypeConstraint::Role->new( name => "__ANON__", role => "Bar" )), "subtype of other anon constraint" ); +done_testing; diff --git a/t/040_type_constraints/025_type_coersion_on_lazy_attributes.t b/t/040_type_constraints/025_type_coersion_on_lazy_attributes.t index 3af0b5c..a935ffc 100644 --- a/t/040_type_constraints/025_type_coersion_on_lazy_attributes.t +++ b/t/040_type_constraints/025_type_coersion_on_lazy_attributes.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 2; +use Test::More; { package SomeClass; @@ -31,3 +31,4 @@ my $attr = SomeClass->meta->get_attribute('foo'); is($attr->get_value(SomeClass->new()), 'Six'); is(SomeClass->new()->foo, 'Six'); +done_testing; diff --git a/t/040_type_constraints/026_normalize_type_name.t b/t/040_type_constraints/026_normalize_type_name.t index 6379db3..1644931 100644 --- a/t/040_type_constraints/026_normalize_type_name.t +++ b/t/040_type_constraints/026_normalize_type_name.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 37; +use Test::More; use Test::Exception; BEGIN { @@ -149,3 +149,5 @@ is $union1->name, $union2->name, 'names match'; is $union1->name, $union3->name, 'names match'; is $union2->name, $union3->name, 'names match'; + +done_testing; diff --git a/t/040_type_constraints/027_parameterize_from.t b/t/040_type_constraints/027_parameterize_from.t index 3fd85f7..beab5b8 100644 --- a/t/040_type_constraints/027_parameterize_from.t +++ b/t/040_type_constraints/027_parameterize_from.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 12; +use Test::More; use Test::Exception; BEGIN { @@ -77,3 +77,5 @@ throws_ok sub { }, qr/Attribute \(from_parameterizable\) does not pass the type constraint/ => 'from_parameterizable throws expected error'; + +done_testing; diff --git a/t/040_type_constraints/029_define_type_twice_throws.t b/t/040_type_constraints/029_define_type_twice_throws.t index 190f123..cbec2e2 100644 --- a/t/040_type_constraints/029_define_type_twice_throws.t +++ b/t/040_type_constraints/029_define_type_twice_throws.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 2; +use Test::More; use Test::Exception; BEGIN { @@ -24,3 +24,4 @@ throws_ok { subtype 'MySubType' => as 'Int' => where { 1 }; } qr/cannot be created again/, 'Trying to create same type twice throws'; +done_testing; diff --git a/t/040_type_constraints/030_class_subtypes.t b/t/040_type_constraints/030_class_subtypes.t index 959b007..bce023e 100644 --- a/t/040_type_constraints/030_class_subtypes.t +++ b/t/040_type_constraints/030_class_subtypes.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 26; +use Test::More; use Test::Exception; use Moose::Util::TypeConstraints; @@ -139,3 +139,5 @@ throws_ok { lives_ok { Quux::Ier->new(age => (bless {}, 'Negative')) }; + +done_testing; diff --git a/t/040_type_constraints/031_subtype_auto_vivify_parent.t b/t/040_type_constraints/031_subtype_auto_vivify_parent.t index 5bd8f7a..c796198 100644 --- a/t/040_type_constraints/031_subtype_auto_vivify_parent.t +++ b/t/040_type_constraints/031_subtype_auto_vivify_parent.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 4; +use Test::More; use Moose::Util::TypeConstraints; @@ -29,3 +29,5 @@ ok( $type->parent, 'type has a parent type' ); is( $type->parent->name, 'Foo', 'parent type is Foo' ); isa_ok( $type->parent, 'Moose::Meta::TypeConstraint::Class', 'parent type constraint is a class type' ); + +done_testing; diff --git a/t/040_type_constraints/032_throw_error.t b/t/040_type_constraints/032_throw_error.t index 2d15a06..662d327 100644 --- a/t/040_type_constraints/032_throw_error.t +++ b/t/040_type_constraints/032_throw_error.t @@ -1,7 +1,7 @@ use strict; use warnings; -use Test::More tests => 1; +use Test::More; use Moose::Util::TypeConstraints; @@ -10,3 +10,5 @@ eval { Moose::Util::TypeConstraints::create_type_constraint_union() }; like( $@, qr/\QYou must pass in at least 2 type names to make a union/, 'can throw a proper error without Moose being loaded by the caller' ); + +done_testing; diff --git a/t/040_type_constraints/033_type_names.t b/t/040_type_constraints/033_type_names.t index e719866..0579ebb 100644 --- a/t/040_type_constraints/033_type_names.t +++ b/t/040_type_constraints/033_type_names.t @@ -1,7 +1,7 @@ use strict; use warnings; -use Test::More tests => 6; +use Test::More; use Test::Exception; use Moose::Meta::TypeConstraint; @@ -34,3 +34,5 @@ is( Moose::Util::TypeConstraints::find_or_parse_type_constraint('ArrayRef[In-val is( Moose::Util::TypeConstraints::find_or_parse_type_constraint('ArrayRef[Va.lid]'), 'ArrayRef[Va.lid]', 'find_or_parse_type_constraint returns name for valid name' ); + +done_testing; diff --git a/t/040_type_constraints/034_duck_types.t b/t/040_type_constraints/034_duck_types.t index 35c9abe..5682793 100644 --- a/t/040_type_constraints/034_duck_types.t +++ b/t/040_type_constraints/034_duck_types.t @@ -2,7 +2,7 @@ use strict; use warnings; -use Test::More tests => 5; +use Test::More; use Test::Exception; { @@ -78,3 +78,5 @@ lives_ok { DucktypeTest->new( duck => RubberDuck->new ) } # try with the other constraint form lives_ok { DucktypeTest->new( other_swan => Swan->new ) } 'but a Swan can honk'; + +done_testing; diff --git a/t/040_type_constraints/035_duck_type_handles.t b/t/040_type_constraints/035_duck_type_handles.t index 8ac0cc1..366ce2d 100644 --- a/t/040_type_constraints/035_duck_type_handles.t +++ b/t/040_type_constraints/035_duck_type_handles.t @@ -2,7 +2,7 @@ use strict; use warnings; -use Test::More tests => 2; +use Test::More; use Test::Exception; my @phonograph; @@ -44,3 +44,4 @@ is_deeply([splice @phonograph], ['quack']); $t->walk; is_deeply([splice @phonograph], ['footsteps']); +done_testing; diff --git a/t/040_type_constraints/036_match_type_operator.t b/t/040_type_constraints/036_match_type_operator.t index f5fa5ad..d969b6a 100644 --- a/t/040_type_constraints/036_match_type_operator.t +++ b/t/040_type_constraints/036_match_type_operator.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 25; +use Test::More; use Test::Exception; use Moose::Util::TypeConstraints; @@ -223,6 +223,4 @@ throws_ok { not_enough_matches( [] ) } qr/No cases matched for /, '... not enough matches'; - - - +done_testing; diff --git a/t/050_metaclasses/001_custom_attr_meta_with_roles.t b/t/050_metaclasses/001_custom_attr_meta_with_roles.t index 2d89151..a2d1495 100644 --- a/t/050_metaclasses/001_custom_attr_meta_with_roles.t +++ b/t/050_metaclasses/001_custom_attr_meta_with_roles.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 3; +use Test::More; use Test::Exception; - { package My::Custom::Meta::Attr; use Moose; @@ -40,4 +39,4 @@ ok($c->meta->has_attribute('bling_bling'), '... got the attribute'); isa_ok($c->meta->get_attribute('bling_bling'), 'My::Custom::Meta::Attr'); - +done_testing; diff --git a/t/050_metaclasses/002_custom_attr_meta_as_role.t b/t/050_metaclasses/002_custom_attr_meta_as_role.t index 96c0f38..55ee9c6 100644 --- a/t/050_metaclasses/002_custom_attr_meta_as_role.t +++ b/t/050_metaclasses/002_custom_attr_meta_as_role.t @@ -3,11 +3,9 @@ use strict; use warnings; -use Test::More tests => 2; +use Test::More; use Test::Exception; -; - lives_ok { package MooseX::Attribute::Test; use Moose::Role; @@ -20,3 +18,5 @@ lives_ok { extends 'Moose::Meta::Attribute'; with 'MooseX::Attribute::Test'; } 'custom attribute metaclass extending role is okay'; + +done_testing; diff --git a/t/050_metaclasses/003_moose_w_metaclass.t b/t/050_metaclasses/003_moose_w_metaclass.t index 2a880d9..0749068 100644 --- a/t/050_metaclasses/003_moose_w_metaclass.t +++ b/t/050_metaclasses/003_moose_w_metaclass.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 4; +use Test::More; use Test::Exception; - =pod This test demonstrates that Moose will respect @@ -54,3 +53,5 @@ isa_ok(Foo->meta, 'Foo::Meta'); qr/^Bar already has a metaclass, but it does not inherit Moose::Meta::Class/, '... got the right error too'); } + +done_testing; diff --git a/t/050_metaclasses/004_moose_for_meta.t b/t/050_metaclasses/004_moose_for_meta.t index 003e2f7..bd415ee 100644 --- a/t/050_metaclasses/004_moose_for_meta.t +++ b/t/050_metaclasses/004_moose_for_meta.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 16; +use Test::More; use Test::Exception; - =pod This test demonstrates the ability to extend @@ -77,3 +76,4 @@ is_deeply( ok($attr->has_accessor, '... the attribute does have an accessor (as expected)'); } +done_testing; diff --git a/t/050_metaclasses/010_extending_and_embedding_back_compat.t b/t/050_metaclasses/010_extending_and_embedding_back_compat.t index 6ec3a5a..4f0f142 100644 --- a/t/050_metaclasses/010_extending_and_embedding_back_compat.t +++ b/t/050_metaclasses/010_extending_and_embedding_back_compat.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 7; +use Test::More; use Test::Exception; - BEGIN { package MyFramework::Base; use Moose; @@ -53,6 +52,4 @@ isa_ok($obj, 'Moose::Object'); is($obj->foo, 10, '... got the right value'); - - - +done_testing; diff --git a/t/050_metaclasses/011_init_meta.t b/t/050_metaclasses/011_init_meta.t index 96290dd..506c3c1 100644 --- a/t/050_metaclasses/011_init_meta.t +++ b/t/050_metaclasses/011_init_meta.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 4; +use Test::More; use Moose (); @@ -17,3 +17,5 @@ isa_ok( $meta, 'Moose::Meta::Class' ); isa_ok( Foo->meta, 'Moose::Meta::Class' ); is($meta, Foo->meta, '... our metas are the same'); + +done_testing; diff --git a/t/050_metaclasses/012_moose_exporter.t b/t/050_metaclasses/012_moose_exporter.t index 93ec1bb..c6c1f4d 100644 --- a/t/050_metaclasses/012_moose_exporter.t +++ b/t/050_metaclasses/012_moose_exporter.t @@ -8,7 +8,6 @@ use Test::Exception; BEGIN { eval "use Test::Output;"; plan skip_all => "Test::Output is required for this test" if $@; - plan tests => 65; } @@ -389,3 +388,5 @@ BEGIN { ok( ! UseAllOptions->can($_), "UseAllOptions::$_ has been unimported" ) for qw( with_meta1 with_meta2 with_caller1 with_caller2 as_is1 ); } + +done_testing; diff --git a/t/050_metaclasses/013_metaclass_traits.t b/t/050_metaclasses/013_metaclass_traits.t index 9211f33..b47cea4 100644 --- a/t/050_metaclasses/013_metaclass_traits.t +++ b/t/050_metaclasses/013_metaclass_traits.t @@ -5,7 +5,7 @@ use warnings; use lib 't/lib', 'lib'; -use Test::More tests => 32; +use Test::More; use Test::Exception; { @@ -220,3 +220,5 @@ lives_ok { is( $instance->an_attr, 'value', 'Can get value' ); } 'Can create instance and access attributes'; + +done_testing; diff --git a/t/050_metaclasses/014_goto_moose_import.t b/t/050_metaclasses/014_goto_moose_import.t index facf3e4..06437ac 100644 --- a/t/050_metaclasses/014_goto_moose_import.t +++ b/t/050_metaclasses/014_goto_moose_import.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More; use Test::Exception; # Some packages out in the wild cooperate with Moose by using goto @@ -80,3 +80,5 @@ ok( ! Bar->can('has'), ok( Bar->can('meta'), 'Bar has a meta method' ); isa_ok( Bar->meta(), 'Moose::Meta::Class' ); + +done_testing; diff --git a/t/050_metaclasses/015_metarole.t b/t/050_metaclasses/015_metarole.t index 5cd2dd7..2020949 100644 --- a/t/050_metaclasses/015_metarole.t +++ b/t/050_metaclasses/015_metarole.t @@ -5,7 +5,7 @@ use warnings; use lib 't/lib', 'lib'; -use Test::More tests => 91; +use Test::More; use Test::Exception; use Moose::Util::MetaRole; @@ -665,3 +665,5 @@ TODO: ); } } + +done_testing; diff --git a/t/050_metaclasses/016_metarole_w_metaclass_pm.t b/t/050_metaclasses/016_metarole_w_metaclass_pm.t index 4db435e..8a77dbd 100644 --- a/t/050_metaclasses/016_metarole_w_metaclass_pm.t +++ b/t/050_metaclasses/016_metarole_w_metaclass_pm.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More; use Moose::Util::MetaRole; @@ -107,3 +107,5 @@ sub has_superclass { ok( $supers{$parent}, $desc ); } + +done_testing; diff --git a/t/050_metaclasses/017_use_base_of_moose.t b/t/050_metaclasses/017_use_base_of_moose.t index 2fedbdc..5f7aac9 100644 --- a/t/050_metaclasses/017_use_base_of_moose.t +++ b/t/050_metaclasses/017_use_base_of_moose.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 4; +use Test::More; use Test::Exception; { @@ -35,3 +35,5 @@ is($child->attr, "ibute", "getter inherited properly"); $child->attr("ition"); is($child->attr, "ition", "setter inherited properly"); + +done_testing; diff --git a/t/050_metaclasses/018_throw_error.t b/t/050_metaclasses/018_throw_error.t index 656bbce..35df769 100644 --- a/t/050_metaclasses/018_throw_error.t +++ b/t/050_metaclasses/018_throw_error.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 24; +use Test::More; use Test::Exception; { @@ -154,3 +154,5 @@ ok( Foo::Sub::Sub->meta->error_class->meta->does_role('Role::Foo'), q{Foo::Sub::Sub's error_class does Role::Foo} ); ok( Foo::Sub::Sub->meta->error_class->isa('Moose::Error::Croak'), q{Foo::Sub::Sub's error_class now subclasses Moose::Error::Croak} ); + +done_testing; diff --git a/t/050_metaclasses/019_create_anon_with_required_attr.t b/t/050_metaclasses/019_create_anon_with_required_attr.t index 5603e1a..70bddd6 100644 --- a/t/050_metaclasses/019_create_anon_with_required_attr.t +++ b/t/050_metaclasses/019_create_anon_with_required_attr.t @@ -6,7 +6,7 @@ use strict; use warnings; -use Test::More tests => 15; +use Test::More; use Test::Exception; { @@ -85,3 +85,4 @@ dies_ok { die $@ if $@; } 'failed to use trait without required attr'; +done_testing; diff --git a/t/050_metaclasses/020_metaclass_parameterized_traits.t b/t/050_metaclasses/020_metaclass_parameterized_traits.t index ac6f79a..dec5952 100644 --- a/t/050_metaclasses/020_metaclass_parameterized_traits.t +++ b/t/050_metaclasses/020_metaclass_parameterized_traits.t @@ -1,7 +1,7 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 5; +use Test::More; { package My::Trait; @@ -45,3 +45,4 @@ is($other_meta->reversed, 'ssalC::rehtO::yM', 'parameterized trait applied'); ok(!$other_meta->can('enam'), "the method was not installed under the other class' alias"); ok(!$other_meta->can('reversed_name'), "the method was not installed under the original name when that was excluded"); +done_testing; diff --git a/t/050_metaclasses/021_export_with_prototype.t b/t/050_metaclasses/021_export_with_prototype.t index 531f4c7..6c8f5e2 100644 --- a/t/050_metaclasses/021_export_with_prototype.t +++ b/t/050_metaclasses/021_export_with_prototype.t @@ -2,7 +2,7 @@ use lib "t/lib"; package MyExporter::User; use MyExporter; -use Test::More (tests => 4); +use Test::More; use Test::Exception; lives_and { @@ -18,3 +18,5 @@ lives_and { is($caller, 'MyExporter', "As-is prototype code gets called from MyMooseX"); }; } "check function with prototype"; + +done_testing; diff --git a/t/050_metaclasses/022_new_metaclass.t b/t/050_metaclasses/022_new_metaclass.t index 5d98c50..db42185 100644 --- a/t/050_metaclasses/022_new_metaclass.t +++ b/t/050_metaclasses/022_new_metaclass.t @@ -1,7 +1,7 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 2; +use Test::More; do { package My::Meta::Class; @@ -25,3 +25,4 @@ do { is(My::Class->meta->meta->name, 'My::Meta::Class'); is(My::Class::Aliased->meta->meta->name, 'My::Meta::Class'); +done_testing; diff --git a/t/050_metaclasses/023_easy_init_meta.t b/t/050_metaclasses/023_easy_init_meta.t index 200d734..148d51e 100644 --- a/t/050_metaclasses/023_easy_init_meta.t +++ b/t/050_metaclasses/023_easy_init_meta.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 13; +use Test::More; use Test::Moose qw(does_ok); { @@ -118,3 +118,5 @@ use Test::Moose qw(does_ok); ::isa_ok(Foo2::Role->meta, 'Moose::Meta::Role'); ::does_ok(Foo2::Role->meta, 'Foo::Trait::Class'); } + +done_testing; diff --git a/t/050_metaclasses/040_moose_nonmoose_metatrait_init_order.t b/t/050_metaclasses/040_moose_nonmoose_metatrait_init_order.t index bfca0aa..8b35d87 100644 --- a/t/050_metaclasses/040_moose_nonmoose_metatrait_init_order.t +++ b/t/050_metaclasses/040_moose_nonmoose_metatrait_init_order.t @@ -17,7 +17,7 @@ use warnings; use base qw/SubClassUseBase/; } -use Test::More tests => 2; +use Test::More; use Moose::Util qw/find_meta does_role/; my $subsubclass_meta = Moose->init_meta( for_class => 'SubSubClassUseBase' ); @@ -26,3 +26,5 @@ ok does_role($subsubclass_meta, 'My::Role'), my $subclass_meta = find_meta('SubClassUseBase'); ok does_role($subclass_meta, 'My::Role'), 'SubClass metaclass does role from parent metaclass'; + +done_testing; diff --git a/t/050_metaclasses/041_moose_nonmoose_moose_chain_init_meta.t b/t/050_metaclasses/041_moose_nonmoose_moose_chain_init_meta.t index 674b825..ed12d4c 100644 --- a/t/050_metaclasses/041_moose_nonmoose_moose_chain_init_meta.t +++ b/t/050_metaclasses/041_moose_nonmoose_moose_chain_init_meta.t @@ -14,9 +14,11 @@ use warnings; use Moose; } -use Test::More tests => 1; +use Test::More; use Test::Exception; lives_ok { Moose->init_meta(for_class => 'SomeClass'); } 'Moose class => use base => Moose Class, then Moose->init_meta on middle class ok'; + +done_testing; diff --git a/t/060_compat/001_module_refresh_compat.t b/t/060_compat/001_module_refresh_compat.t index 93857cd..7ba1407 100644 --- a/t/060_compat/001_module_refresh_compat.t +++ b/t/060_compat/001_module_refresh_compat.t @@ -11,7 +11,6 @@ use Test::Exception; BEGIN { eval "use Module::Refresh;"; plan skip_all => "Module::Refresh is required for this test" if $@; - plan tests => 23; } =pod @@ -85,7 +84,4 @@ ok(TestBaz->isa('Foo'), '... TestBaz is a Foo'); unlink $test_module_file; - - - - +done_testing; diff --git a/t/060_compat/002_moose_respects_base.t b/t/060_compat/002_moose_respects_base.t index 2e37c9d..71789b3 100644 --- a/t/060_compat/002_moose_respects_base.t +++ b/t/060_compat/002_moose_respects_base.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 6; +use Test::More; use Test::Exception; - =pod This test demonstrates that Moose will respect @@ -47,3 +46,4 @@ isa_ok($baz, 'Baz'); isa_ok($baz, 'Foo'); isa_ok($baz, 'Moose::Object'); +done_testing; diff --git a/t/060_compat/003_foreign_inheritence.t b/t/060_compat/003_foreign_inheritence.t index f99cac9..0fdcb9b 100644 --- a/t/060_compat/003_foreign_inheritence.t +++ b/t/060_compat/003_foreign_inheritence.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 6; +use Test::More; use Test::Exception; - { package Elk; @@ -90,3 +89,4 @@ lives_ok { } 'Can subclass the same non-Moose class twice with different metaclasses'; +done_testing; diff --git a/t/060_compat/004_extends_nonmoose_that_isa_moose_with_metarole.t b/t/060_compat/004_extends_nonmoose_that_isa_moose_with_metarole.t index 19fe24e..78fe330 100644 --- a/t/060_compat/004_extends_nonmoose_that_isa_moose_with_metarole.t +++ b/t/060_compat/004_extends_nonmoose_that_isa_moose_with_metarole.t @@ -1,6 +1,6 @@ use strict; use warnings; -use Test::More tests => 18; +use Test::More; use Class::MOP (); { @@ -210,3 +210,4 @@ Class::MOP::remove_metaclass_by_name($_) Class::MOP::remove_metaclass_by_name($_) for qw( SubClassUseBase OtherSubClassUseBase ); +done_testing; diff --git a/t/070_native_traits/000_load.t b/t/070_native_traits/000_load.t index bf387c3..958f420 100644 --- a/t/070_native_traits/000_load.t +++ b/t/070_native_traits/000_load.t @@ -3,9 +3,9 @@ use strict; use warnings; -use Test::More tests => 7; - +use Test::More; use Moose (); + BEGIN { use_ok('Moose::Meta::Attribute::Native'); use_ok('Moose::Meta::Attribute::Native::Trait::Bool'); @@ -15,3 +15,5 @@ BEGIN { use_ok('Moose::Meta::Attribute::Native::Trait::Number'); use_ok('Moose::Meta::Attribute::Native::Trait::String'); } + +done_testing; diff --git a/t/070_native_traits/010_array_from_role.t b/t/070_native_traits/010_array_from_role.t index 80aac85..7f76c1a 100644 --- a/t/070_native_traits/010_array_from_role.t +++ b/t/070_native_traits/010_array_from_role.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 2; +use Test::More; use Test::Exception; { @@ -42,3 +42,5 @@ use Test::Exception; ::lives_ok{ with 'Bulkie::Role'; } '... this should work correctly'; } + +done_testing; diff --git a/t/070_native_traits/020_remove_attribute.t b/t/070_native_traits/020_remove_attribute.t index 49b2cba..5e9305d 100644 --- a/t/070_native_traits/020_remove_attribute.t +++ b/t/070_native_traits/020_remove_attribute.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 11; +use Test::More; use Test::Exception; { @@ -47,3 +47,5 @@ ok( !$page->can($_), "... our class no longer has the $_ method" ) for qw[ inc_counter reset_counter ]; + +done_testing; diff --git a/t/070_native_traits/100_collection_with_roles.t b/t/070_native_traits/100_collection_with_roles.t index 43ea86a..86547cf 100644 --- a/t/070_native_traits/100_collection_with_roles.t +++ b/t/070_native_traits/100_collection_with_roles.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 28; +use Test::More; { package Subject; @@ -120,3 +120,5 @@ is( $count->count, -1, 'Negative numbers' ); $count->inc_counter; is( $count->count, 0, 'Back to zero' ); + +done_testing; diff --git a/t/070_native_traits/201_trait_counter.t b/t/070_native_traits/201_trait_counter.t index 432ab29..adb745f 100644 --- a/t/070_native_traits/201_trait_counter.t +++ b/t/070_native_traits/201_trait_counter.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 16; +use Test::More; use Test::Moose 'does_ok'; { @@ -76,3 +76,4 @@ is_deeply( '... got the right handles methods' ); +done_testing; diff --git a/t/070_native_traits/202_trait_array.t b/t/070_native_traits/202_trait_array.t index 25afb92..fc8500f 100644 --- a/t/070_native_traits/202_trait_array.t +++ b/t/070_native_traits/202_trait_array.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 68; +use Test::More; use Test::Exception; use Test::Moose 'does_ok'; @@ -270,3 +270,5 @@ is_deeply( is( $options->type_constraint->type_parameter, 'Str', '... got the right container type' ); + +done_testing; diff --git a/t/070_native_traits/203_trait_hash.t b/t/070_native_traits/203_trait_hash.t index a7d77f4..1b621b5 100644 --- a/t/070_native_traits/203_trait_hash.t +++ b/t/070_native_traits/203_trait_hash.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 46; +use Test::More; use Test::Exception; use Test::Moose 'does_ok'; @@ -181,3 +181,5 @@ is_deeply( }, '... got the right hash elements' ); + +done_testing; diff --git a/t/070_native_traits/204_trait_number.t b/t/070_native_traits/204_trait_number.t index 48736f8..97a897a 100644 --- a/t/070_native_traits/204_trait_number.t +++ b/t/070_native_traits/204_trait_number.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 25; +use Test::More; use Test::Moose; { @@ -110,3 +110,4 @@ is_deeply( '... got the right handles mapping' ); +done_testing; diff --git a/t/070_native_traits/205_trait_list.t b/t/070_native_traits/205_trait_list.t index 8e6a37a..0501ee7 100644 --- a/t/070_native_traits/205_trait_list.t +++ b/t/070_native_traits/205_trait_list.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 43; +use Test::More; use Test::Exception; use Test::Moose 'does_ok'; @@ -165,3 +165,4 @@ dies_ok { } '... sort rejects arg of invalid type'; +done_testing; diff --git a/t/070_native_traits/207_trait_string.t b/t/070_native_traits/207_trait_string.t index 7c85ae8..2f3bae9 100644 --- a/t/070_native_traits/207_trait_string.t +++ b/t/070_native_traits/207_trait_string.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 22; +use Test::More; use Test::Moose 'does_ok'; my $uc; @@ -114,3 +114,4 @@ is_deeply( '... got the right handles methods' ); +done_testing; diff --git a/t/070_native_traits/208_trait_bool.t b/t/070_native_traits/208_trait_bool.t index ef92860..a5cb91f 100644 --- a/t/070_native_traits/208_trait_bool.t +++ b/t/070_native_traits/208_trait_bool.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More; { package Room; @@ -40,3 +40,4 @@ $room->flip_switch; ok( !$room->is_lit, 'toggle is_lit back to 0 again using ->flip_switch' ); ok( $room->is_dark, 'check if is_dark does the right thing' ); +done_testing; diff --git a/t/070_native_traits/209_trait_code.t b/t/070_native_traits/209_trait_code.t index 09159ae..842b323 100644 --- a/t/070_native_traits/209_trait_code.t +++ b/t/070_native_traits/209_trait_code.t @@ -1,7 +1,7 @@ use strict; use warnings; -use Test::More tests => 3; +use Test::More; { package Thingy; @@ -34,3 +34,5 @@ is($i, 0); $thingy->invoke_callback; is($i, 1); is($thingy->multiply(3), 6); + +done_testing; diff --git a/t/100_bugs/001_subtype_quote_bug.t b/t/100_bugs/001_subtype_quote_bug.t index f605e30..fa16554 100644 --- a/t/100_bugs/001_subtype_quote_bug.t +++ b/t/100_bugs/001_subtype_quote_bug.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 1; +use Test::More; =pod @@ -28,5 +28,9 @@ be well from now on. { package Object::Test; } -package Foo; -::use_ok('Moose'); +{ + package Foo; + ::use_ok('Moose'); +} + +done_testing; diff --git a/t/100_bugs/002_subtype_conflict_bug.t b/t/100_bugs/002_subtype_conflict_bug.t index 1dabe6c..1108723 100644 --- a/t/100_bugs/002_subtype_conflict_bug.t +++ b/t/100_bugs/002_subtype_conflict_bug.t @@ -5,9 +5,9 @@ use warnings; use lib 't/lib', 'lib'; -use Test::More tests => 2; - - +use Test::More; use_ok('MyMooseA'); -use_ok('MyMooseB'); \ No newline at end of file +use_ok('MyMooseB'); + +done_testing; diff --git a/t/100_bugs/003_Moose_Object_error.t b/t/100_bugs/003_Moose_Object_error.t index 37e20f3..a199d81 100644 --- a/t/100_bugs/003_Moose_Object_error.t +++ b/t/100_bugs/003_Moose_Object_error.t @@ -5,6 +5,8 @@ use warnings; use lib 't/lib', 'lib'; -use Test::More tests => 1; +use Test::More; -use_ok('MyMooseObject'); \ No newline at end of file +use_ok('MyMooseObject'); + +done_testing; diff --git a/t/100_bugs/004_subclass_use_base_bug.t b/t/100_bugs/004_subclass_use_base_bug.t index 4684ab3..3115307 100644 --- a/t/100_bugs/004_subclass_use_base_bug.t +++ b/t/100_bugs/004_subclass_use_base_bug.t @@ -3,9 +3,7 @@ use strict; use warnings; -use Test::More tests => 2; - - +use Test::More; =pod @@ -27,4 +25,6 @@ a metaclass initialized for it correctly. my $bar = Bar->new; isa_ok($bar, 'Bar'); -isa_ok($bar, 'Foo'); \ No newline at end of file +isa_ok($bar, 'Foo'); + +done_testing; diff --git a/t/100_bugs/005_inline_reader_bug.t b/t/100_bugs/005_inline_reader_bug.t index cc0c01e..b85925d 100644 --- a/t/100_bugs/005_inline_reader_bug.t +++ b/t/100_bugs/005_inline_reader_bug.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 1; +use Test::More; use Test::Exception; - =pod This was a bug, but it is fixed now. This @@ -29,3 +28,4 @@ test makes sure it does not creep back in. } '... this didnt die'; } +done_testing; diff --git a/t/100_bugs/006_handles_foreign_class_bug.t b/t/100_bugs/006_handles_foreign_class_bug.t index dc162f5..82bad20 100644 --- a/t/100_bugs/006_handles_foreign_class_bug.t +++ b/t/100_bugs/006_handles_foreign_class_bug.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 15; +use Test::More; use Test::Exception; { @@ -108,4 +108,4 @@ isa_ok($blart, 'Blart'); is($blart->a, 'Foo::a', '... got the right delgated value'); - +done_testing; diff --git a/t/100_bugs/007_reader_precedence_bug.t b/t/100_bugs/007_reader_precedence_bug.t index 1aa0abd..25e3b37 100644 --- a/t/100_bugs/007_reader_precedence_bug.t +++ b/t/100_bugs/007_reader_precedence_bug.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 3; +use Test::More; { package Foo; @@ -20,6 +20,4 @@ use Test::More tests => 3; is($foo->$reader, 10, "Reader works as expected"); } - - - +done_testing; diff --git a/t/100_bugs/009_augment_recursion_bug.t b/t/100_bugs/009_augment_recursion_bug.t index 11cd728..3be9002 100644 --- a/t/100_bugs/009_augment_recursion_bug.t +++ b/t/100_bugs/009_augment_recursion_bug.t @@ -3,8 +3,7 @@ use strict; use warnings; -use Test::More tests => 3; - +use Test::More; { @@ -47,3 +46,4 @@ is($baz->foo, 'Foo::foo(Baz::foo and Foo::foo())', '... got the right value for 1 augmented subclass calling non-augmented subclass'); +done_testing; diff --git a/t/100_bugs/010_immutable_n_default_x2.t b/t/100_bugs/010_immutable_n_default_x2.t index 5cc2fb0..b25f908 100644 --- a/t/100_bugs/010_immutable_n_default_x2.t +++ b/t/100_bugs/010_immutable_n_default_x2.t @@ -3,8 +3,7 @@ use strict; use warnings; -use Test::More tests => 2; - +use Test::More; { @@ -38,3 +37,5 @@ is($Foo::foo_default_called, 1, "foo default was only called once during constru $foo->bar(); is($Foo::bar_default_called, 1, "bar default was only called once when lazy attribute is accessed"); + +done_testing; diff --git a/t/100_bugs/011_DEMOLISH_eats_exceptions.t b/t/100_bugs/011_DEMOLISH_eats_exceptions.t index 4180fe6..4932fe2 100644 --- a/t/100_bugs/011_DEMOLISH_eats_exceptions.t +++ b/t/100_bugs/011_DEMOLISH_eats_exceptions.t @@ -4,7 +4,7 @@ use strict; use warnings; use FindBin; -use Test::More tests => 144; +use Test::More; use Test::Exception; use Moose::Util::TypeConstraints; @@ -149,5 +149,4 @@ sub check_em { } } -1; - +done_testing; diff --git a/t/100_bugs/012_DEMOLISH_eats_mini.t b/t/100_bugs/012_DEMOLISH_eats_mini.t index 27ac51f..e4b03c4 100644 --- a/t/100_bugs/012_DEMOLISH_eats_mini.t +++ b/t/100_bugs/012_DEMOLISH_eats_mini.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 12; +use Test::More; use Test::Exception; @@ -98,3 +98,4 @@ use Test::Exception; if Quux->meta->is_mutable } +done_testing; diff --git a/t/100_bugs/013_lazybuild_required_undef.t b/t/100_bugs/013_lazybuild_required_undef.t index 6a6d4fc..d90ec05 100644 --- a/t/100_bugs/013_lazybuild_required_undef.t +++ b/t/100_bugs/013_lazybuild_required_undef.t @@ -17,7 +17,7 @@ has 'bar' => ( isa => 'Int | Undef', is => 'rw', coerce => 1 ); sub _build_foo { undef } package main; -use Test::More tests => 4; +use Test::More; ok ( !defined(Foo->new->bar), 'NonLazyBuild: Undef default' ); ok ( !defined(Foo->new->bar(undef)), 'NonLazyBuild: Undef explicit' ); @@ -27,5 +27,4 @@ ok ( !defined(Foo->new->foo), 'LazyBuild: Undef default/lazy_build' ); ## This test fails at the time of creation. ok ( !defined(Foo->new->foo(undef)), 'LazyBuild: Undef explicit' ); - -1; +done_testing; diff --git a/t/100_bugs/014_DEMOLISHALL.t b/t/100_bugs/014_DEMOLISHALL.t index 1cead12..500c06d 100644 --- a/t/100_bugs/014_DEMOLISHALL.t +++ b/t/100_bugs/014_DEMOLISHALL.t @@ -1,7 +1,7 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 5; +use Test::More; my @called; @@ -52,3 +52,4 @@ do { is_deeply([splice @called], ['Child::DEMOLISHALL', 'Class::DEMOLISHALL', 'Child::DEMOLISH', 'Class::DEMOLISH']); +done_testing; diff --git a/t/100_bugs/016_inheriting_from_roles.t b/t/100_bugs/016_inheriting_from_roles.t index aa6a86b..c001dbb 100644 --- a/t/100_bugs/016_inheriting_from_roles.t +++ b/t/100_bugs/016_inheriting_from_roles.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 1; +use Test::More; use Test::Exception; - { package My::Role; use Moose::Role; @@ -21,3 +20,5 @@ use Test::Exception; } qr/You cannot inherit from a Moose Role \(My\:\:Role\)/, '... this croaks correctly'; } + +done_testing; diff --git a/t/100_bugs/017_type_constraint_messages.t b/t/100_bugs/017_type_constraint_messages.t index e5bee1e..526130d 100644 --- a/t/100_bugs/017_type_constraint_messages.t +++ b/t/100_bugs/017_type_constraint_messages.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 3; +use Test::More; use Test::Exception; - # RT #37569 { @@ -71,3 +70,4 @@ throws_ok { qr/Attribute \(nt\) does not pass the type constraint because: blessed/, '... got the right error message'; +done_testing; diff --git a/t/100_bugs/018_immutable_metaclass_does_role.t b/t/100_bugs/018_immutable_metaclass_does_role.t index eccb1d9..d59e8db 100644 --- a/t/100_bugs/018_immutable_metaclass_does_role.t +++ b/t/100_bugs/018_immutable_metaclass_does_role.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 36; +use Test::More; use Test::Exception; - BEGIN { package MyRole; use Moose::Role; @@ -90,3 +89,4 @@ is( $a->meta->foo, 'i am foo', '... foo method returns expected value' ); ok( MyClass->meta->meta->does_role('MyRole'), 'metaclass does MyRole' ); is( MyClass->meta->foo, 'i am foo', '... foo method returns expected value' ); +done_testing; diff --git a/t/100_bugs/019_moose_octal_defaults.t b/t/100_bugs/019_moose_octal_defaults.t index 63614af..a05a170 100644 --- a/t/100_bugs/019_moose_octal_defaults.t +++ b/t/100_bugs/019_moose_octal_defaults.t @@ -1,5 +1,5 @@ #!/usr/bin/env perl -use Test::More tests => 10; +use Test::More; { my $package = qq{ @@ -115,3 +115,5 @@ __PACKAGE__->meta->make_immutable; my $obj = Test::Moose::Go::Boom5->new; ::is( $obj->id, '0 but true', 'value is still the same' ); } + +done_testing; diff --git a/t/100_bugs/020_super_recursion.t b/t/100_bugs/020_super_recursion.t index 85d230c..6ad2904 100644 --- a/t/100_bugs/020_super_recursion.t +++ b/t/100_bugs/020_super_recursion.t @@ -1,7 +1,7 @@ use strict; use warnings; -use Test::More tests => 3; +use Test::More; { package A; @@ -65,3 +65,5 @@ use Test::More tests => 3; is( C->new->foo, 'c' ); is( C->new->bar, 'cb' ); is( C->new->baz, 'cba' ); + +done_testing; diff --git a/t/100_bugs/021_DEMOLISHALL_shortcutted.t b/t/100_bugs/021_DEMOLISHALL_shortcutted.t index 531ae09..7282c12 100644 --- a/t/100_bugs/021_DEMOLISHALL_shortcutted.t +++ b/t/100_bugs/021_DEMOLISHALL_shortcutted.t @@ -19,7 +19,7 @@ sub DEMOLISH {}; package main; -use Test::More tests => 2; +use Test::More; my $m = DemolishAll::WithDemolish->new; undef $m; @@ -29,4 +29,4 @@ $m = DemolishAll::WithoutDemolish->new; undef $m; is ( $Role::DemolishAll::ok, 1, 'DemolishAll wo/ explicit DEMOLISH sub' ); -1; +done_testing; diff --git a/t/100_bugs/022_role_caller.t b/t/100_bugs/022_role_caller.t index 474179e..11ede55 100644 --- a/t/100_bugs/022_role_caller.t +++ b/t/100_bugs/022_role_caller.t @@ -11,7 +11,7 @@ package MyClass2; use Moose; with 'MyRole'; no Moose; package main; -use Test::More tests => 4; +use Test::More; { local $TODO = 'Role composition does not clone methods yet'; @@ -23,3 +23,5 @@ use Test::More tests => 4; isnt(MyClass1->foo, "MyClass2::foo", "role method is not confused with other class" ); isnt(MyClass2->foo, "MyClass1::foo", "role method is not confused with other class" ); + +done_testing; diff --git a/t/100_bugs/023_DEMOLISH_fails_without_metaclass.t b/t/100_bugs/023_DEMOLISH_fails_without_metaclass.t index 7e9b9b9..a061244 100644 --- a/t/100_bugs/023_DEMOLISH_fails_without_metaclass.t +++ b/t/100_bugs/023_DEMOLISH_fails_without_metaclass.t @@ -1,7 +1,7 @@ use strict; use warnings; -use Test::More tests => 2; +use Test::More; use Test::Exception; { @@ -32,3 +32,5 @@ Class::MOP::remove_metaclass_by_name('MyClass'); # help us prevent it happening in the future. lives_ok { $object->DESTROY } 'can call DESTROY on an object without a metaclass object in the CMOP cache (immutable version)'; + +done_testing; diff --git a/t/100_bugs/024_anon_method_metaclass.t b/t/100_bugs/024_anon_method_metaclass.t index b2c5674..01c5285 100644 --- a/t/100_bugs/024_anon_method_metaclass.t +++ b/t/100_bugs/024_anon_method_metaclass.t @@ -1,6 +1,6 @@ use strict; use warnings; -use Test::More tests => 10; +use Test::More; { package Ball; @@ -46,3 +46,5 @@ for ( 1, 2 ) { undef $method_meta; } + +done_testing; diff --git a/t/100_bugs/025_universal_methods_wrappable.t b/t/100_bugs/025_universal_methods_wrappable.t index 4b5a134..8eea71a 100644 --- a/t/100_bugs/025_universal_methods_wrappable.t +++ b/t/100_bugs/025_universal_methods_wrappable.t @@ -2,7 +2,7 @@ use strict; use warnings; use Test::Exception; -use Test::More tests => 2; +use Test::More; { @@ -27,3 +27,5 @@ use Test::More tests => 2; my $foo = Foo->new; ::isa_ok $foo, 'Bar'; } + +done_testing; diff --git a/t/100_bugs/026_create_anon_recursion.t b/t/100_bugs/026_create_anon_recursion.t index f981247..1756795 100644 --- a/t/100_bugs/026_create_anon_recursion.t +++ b/t/100_bugs/026_create_anon_recursion.t @@ -1,7 +1,7 @@ use strict; use warnings; -use Test::More tests => 1; +use Test::More; use Test::Exception; use Moose::Meta::Class; @@ -21,3 +21,5 @@ TODO: } 'Class is created successfully'; } + +done_testing; diff --git a/t/100_bugs/027_constructor_object_overload.t b/t/100_bugs/027_constructor_object_overload.t index 09c61d0..70aaffe 100644 --- a/t/100_bugs/027_constructor_object_overload.t +++ b/t/100_bugs/027_constructor_object_overload.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use strict; use warnings; -use Test::More tests => 1; +use Test::More; { package Foo; @@ -17,3 +17,4 @@ use Test::More tests => 1; ok(Foo->new()->bug(), 'call constructor on object reference with overloading'); +done_testing; diff --git a/t/200_examples/001_example.t b/t/200_examples/001_example.t index d7dd836..5984cc9 100644 --- a/t/200_examples/001_example.t +++ b/t/200_examples/001_example.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 20; +use Test::More; use Test::Exception; - ## Roles { @@ -126,3 +125,4 @@ ok($at_least_10_chars->does('Constraint::OnLength'), '... Constraint::LengthAtLe ok(!defined($at_least_10_chars->validate('barrrrrrrrr')), '... validated correctly'); is($at_least_10_chars->validate('bar'), 'must be at least 10 chars', '... validation failed correctly'); +done_testing; diff --git a/t/200_examples/002_example_Moose_POOP.t b/t/200_examples/002_example_Moose_POOP.t index 68ed49a..81b6e5d 100644 --- a/t/200_examples/002_example_Moose_POOP.t +++ b/t/200_examples/002_example_Moose_POOP.t @@ -10,7 +10,6 @@ BEGIN { plan skip_all => "DBM::Deep 1.0003 (or greater) is required for this test" if $@; eval "use DateTime::Format::MySQL;"; plan skip_all => "DateTime::Format::MySQL is required for this test" if $@; - plan tests => 88; } use Test::Exception; @@ -25,7 +24,6 @@ END { } - =pod This example creates a very basic Object Database which @@ -438,3 +436,4 @@ Moose::POOP::Meta::Instance->_reload_db(); } +done_testing; diff --git a/t/200_examples/003_example.t b/t/200_examples/003_example.t index 2e081bb..a61ba35 100644 --- a/t/200_examples/003_example.t +++ b/t/200_examples/003_example.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 30; +use Test::More; use Test::Exception; sub U { @@ -154,10 +154,4 @@ sub Y { is($coll2->print, '1, 4, 9, 16, 25, 36, 49, 64, 81, 100', '... new collection is changed'); } - - - - - - - +done_testing; diff --git a/t/200_examples/004_example_w_DCS.t b/t/200_examples/004_example_w_DCS.t index 335a45e..f3eca37 100644 --- a/t/200_examples/004_example_w_DCS.t +++ b/t/200_examples/004_example_w_DCS.t @@ -17,7 +17,6 @@ Pretty well if I do say so myself :) BEGIN { eval "use Declare::Constraints::Simple;"; plan skip_all => "Declare::Constraints::Simple is required for this test" if $@; - plan tests => 9; } use Test::Exception; @@ -91,9 +90,4 @@ dies_ok { $foo->baz({}); } '... validation failed correctly'; - - - - - - +done_testing; diff --git a/t/200_examples/005_example_w_TestDeep.t b/t/200_examples/005_example_w_TestDeep.t index 47bef7e..49030cc 100644 --- a/t/200_examples/005_example_w_TestDeep.t +++ b/t/200_examples/005_example_w_TestDeep.t @@ -18,7 +18,6 @@ but it is not completely horrid either. BEGIN { eval "use Test::Deep;"; plan skip_all => "Test::Deep is required for this test" if $@; - plan tests => 5; } use Test::Exception; @@ -75,4 +74,4 @@ dies_ok { $foo->bar([{ foo => 3 }]); } '... validation failed correctly'; - +done_testing; diff --git a/t/200_examples/006_example_Protomoose.t b/t/200_examples/006_example_Protomoose.t index e0602e0..09a82aa 100644 --- a/t/200_examples/006_example_Protomoose.t +++ b/t/200_examples/006_example_Protomoose.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 28; +use Test::More; =pod @@ -280,4 +280,4 @@ is($foo->bar, 300, '... still got the original value stored in the instance (inh is(Foo->bar, 100, '... still got the original value stored in the prototype (through the Foo class)'); is(Bar->bar, 100, '... still got the original value stored in the prototype (through the Bar class)'); - +done_testing; diff --git a/t/200_examples/007_Child_Parent_attr_inherit.t b/t/200_examples/007_Child_Parent_attr_inherit.t index a2c8e92..5b844dc 100644 --- a/t/200_examples/007_Child_Parent_attr_inherit.t +++ b/t/200_examples/007_Child_Parent_attr_inherit.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 23; +use Test::More; =pod @@ -134,3 +134,5 @@ is( $orphan->last_name, $parent2->last_name, '... parent2 and orphan child have the same last name (' . $parent2->last_name . ')' ); + +done_testing; diff --git a/t/200_examples/008_record_set_iterator.t b/t/200_examples/008_record_set_iterator.t index 0ae80f3..61d4339 100644 --- a/t/200_examples/008_record_set_iterator.t +++ b/t/200_examples/008_record_set_iterator.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More; use Test::Exception; - { package Record; use Moose; @@ -115,13 +114,4 @@ $rsi->get_next_record; is($rsi->first_name, 'Jim', '... got the right first name'); is($rsi->last_name, 'Johnson', '... got the right last name'); - - - - - - - - - - +done_testing; diff --git a/t/300_immutable/001_immutable_moose.t b/t/300_immutable/001_immutable_moose.t index 772337b..b969268 100644 --- a/t/300_immutable/001_immutable_moose.t +++ b/t/300_immutable/001_immutable_moose.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 15; +use Test::More; use Test::Exception; use Moose::Meta::Role; @@ -84,3 +84,5 @@ lives_ok { Baz->meta->make_immutable } Nothing here yet, but soon :) =cut + +done_testing; diff --git a/t/300_immutable/002_apply_roles_to_immutable.t b/t/300_immutable/002_apply_roles_to_immutable.t index 7976635..57d0c7f 100644 --- a/t/300_immutable/002_apply_roles_to_immutable.t +++ b/t/300_immutable/002_apply_roles_to_immutable.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 4; +use Test::More; use Test::Exception; - { package My::Role; use Moose::Role; @@ -38,4 +37,4 @@ lives_ok { is($foo->baz, 'My::Role::baz(Foo::baz)', '... got the right value'); - +done_testing; diff --git a/t/300_immutable/003_immutable_meta_class.t b/t/300_immutable/003_immutable_meta_class.t index c53aae3..1a1b662 100644 --- a/t/300_immutable/003_immutable_meta_class.t +++ b/t/300_immutable/003_immutable_meta_class.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 1; +use Test::More; use Test::Exception; - { package My::Meta; @@ -25,3 +24,4 @@ lives_ok { My::Meta->meta()->make_immutable(debug => 0) } '... can make a meta class immutable'; +done_testing; diff --git a/t/300_immutable/004_inlined_constructors_n_types.t b/t/300_immutable/004_inlined_constructors_n_types.t index 587a3a8..0c47a8c 100644 --- a/t/300_immutable/004_inlined_constructors_n_types.t +++ b/t/300_immutable/004_inlined_constructors_n_types.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 10; +use Test::More; use Test::Exception; =pod @@ -59,5 +59,4 @@ for (1..2) { Foo->meta->make_immutable(debug => 0) unless $is_immutable; } - - +done_testing; diff --git a/t/300_immutable/005_multiple_demolish_inline.t b/t/300_immutable/005_multiple_demolish_inline.t index c1e509a..d30a9c8 100644 --- a/t/300_immutable/005_multiple_demolish_inline.t +++ b/t/300_immutable/005_multiple_demolish_inline.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 5; +use Test::More; use Test::Exception; - { package Foo; use Moose; @@ -44,3 +43,5 @@ lives_ok { is( Foo->meta->get_method('DESTROY')->package_name, 'Foo', 'Foo has a DESTROY method in the Bar class (not inherited)' ); + +done_testing; diff --git a/t/300_immutable/007_immutable_trigger_from_constructor.t b/t/300_immutable/007_immutable_trigger_from_constructor.t index d02d5c9..bc86c1d 100644 --- a/t/300_immutable/007_immutable_trigger_from_constructor.t +++ b/t/300_immutable/007_immutable_trigger_from_constructor.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 3; +use Test::More; use Test::Exception; - { package AClass; @@ -36,5 +35,4 @@ like ($@, qr/^Pulling the Baz trigger/, "trigger from immutable constructor"); lives_ok { AClass->new(bar => 'bar') } '... no triggers called'; - - +done_testing; diff --git a/t/300_immutable/008_immutable_constructor_error.t b/t/300_immutable/008_immutable_constructor_error.t index 7d5140d..d5db002 100644 --- a/t/300_immutable/008_immutable_constructor_error.t +++ b/t/300_immutable/008_immutable_constructor_error.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 3; +use Test::More; use Test::Exception; - =pod This tests to make sure that we provide the same error messages from @@ -33,3 +32,4 @@ throws_ok { Foo->new(\$scalar) } qr/\QSingle parameters to new() must be a HASH throws_ok { Foo->new(undef) } qr/\QSingle parameters to new() must be a HASH ref/, 'undef provided to immutable constructor gives useful error message'; +done_testing; diff --git a/t/300_immutable/009_buildargs.t b/t/300_immutable/009_buildargs.t index b8a7527..283ed5c 100644 --- a/t/300_immutable/009_buildargs.t +++ b/t/300_immutable/009_buildargs.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 14; +use Test::More; { package Foo; @@ -44,4 +44,4 @@ foreach my $class qw(Foo Bar) { } } - +done_testing; diff --git a/t/300_immutable/010_constructor_is_not_moose.t b/t/300_immutable/010_constructor_is_not_moose.t index 5efab10..5ac676e 100644 --- a/t/300_immutable/010_constructor_is_not_moose.t +++ b/t/300_immutable/010_constructor_is_not_moose.t @@ -7,7 +7,6 @@ use Test::More; BEGIN { eval "use Test::Output;"; plan skip_all => "Test::Output is required for this test" if $@; - plan tests => 6; } { @@ -102,3 +101,5 @@ is( 'no warning when inheriting from a class that has already made itself immutable' ); } + +done_testing; diff --git a/t/300_immutable/011_constructor_is_wrapped.t b/t/300_immutable/011_constructor_is_wrapped.t index 9593833..6759134 100644 --- a/t/300_immutable/011_constructor_is_wrapped.t +++ b/t/300_immutable/011_constructor_is_wrapped.t @@ -7,7 +7,6 @@ use Test::More; BEGIN { eval "use Test::Output;"; plan skip_all => "Test::Output is required for this test" if $@; - plan tests => 1; } { @@ -29,3 +28,5 @@ BEGIN { 'got a warning that Foo may not have an inlined constructor' ); } + +done_testing; diff --git a/t/300_immutable/012_default_values.t b/t/300_immutable/012_default_values.t index f74a694..ad4e611 100644 --- a/t/300_immutable/012_default_values.t +++ b/t/300_immutable/012_default_values.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 12; +use Test::More; use Test::Exception; { @@ -62,3 +62,5 @@ is( $bar->buz, q{"'\\}, 'default value for buz attr' ); is( $bar->faz, qq{\0}, 'default value for faz attr' ); + +done_testing; diff --git a/t/300_immutable/013_immutable_roundtrip.t b/t/300_immutable/013_immutable_roundtrip.t index b43a876..a9bc1c8 100644 --- a/t/300_immutable/013_immutable_roundtrip.t +++ b/t/300_immutable/013_immutable_roundtrip.t @@ -7,7 +7,6 @@ use Test::More; BEGIN { eval "use Test::Output;"; plan skip_all => "Test::Output is required for this test" if $@; - plan tests => 1; } { @@ -36,3 +35,4 @@ BEGIN { ); } +done_testing; diff --git a/t/300_immutable/014_immutable_metaclass_with_traits.t b/t/300_immutable/014_immutable_metaclass_with_traits.t index 26f6874..4fb5baa 100644 --- a/t/300_immutable/014_immutable_metaclass_with_traits.t +++ b/t/300_immutable/014_immutable_metaclass_with_traits.t @@ -1,7 +1,7 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 14; +use Test::More; { package FooTrait; @@ -33,3 +33,5 @@ is(Class::MOP::class_of($meta), $meta->meta, "class_of and ->meta are the same on Foo's metaclass (immutable)"); isa_ok(Class::MOP::class_of($meta), 'Moose::Meta::Class'); ok($meta->meta->does_role('FooTrait'), "still does the trait after immutable"); + +done_testing; diff --git a/t/300_immutable/015_immutable_destroy.t b/t/300_immutable/015_immutable_destroy.t index 4fcb3de..8dfc3d3 100644 --- a/t/300_immutable/015_immutable_destroy.t +++ b/t/300_immutable/015_immutable_destroy.t @@ -1,6 +1,6 @@ use strict; use warnings; -use Test::More tests => 1; +use Test::More; { package FooBar; @@ -17,3 +17,5 @@ use Test::More tests => 1; my $f = FooBar->new( name => 'SUSAN' ); is( $f->DESTROY, 'SUSAN', 'Did moose overload DESTROY?' ); + +done_testing; diff --git a/t/400_moose_util/001_moose_util.t b/t/400_moose_util/001_moose_util.t index 1f08fb5..367d43a 100644 --- a/t/400_moose_util/001_moose_util.t +++ b/t/400_moose_util/001_moose_util.t @@ -3,8 +3,10 @@ use strict; use warnings; -use Test::More tests => 1; +use Test::More; BEGIN { use_ok('Moose::Util'); -} \ No newline at end of file +} + +done_testing; diff --git a/t/400_moose_util/002_moose_util_does_role.t b/t/400_moose_util/002_moose_util_does_role.t index c05ce94..26c1176 100644 --- a/t/400_moose_util/002_moose_util_does_role.t +++ b/t/400_moose_util/002_moose_util_does_role.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More; BEGIN { use_ok('Moose::Util', ':all'); @@ -79,3 +79,4 @@ ok(!does_role('Quux', 'Foo'), '... Quux doesnt do Foo (does not die tho)'); #ok(does_role('Foo::Foo', 'Foo'), '... Foo::Foo does do Foo'); +done_testing; diff --git a/t/400_moose_util/003_moose_util_search_class_by_role.t b/t/400_moose_util/003_moose_util_search_class_by_role.t index 7e46cf2..fa18dcf 100644 --- a/t/400_moose_util/003_moose_util_search_class_by_role.t +++ b/t/400_moose_util/003_moose_util_search_class_by_role.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 5; +use Test::More; BEGIN { use_ok('Moose::Util', ':all'); @@ -38,3 +38,4 @@ is search_class_by_role('SCBR::C', 'SCBR::Role'), 'SCBR::B', '... nearest class } is search_class_by_role('SCBR::D', 'SCBR::Role'), 'SCBR::D', '... nearest class being direct class returned'; +done_testing; diff --git a/t/400_moose_util/004_resolve_alias.t b/t/400_moose_util/004_resolve_alias.t index f5c55a5..5cbfceb 100644 --- a/t/400_moose_util/004_resolve_alias.t +++ b/t/400_moose_util/004_resolve_alias.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 16; +use Test::More; use Moose::Util qw( resolve_metaclass_alias resolve_metatrait_alias ); @@ -75,3 +75,5 @@ is( resolve_metatrait_alias( 'Attribute', 'Bar' ), is( resolve_metatrait_alias( 'Attribute', 'Bar' ), 'My::Trait::Bar', 'resolve_metatrait_alias finds Moose::Meta::Attribute::Custom::Trait::Bar as My::Trait::Bar via alias (Bar) a second time' ); + +done_testing; diff --git a/t/400_moose_util/005_ensure_all_roles.t b/t/400_moose_util/005_ensure_all_roles.t index f72b2c5..25ef102 100644 --- a/t/400_moose_util/005_ensure_all_roles.t +++ b/t/400_moose_util/005_ensure_all_roles.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More; BEGIN { use_ok('Moose::Util', ':all'); @@ -62,3 +62,5 @@ is_deeply( [ Foo->meta, Foo->meta, Bar->meta ], "unchanged, since all roles are already applied", ); + +done_testing; diff --git a/t/400_moose_util/006_create_alias.t b/t/400_moose_util/006_create_alias.t index bed8292..038e66f 100644 --- a/t/400_moose_util/006_create_alias.t +++ b/t/400_moose_util/006_create_alias.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More; use Test::Moose qw(does_ok); BEGIN { @@ -100,3 +100,5 @@ isa_ok($bwmc_meta, 'Bar::Meta::Class'); isa_ok($bwmc_meta->get_attribute('bar'), 'Bar::Meta::Attribute'); does_ok($bwmt_meta, 'Bar::Meta::Role'); does_ok($bwmt_meta->get_attribute('bar'), 'Bar::Meta::Role::Attribute'); + +done_testing; diff --git a/t/500_test_moose/001_test_moose.t b/t/500_test_moose/001_test_moose.t index 7510786..3f43edc 100644 --- a/t/500_test_moose/001_test_moose.t +++ b/t/500_test_moose/001_test_moose.t @@ -3,8 +3,10 @@ use strict; use warnings; -use Test::More tests => 1; +use Test::More; BEGIN { use_ok('Test::Moose'); -} \ No newline at end of file +} + +done_testing; diff --git a/t/500_test_moose/002_test_moose_does_ok.t b/t/500_test_moose/002_test_moose_does_ok.t index d7e505e..f084f38 100644 --- a/t/500_test_moose/002_test_moose_does_ok.t +++ b/t/500_test_moose/002_test_moose_does_ok.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::Builder::Tester tests => 2; +use Test::Builder::Tester; use Test::More; BEGIN { @@ -59,3 +59,4 @@ does_ok ($baz,'Foo','does_ok object fail'); test_test ('does_ok'); +done_testing; diff --git a/t/500_test_moose/003_test_moose_has_attribute_ok.t b/t/500_test_moose/003_test_moose_has_attribute_ok.t index 99e69f2..07ea34c 100644 --- a/t/500_test_moose/003_test_moose_has_attribute_ok.t +++ b/t/500_test_moose/003_test_moose_has_attribute_ok.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::Builder::Tester tests => 2; +use Test::Builder::Tester; use Test::More; BEGIN { @@ -46,3 +46,4 @@ has_attribute_ok('Bar', 'bar', '... has_attribute_ok(Bar, bar) passes'); test_test ('has_attribute_ok'); +done_testing; diff --git a/t/500_test_moose/004_test_moose_meta_ok.t b/t/500_test_moose/004_test_moose_meta_ok.t index a4cb60b..9eb1f3b 100644 --- a/t/500_test_moose/004_test_moose_meta_ok.t +++ b/t/500_test_moose/004_test_moose_meta_ok.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::Builder::Tester tests => 2; +use Test::Builder::Tester; use Test::More; BEGIN { @@ -30,3 +30,4 @@ meta_ok('Bar', '... meta_ok(Bar) fails'); test_test ('meta_ok'); +done_testing; diff --git a/t/500_test_moose/005_with_immutable.t b/t/500_test_moose/005_with_immutable.t index 3cfe91d..ec1358e 100644 --- a/t/500_test_moose/005_with_immutable.t +++ b/t/500_test_moose/005_with_immutable.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::Builder::Tester tests => 5; +use Test::Builder::Tester; use Test::More; BEGIN { @@ -36,3 +36,5 @@ $ret = with_immutable { } qw(Bar); test_test('with_immutable success'); ok($ret, "all tests succeeded"); + +done_testing; diff --git a/t/600_todo_tests/001_exception_reflects_failed_constraint.t b/t/600_todo_tests/001_exception_reflects_failed_constraint.t index 262ff80..c768b90 100644 --- a/t/600_todo_tests/001_exception_reflects_failed_constraint.t +++ b/t/600_todo_tests/001_exception_reflects_failed_constraint.t @@ -7,7 +7,7 @@ use strict; use warnings; -use Test::More tests => 4; +use Test::More; use Test::Exception; BEGIN { @@ -31,3 +31,5 @@ lives_ok { ok($errmsg !~ /Validation failed for 'ChildConstraint'/, 'exception references failing parent constraint'); }; } + +done_testing; diff --git a/t/600_todo_tests/002_various_role_features.t b/t/600_todo_tests/002_various_role_features.t index 62e978e..deab7fe 100644 --- a/t/600_todo_tests/002_various_role_features.t +++ b/t/600_todo_tests/002_various_role_features.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 39; +use Test::More; use Test::Exception; sub req_or_has ($$) { @@ -241,6 +241,8 @@ ok( $robot->has_attribute("twist"), "has attr 'twist'" ); isa_ok( $robot->get_method("twist"), "Moose::Meta::Method::Accessor" ); } +done_testing; + __END__ I think Attribute needs to be refactored in some way to better support roles. diff --git a/t/600_todo_tests/003_immutable_n_around.t b/t/600_todo_tests/003_immutable_n_around.t index 2364a5e..c633bf5 100644 --- a/t/600_todo_tests/003_immutable_n_around.t +++ b/t/600_todo_tests/003_immutable_n_around.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 20; +use Test::More; # if make_immutable is removed from the following code the tests pass @@ -52,3 +52,5 @@ tests: { redo tests; } } + +done_testing; diff --git a/t/600_todo_tests/005_moose_and_threads.t b/t/600_todo_tests/005_moose_and_threads.t index be3dd26..a0f7a81 100644 --- a/t/600_todo_tests/005_moose_and_threads.t +++ b/t/600_todo_tests/005_moose_and_threads.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 1; +use Test::More; use Test::Exception; - =pod See this for some details: @@ -39,6 +38,4 @@ $thr->join(); fail('Moose type constraints and threads dont get along'); } - - - +done_testing;