[libclass-virtual-perl] 06/07: Added test to see if we can hit autoloaders. Doesnt work, so I commented it out
dom at earth.li
dom at earth.li
Wed Aug 23 14:00:14 UTC 2017
This is an automated email from the git hooks/post-receive script.
dom pushed a commit to tag v0.03
in repository libclass-virtual-perl.
commit a63787af5ec3939d83b14bb9559b621a6ee8abc6
Author: Michael G. Schwern <schwern at pobox.com>
Date: Fri Feb 9 13:19:15 2001 +0000
Added test to see if we can hit autoloaders. Doesnt work, so I commented it out
git-svn-id: file:///Users/schwern/tmp/svn/CPAN/Class-Virtual/trunk@2277 8151f2b9-fde8-0310-94fd-f048d12aab9e
---
t/Virtual.t | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/t/Virtual.t b/t/Virtual.t
index f6bc252..c258020 100644
--- a/t/Virtual.t
+++ b/t/Virtual.t
@@ -51,7 +51,7 @@ sub eqarray {
}
# Change this to your # of ok() calls + 1
-BEGIN { $Total_tests = 8 }
+BEGIN { $Total_tests = 9 }
my @vmeths = qw(new foo bar this that);
my $ok;
@@ -91,3 +91,23 @@ eval {
};
$ok = $@ =~ /^Attempt to reset virtual methods/;
::ok( $ok, "Disallow reseting by subclass" );
+
+
+### This test doesn't work and probably never will.
+###
+# package Test::That;
+# use base qw(Test::Virtual);
+
+# # Let's see how things work with an autoloader.
+# use vars qw($AUTOLOAD);
+# sub AUTOLOAD {
+# if( $AUTOLOAD =~ /(foo|bar)/ ) {
+# return "Yay!";
+# }
+# else {
+# die "ARrrrrrrrrrrgh!\n";
+# }
+# }
+
+# ::ok( ::eqarray([sort __PACKAGE__->missing_methods], [sort qw(new this that)]),
+# 'Autoloaded methods recognized' );
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libclass-virtual-perl.git
More information about the Pkg-perl-cvs-commits
mailing list