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:[EMAIL PROTECTED]



_______________________________________________
Perlunit-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/perlunit-users

Reply via email to