diff options
author | Bram <p5p@perl.wizbit.be> | 2009-07-24 12:39:50 +0200 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2009-07-24 06:54:46 -0500 |
commit | 4283ec8b813da1587716995b70c48847a3818b62 (patch) | |
tree | b5f36f2b4353bab4fb68562a8a8463a5a12fb83e /t/mro | |
parent | aa5e9df811173647b90d726d2966172b613c8789 (diff) | |
download | perl-4283ec8b813da1587716995b70c48847a3818b62.tar.gz |
Add a test for mro::method_changed_in() and mro::invalidate_all_method_caches()
Diffstat (limited to 't/mro')
-rw-r--r-- | t/mro/basic.t | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/t/mro/basic.t b/t/mro/basic.t index 8568517244..a4d3015035 100644 --- a/t/mro/basic.t +++ b/t/mro/basic.t @@ -3,7 +3,7 @@ use strict; use warnings; -require q(./test.pl); plan(tests => 42); +require q(./test.pl); plan(tests => 44); require mro; @@ -248,3 +248,20 @@ is(eval { MRO_N->testfunc() }, 123); *{P1::bark} = sub { "[bark]" }; is(scalar eval { $foo->bark }, "[bark]", "can bark now"); } + +{ + # test mro::method_changed_in + my $count = mro::get_pkg_gen("MRO_A"); + mro::method_changed_in("MRO_A"); + my $count_new = mro::get_pkg_gen("MRO_A"); + + is($count_new, $count + 1); +} + +{ + # test if we can call mro::invalidate_all_method_caches; + eval { + mro::invalidate_all_method_caches(); + }; + is($@, ""); +} |