On Tue, 13 Jul 2004, Stas Bekman wrote: > Randy Kobes wrote: > > I've been working at reworking some of the apr > > tests so that they can also function as apr-ext > > tests, with as much common code as possible. > > I have a working set, but before getting into > > specifics, thought it'd be good to discuss some > > of the design issues first. > > > > As Stas suggested in some earlier messages, > > one could put the common tests in one package, > > and then call it from both t/apr/ and t/apr-ext/. > > So the simplest tests (eg, constants.t), would > > look like: [ ... ] > > So the first question I had - is there a better > > name and/or location than "t/aprlib/" to put > > in the common code? > > I'd rather see t/lib and have all those packages there, to > clearly separate those from directories with tests. And > adjust @INC to include those dirs. > > t/lib/TestAPRlib/*
Sounds good - I'll create those, and start from there. > > I think it's the best to split plan() away from the subs with tests. I > think the subs should be just ok() tests, like a few wrappers that we > have inside normal tests (e.g. the apr/pool tests has a few subs each > declares in the comment how many tests it runs. > > So I propose the following plan of action. First take the simple tests > that can be decoupled from $r and have them put into a separate sub > moved into t/lib/..., leave the $r-dependent tests where they are, and > to start with run from both locations just those subs which don't > require $r. > > But, don't forget that we can do Apache::RequestRec->new() and voila, we > have $r. It won't work in some cases, but may be something that will be > just right in others. Just something to consider. > > Let's take one test like apr table, which doesn't depend on $r at all > and split it first, then do the rest, once we are happy with that one? > the added benefit to start with it, is merging Joe's sub-tests into it. That sounds good - I'll do that in a separate message. -- best regards, randy --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
