summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2010-06-15 03:42:31 -0500
committerJesse Luehrs <doy@tozt.net>2010-06-15 03:42:31 -0500
commit5a5b351f6789989cf4f6033128a8cc2f711c795f (patch)
treede5b29a98946fb9ac9be5a1bd2fb280194687c26 /t
parentdfc2ff5f2709f198d9fdb21d84a2534acc9f3670 (diff)
downloadmoosex-nonmoose-5a5b351f6789989cf4f6033128a8cc2f711c795f.tar.gz
moosex-nonmoose-5a5b351f6789989cf4f6033128a8cc2f711c795f.zip
switch to done_testing in tests
Diffstat (limited to 't')
-rw-r--r--t/01-basic.t4
-rw-r--r--t/02-methods.t4
-rw-r--r--t/03-attrs.t4
-rw-r--r--t/04-multi-level.t4
-rw-r--r--t/05-moose.t4
-rw-r--r--t/06-disable.t4
-rw-r--r--t/10-immutable.t4
-rw-r--r--t/20-BUILD.t4
-rw-r--r--t/21-BUILDARGS.t4
-rw-r--r--t/22-replaced-constructor.t4
-rw-r--r--t/23-FOREIGNBUILDARGS.t4
-rw-r--r--t/24-nonmoose-moose-nonmoose.t4
-rw-r--r--t/30-only-metaclass-trait.t4
-rw-r--r--t/31-moose-exporter.t4
-rw-r--r--t/32-moosex-insideout.t3
-rw-r--r--t/33-moosex-globref.t3
-rw-r--r--t/40-destructor.t4
-rw-r--r--t/50-buggy-constructor-inlining.t4
18 files changed, 52 insertions, 18 deletions
diff --git a/t/01-basic.t b/t/01-basic.t
index a448abf..8995d6d 100644
--- a/t/01-basic.t
+++ b/t/01-basic.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 9;
+use Test::More;
package Foo;
@@ -30,3 +30,5 @@ my $cc_meta = $meta->constructor_class->meta;
isa_ok($cc_meta, 'Moose::Meta::Class');
ok($cc_meta->does_role('MooseX::NonMoose::Meta::Role::Constructor'),
'Foo::Moose gets its constructor from MooseX::NonMoose');
+
+done_testing;
diff --git a/t/02-methods.t b/t/02-methods.t
index 03b8101..c02438c 100644
--- a/t/02-methods.t
+++ b/t/02-methods.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 3;
+use Test::More;
package Foo;
@@ -23,3 +23,5 @@ my $foo_moose = Foo::Moose->new;
is($foo_moose->foo, 'Foo', 'Foo::Moose->foo');
is($foo_moose->bar, 'Foo::Moose', 'Foo::Moose->bar');
is($foo_moose->baz, 'Foo::Moose', 'Foo::Moose->baz');
+
+done_testing;
diff --git a/t/03-attrs.t b/t/03-attrs.t
index 6b25849..7451ddc 100644
--- a/t/03-attrs.t
+++ b/t/03-attrs.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 4;
+use Test::More;
package Foo;
@@ -34,3 +34,5 @@ $foo_moose->foo('BAZ');
$foo_moose->bar('QUUX');
is($foo_moose->foo, 'BAZ', 'foo set by accessor');
is($foo_moose->bar, 'QUUX', 'bar set by accessor');
+
+done_testing;
diff --git a/t/04-multi-level.t b/t/04-multi-level.t
index 4cd0465..5201c47 100644
--- a/t/04-multi-level.t
+++ b/t/04-multi-level.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 11;
+use Test::More;
package Foo;
@@ -53,3 +53,5 @@ is($foo_moose_sub->bar, 'BAR', 'Foo::Moose::Sub::bar (immutable)');
is($foo_moose_sub->baz, 'BAZ', 'Foo::Moose::Sub::baz (immutable)');
isnt(Foo::Moose::Sub->meta->get_method('new'), undef,
'Foo::Moose::Sub has an inlined constructor');
+
+done_testing;
diff --git a/t/05-moose.t b/t/05-moose.t
index 33a14b1..e4f8d39 100644
--- a/t/05-moose.t
+++ b/t/05-moose.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 12;
+use Test::More;
package Foo;
use Moose;
@@ -49,3 +49,5 @@ isa_ok($foo_othersub, 'Foo');
is($foo_othersub->foo, 'FOO', 'inheritance works (all immutable)');
ok(Foo::OtherSub->meta->has_method('new'),
'Foo::OtherSub has its own new method (all immutable)');
+
+done_testing;
diff --git a/t/06-disable.t b/t/06-disable.t
index 6d652ab..73b9ed1 100644
--- a/t/06-disable.t
+++ b/t/06-disable.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 3;
+use Test::More;
package Foo;
@@ -31,3 +31,5 @@ my $method2 = Foo::Moose2->meta->get_method('new');
Foo::Moose2->meta->make_immutable(inline_constructor => 0);
is($method2, Foo::Moose2->meta->get_method('new'),
'make_immutable doesn\'t replace the constructor if we ask it not to');
+
+done_testing;
diff --git a/t/10-immutable.t b/t/10-immutable.t
index 36430eb..275b387 100644
--- a/t/10-immutable.t
+++ b/t/10-immutable.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 6;
+use Test::More;
package Foo;
@@ -41,3 +41,5 @@ is($foo_moose->foo, 'BAZ', 'foo set by accessor');
is($foo_moose->bar, 'QUUX', 'bar set by accessor');
is($foo_moose->baz, 'Foo', 'baz method');
is($foo_moose->quux, 'Foo::Moose', 'quux method');
+
+done_testing;
diff --git a/t/20-BUILD.t b/t/20-BUILD.t
index 81de930..d5cc68f 100644
--- a/t/20-BUILD.t
+++ b/t/20-BUILD.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 5;
+use Test::More;
package Foo;
@@ -54,3 +54,5 @@ my $foo_moose_sub = Foo::Moose::Sub->new;
is($foo_moose_sub->class, 'Foo::Moose::Sub', 'parent BUILD method called');
is($foo_moose_sub->bar, 'BAR', 'child BUILD method called');
is($foo_moose_sub->accum, 'ab', 'BUILD methods called in the correct order');
+
+done_testing;
diff --git a/t/21-BUILDARGS.t b/t/21-BUILDARGS.t
index 4fed2a7..32bb72a 100644
--- a/t/21-BUILDARGS.t
+++ b/t/21-BUILDARGS.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 4;
+use Test::More;
use Test::Moose;
package Foo;
@@ -36,3 +36,5 @@ with_immutable {
is($foo->name, 'bar', 'superclass constructor gets the right args');
is($foo->foo, 'baz', 'subclass constructor gets the right args');
} 'Foo::Moose';
+
+done_testing;
diff --git a/t/22-replaced-constructor.t b/t/22-replaced-constructor.t
index c7b2e44..3362bc2 100644
--- a/t/22-replaced-constructor.t
+++ b/t/22-replaced-constructor.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 7;
+use Test::More;
our $foo_constructed = 0;
@@ -60,3 +60,5 @@ is($method, Foo::Moose2->meta->get_method('new'),
'make_immutable doesn\'t overwrite custom constructor');
$foo = Foo::Moose2->new;
ok($foo_constructed, 'custom constructor called (immutable)');
+
+done_testing;
diff --git a/t/23-FOREIGNBUILDARGS.t b/t/23-FOREIGNBUILDARGS.t
index a9e8cef..78c7fa9 100644
--- a/t/23-FOREIGNBUILDARGS.t
+++ b/t/23-FOREIGNBUILDARGS.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 12;
+use Test::More;
use Test::Moose;
package Foo;
@@ -68,3 +68,5 @@ with_immutable {
is($baz->bar, 'bazbaz', 'extensions of extensions of the nonmoose class respect BUILDARGS');
is($baz->foo_base, 'bazbaz_base', 'extensions of extensions of the nonmoose class respect FOREIGNBUILDARGS');
} qw(Foo::Moose Bar::Moose Baz::Moose);
+
+done_testing;
diff --git a/t/24-nonmoose-moose-nonmoose.t b/t/24-nonmoose-moose-nonmoose.t
index b9ae100..3299547 100644
--- a/t/24-nonmoose-moose-nonmoose.t
+++ b/t/24-nonmoose-moose-nonmoose.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 32;
+use Test::More;
use Test::Moose;
package Foo;
@@ -81,3 +81,5 @@ with_immutable {
is($bar->bar, 'barmoosesub', 'got name from nonmoose constructor');
is($bar->bar2, 'BAR2', 'got attribute value from moose constructor');
} 'Bar::Moose';
+
+done_testing;
diff --git a/t/30-only-metaclass-trait.t b/t/30-only-metaclass-trait.t
index 07be5d8..c103067 100644
--- a/t/30-only-metaclass-trait.t
+++ b/t/30-only-metaclass-trait.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 4;
+use Test::More;
package Foo;
@@ -20,3 +20,5 @@ my $method = Foo::Moose->meta->get_method('new');
Foo::Moose->meta->make_immutable;
is(Foo::Moose->meta->get_method('new'), $method,
'inlining doesn\'t happen when the constructor trait isn\'t used');
+
+done_testing;
diff --git a/t/31-moose-exporter.t b/t/31-moose-exporter.t
index 8fbfbae..fabcef2 100644
--- a/t/31-moose-exporter.t
+++ b/t/31-moose-exporter.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 8;
+use Test::More;
BEGIN {
require Moose;
@@ -69,3 +69,5 @@ my $method2 = Foo::Moose2->meta->get_method('new');
Foo::Moose2->meta->make_immutable;
isnt(Foo::Moose2->meta->get_method('new'), $method2,
'inlining does happen when the constructor trait is used');
+
+done_testing;
diff --git a/t/32-moosex-insideout.t b/t/32-moosex-insideout.t
index ae31359..88283b0 100644
--- a/t/32-moosex-insideout.t
+++ b/t/32-moosex-insideout.t
@@ -6,7 +6,6 @@ use Test::Moose;
BEGIN {
eval "use MooseX::InsideOut 0.100 ()";
plan skip_all => "MooseX::InsideOut is required for this test" if $@;
- plan tests => 10;
}
BEGIN {
@@ -76,3 +75,5 @@ with_immutable {
my $sub_foo = eval { Foo::Moose::Sub->new(FOO => bar => 'AHOY') };
is(eval { $sub_foo->bar }, 'AHOY', 'subclass constructor works');
} 'Foo::Moose';
+
+done_testing;
diff --git a/t/33-moosex-globref.t b/t/33-moosex-globref.t
index 3f59e39..01f94bf 100644
--- a/t/33-moosex-globref.t
+++ b/t/33-moosex-globref.t
@@ -6,7 +6,6 @@ use Test::Moose;
BEGIN {
eval "use MooseX::GlobRef ()";
plan skip_all => "MooseX::GlobRef is required for this test" if $@;
- plan tests => 10;
}
# XXX: the way the IO modules are loaded means we can't just rely on cmop to
# load these properly/:
@@ -83,3 +82,5 @@ with_immutable {
is($buf, "foo\nbar\n", "filehandle still works as normal");
}
} 'IO::File::Moose';
+
+done_testing;
diff --git a/t/40-destructor.t b/t/40-destructor.t
index 741db60..e9a2185 100644
--- a/t/40-destructor.t
+++ b/t/40-destructor.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 4;
+use Test::More;
use Test::Moose;
my ($destroyed, $demolished);
@@ -26,3 +26,5 @@ with_immutable {
is($destroyed, 1, "non-Moose destructor called");
is($demolished, 1, "Moose destructor called");
} 'Foo::Sub';
+
+done_testing;
diff --git a/t/50-buggy-constructor-inlining.t b/t/50-buggy-constructor-inlining.t
index 3537e31..bfb0689 100644
--- a/t/50-buggy-constructor-inlining.t
+++ b/t/50-buggy-constructor-inlining.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 6;
+use Test::More;
use Test::Moose;
my ($Foo, $Bar, $Baz);
@@ -33,3 +33,5 @@ with_immutable {
is($Bar, 1, "Bar->BUILD is called once");
is($Baz, 1, "Baz->BUILD is called once");
} 'Baz';
+
+done_testing;