RE: passing arguments to tests

2003-07-24 Thread Potozniak, Andrew
This is a real simple example of what you can do for sub classing. Object oriented design is a wonderful thing :-D TEST HARNESS SUB CLASS (TestHarnessSubClass.pm)## #!/usr/local/bin/perl package TestHarnessSubClass; use warnings; use strict; #This creates TestHarnessSubClass

RE: passing arguments to tests

2003-07-24 Thread Ovid
I'm afraid your code won't work. > package TestHarnessSubClass; [snip] > #This creates TestHarnessSubClass into a sub class of Test::Harness > use base "Test::Harness"; [snip] > sub runtests{ > my $self = shift; [snip] > $self->SUPER::runtests(@_); > } Okay, you've subclassed a functional mo

Re: black-box test tool

2003-07-24 Thread Danny Faught
Andrew Savige wrote: Just curious, has anyone had STAF? http://staf.sourceforge.net/index.php I ran across STAF when I was researching freeware test harnesses, and I recommended that my client evaluate both QMtest and STAF (they chose neither of them, probably because they wanted commercial sup

RE: passing arguments to tests

2003-07-24 Thread Potozniak, Andrew
>I'm afraid your code won't work. As stated below I got it to work with my example :-p >Okay, you've subclassed a functional module. But this means that >you'll be >passing the package name as the first argument, not a test >name. This will generate a "this >test does not exist" warning with

Re: passing arguments to tests

2003-07-24 Thread chromatic
On Thursday, July 24, 2003, at 09:46 AM, Potozniak, Andrew wrote: Correct me if I'm wrong but calling $self->SUPER::somesub calls a sub in the functional context which will not pass the "calling class" along with it. Okay, you're wrong. :) 'SUPER::' is just a hint to the method dispatcher to m

RE: passing arguments to tests

2003-07-24 Thread Potozniak, Andrew
-Original Message- From: chromatic [mailto:[EMAIL PROTECTED] Sent: Thursday, July 24, 2003 12:56 PM To: Potozniak, Andrew Cc: '[EMAIL PROTECTED]' Subject: Re: passing arguments to tests On Thursday, July 24, 2003, at 09:46 AM, Potozniak, Andrew wrote: >> Correct me if I'm wrong but calli

Re: passing arguments to tests

2003-07-24 Thread Andrew Savige
Andrew P's test program does indeed "work" with Perl 5.8.0 on both Unix and Windows with a test name of 'sample.t' in THDriver.pl, yet changing it to './sample.t' results in a failure of: Can't call method "SUPER::runtests" without a package or object reference. But why? The snippet below (tested