Today's Topics:
1. List active? (Steven Hilton)
1. List active? (Steven Hilton)
-- yes it is, but just barely. You can find more help at places like perlmonger and experts-exchange.com
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__
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
[EMAIL PROTECTED]
All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications in the hosting industry. Fanatical Support. Click to learn more http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________ Perlunit-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/perlunit-users
