On Fri, Jan 25, 2013 at 12:00 AM, Ben Reser <ben_at_reser.org> wrote:
> So we're talking about wanting a way to want to use a list of regexes
> that are still ordered. The logical thing to do would be to extend
> ExpectedOutput with another class that does just that. If you take a
> look at UnorderedOutput UnorderedRegexOuput all they do is use the
> other classes as superclasses and set some flags that change the
> behavior.
To add some clarity here to what I'm saying above...
There are two options.
1) Build a new class (could be named RegexListOutput) like I mention
above or in an earlier email. This will likely be a tad easier, since
you don't change the logic existing tests are using and thus you don't
have to do do negative testing against all the tests (which is
probably a lot) that use the existing classes.
2) Adjust RegexOutput so that it can handle more than one Regex. It's
already expecting a list, it just ignores everything but the first
member. This is probably the cleaner approach but you need to at a
minimum go through and check every use of RegexOutput to make sure it
isn't passing multiple regexes and consider what the impact is.
You'll also need to be very careful not to change the logic the
existing users of RegexOutput depend on.
Received on 2013-01-25 09:18:43 CET