codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Perl Unit Test Error  gayaneducation at 06:04 on Wednesday, November 19, 2008
 


This is my test class and following error message cooures, how to solve it , pls help me
---------------------code-----------------------------
package first_example;
use strict;
use employee;
use Test::Unit::Debug qw(debug debugged);
use Test::Unit::TestSuite;

use base qw(Test::Unit::TestCase);

sub test_ok {
my $self = shift();
$self->assert(23 == 23);
}

sub test_fail {
my $self = shift();
my $result1 ='Tharinda1' ;
my $result = 'Tharinda';
$self->assert_not_equals($result,$result1);
$self->assert_equals($result,$result1);
}

sub set_up {
my $self = shift()->SUPER::set_up(@_);

}

sub tear_down {
my $self = shift();
$self->SUPER::tear_down(@_)

}
sub suite {
my $testsuite = Test::Unit::TestSuite->new(__PACKAGE__);
my $wrapper = fail_example_testsuite_setup->new($testsuite);
return $wrapper;
}





1;



package fail_example_testsuite_setup;
# this suite will decorate fail_example with additional fixture

use strict;
use Test::Unit::Debug qw(debug);

use base qw(Test::Unit::Setup);

sub set_up {
my $self = shift()->SUPER::set_up(@_);
debug("fail_example_testsuite_setup\n");
}

sub tear_down {
my $self = shift();
debug("fail_example_testsuite_tear_down\n");
$self->SUPER::tear_down(@_);
}

1;
-----------------error message--------------------------
gayan@21cnedc23>>/iw-home/iw-perl/bin/perl TestRunner.pl first_example.pm
Warning: Use of "require" without parentheses is ambiguous at (eval 11) line 1.
Suite class first_example.pm not found: Bareword "pm" not allowed while "strict subs" in use at (eval 11) line 1.









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  Add an OnChange event to an ASP page
•  value of text field
•  value of text field
•  Perl Critic trouble
•  OPENING FOR: PERL (Developer/ Senior/ Team Lead)
•  Re: Help with code
•  remove character on a line of a file with check box
•  Pulling Data from 2 tables with variables from a 3rd table!!!
•  Dynamic Usemap Problem


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2008