[EMAIL PROTECTED] wrote:
randyk      2004/07/14 18:32:26

Modified: t/apr-ext table.t
t/response/TestAPR table.pm
Added: t/lib/TestAPRlib table.pm
Log:
put common tests for APR::Table under t/lib/TestAPRlib/table.pm,
to be run from both t/apr-ext/table.t and t/apr/table.t.
Revision Changes Path
1.2 +5 -11 modperl-2.0/t/apr-ext/table.t
Index: table.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/apr-ext/table.t,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- table.t 16 Jun 2004 03:55:48 -0000 1.1
+++ table.t 15 Jul 2004 01:32:26 -0000 1.2
@@ -1,15 +1,9 @@
+use strict;
+use warnings FATAL => 'all';
use Apache::Test;
-use blib;
-use Apache2;
+use TestAPRlib::table;
-plan tests => 1;
+plan tests => TestAPRlib::table::number();

can this please be something else than number()? It's not quite intuitive, IMHO. How about ::tests() or ::num_of_tests()?


  Index: table.pm
  ===================================================================
  package TestAPRlib::table;

  use constant TABLE_SIZE => 20;
  my $filter_count;

shouldn't it now become a global in that package?
and at least it needs to be reset at the beginning of 'sub test'. otherwise if you run the same test twice in the same interpreter you may have problems if it doesn't get reset.



-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com

Reply via email to