[Perlunit-users] The First Steps Or A Trap On The Way
Status: Beta
Brought to you by:
mca1001
|
From: Oliver F. <pl...@sn...> - 2002-02-21 21:05:31
|
At first: Thanks for bringing Beck's test framework to Perl!
Today I wrote my first test cases and stepped in a possible trap. I startet
my test classs by following the example provided in TestCase.pm
package FooBar;
use base qw(Test::Unit::TestCase);
sub new {
my $self = shift()->SUPER::new(@_);
# your state for fixture here
return $self;
}
Unfortunately this code caused only errors on my system (w2k and AS Perl).
So I changed the code. This is working...
package CVSWrapper::punit::CommandOptionPT;
use Test::Unit::TestCase;
@ISA = qw'Test::Unit::TestCase';
sub new {
my $type = shift;
my $self = new Test::Unit::TestCase(@_);
bless $self, $type;
return $self;
}
Is the documentation wrong or what is the reason?
Thanks and bye...
Oliver
--
Oliver Fischer - mailto:pl...@sn...
|