Re: [Perlunit-users] List active?
Status: Beta
Brought to you by:
mca1001
From: Tom H. <hum...@gm...> - 2006-06-21 20:34:21
|
Today's Topics: 1. List active? (Steven Hilton) -- yes it is, but just barely. You can find more help at places like perlmonger and experts-exchange.com http://www.perlmonks.com http://www.experts-exchange.com/Programming/Programming_Languages/Perl/ 2. using Test::Unit::Setup (Steven Hilton) Can you post your source code?? Where are you overriding? It might help to take closer look at Test::Unit::Setup: package Test::Unit::Setup; use strict; use base qw(Test::Unit::Decorator); sub run { my $self = shift(); my($result) = @_; my $protectable = sub { $self->set_up(); $self->basic_run($result); $self->tear_down(); }; $result->run_protected($self, $protectable); } # Sets up the fixture. Override to set up additional fixture # state. sub set_up { print "Suite setup\n"; } # Tears down the fixture. Override to tear down the additional # fixture state. sub tear_down { print "Suite teardown\n"; } 1; __END__ And here is Test::Unit::Decorator: package Test::Unit::Decorator; use strict; use base qw(Test::Unit::Test); sub new { my $class = shift; my ($fTest) = @_; return bless { _fTest => $fTest }, $class; } sub basic_run { my $self = shift; my ($result) = @_; $self->{_fTest}->run($result); # IS THIS WHERE YOU HAVE ERROR? } sub count_test_cases() { my $self = shift; return $self->{_fTest}->count_test_cases(); } sub run { my $self = shift; my ($result) = @_; $self->basic_run($result); } sub to_string { my $self = shift; "$self->{_fTest}"; } sub get_test { my $self = shift; return $self->{_fTest}; } 1; __END__ -- Thomas J. Humphrey, MS EE Gaming Consultant Reno, Nevada hum...@gm... |