summaryrefslogtreecommitdiff
path: root/t/mro/next_edgecases.t
diff options
context:
space:
mode:
authorMichael G. Schwern <schwern@pobox.com>2011-11-15 17:39:07 -0800
committerFather Chrysostomos <sprout@cpan.org>2011-11-17 10:01:34 -0800
commitbbce3ca648eab3f375216d4c9eba05cb6e005d05 (patch)
tree7ab2097535b9ff42568b0f010c31906bb41542b8 /t/mro/next_edgecases.t
parentb8ab4b0c2ac8ae091a7ed7909f0d9b01ae5717f0 (diff)
downloadperl-bbce3ca648eab3f375216d4c9eba05cb6e005d05.tar.gz
Add class_ok() and object_ok() to t/test.pl.
Change every existing instance of isa_ok() to use object_ok(). This is safe because before this point, t/test.pl's isa_ok() only worked on objects. lib/dbmt_common.pl is the last hold out because it uses Test::More. These are like isa_ok() but they also check if it's a class or an object. This lets the core tests defend against outlandish bugs while allowing t/test.pl to retain feature parity with Test::More.
Diffstat (limited to 't/mro/next_edgecases.t')
-rw-r--r--t/mro/next_edgecases.t10
1 files changed, 5 insertions, 5 deletions
diff --git a/t/mro/next_edgecases.t b/t/mro/next_edgecases.t
index 7402ec90ad..e177d7098f 100644
--- a/t/mro/next_edgecases.t
+++ b/t/mro/next_edgecases.t
@@ -21,7 +21,7 @@ plan(tests => 12);
# call the submethod in the direct instance
my $foo = Foo->new();
- isa_ok($foo, 'Foo');
+ object_ok($foo, 'Foo');
can_ok($foo, 'bar');
is($foo->bar(), 'Foo::bar', '... got the right return value');
@@ -37,8 +37,8 @@ plan(tests => 12);
}
my $bar = Bar->new();
- isa_ok($bar, 'Bar');
- isa_ok($bar, 'Foo');
+ object_ok($bar, 'Bar');
+ object_ok($bar, 'Foo');
# test it working with with Sub::Name
SKIP: {
@@ -68,8 +68,8 @@ plan(tests => 12);
}
my $baz = Baz->new();
- isa_ok($baz, 'Baz');
- isa_ok($baz, 'Foo');
+ object_ok($baz, 'Baz');
+ object_ok($baz, 'Foo');
{
my $m = sub { (shift)->next::method() };