|
|
Choosing A Webhost: |
Re: [mp2] apr/apr-ext table test: msg#00205apache.mod-perl.devel
Randy Kobes wrote: Here's a diff for making the code for the APR::Table +1, perfect. +require TestAPRlib::table; why not 'use'? Further, I'd suggest to have a parallel function which returns the number of sub-tests will be run. e.g. in this tests case TestAPRlib::table::test_number(), which will do all the calculations and tell the caller how many tests TestAPRlib::table::test() is going to run. So the skeleton will become: use TestAPRlib::foo; my $local_tests = 5; my $common_tests = TestAPRlib::foo::test_number(); plan tests => $local_tests + $common_tests; TestAPRlib::foo::test(); # now run local tests if any (e.g. mp-specific ones) In the case of apr::table that will be a hardcoded number: package TestAPRlib::table; sub test_number { 38 } in the case of more complicated tests with skips, it can be a more complicated function, but the added value that now the caller doesn't need to hardcoded that number and the library can adjust things dynamically, and have a different number of tests for apr/mp and apr-ext. -- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:stas@xxxxxxxxxx http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [mp2] apr/apr-ext constants test, Stas Bekman |
|---|---|
| Next by Date: | Re: ModPerl-Registry t/basic.t crashes Apache, Stas Bekman |
| Previous by Thread: | [mp2] apr/apr-ext table test, Randy Kobes |
| Next by Thread: | Re: [mp2] apr/apr-ext table test, Randy Kobes |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |