In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/4283ec8b813da1587716995b70c48847a3818b62?hp=aa5e9df811173647b90d726d2966172b613c8789>

- Log -----------------------------------------------------------------
commit 4283ec8b813da1587716995b70c48847a3818b62
Author: Bram <[email protected]>
Date:   Fri Jul 24 12:39:50 2009 +0200

    Add a test for mro::method_changed_in() and 
mro::invalidate_all_method_caches()
-----------------------------------------------------------------------

Summary of changes:
 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 8568517..a4d3015 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($@, "");
+}

--
Perl5 Master Repository

Reply via email to