commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benedikt Ritter <>
Subject Re: [Math] How to use a class from the "test" source tree?
Date Wed, 13 Jun 2012 10:34:51 GMT

2012/6/13 Gilles Sadowski <>:
> Hi.
>> >
>> > Is there a way for an application to depend on the classes defined in the
>> > "test" subtree of the code repository?
>> If the component releases the test jar, then it should be possible.
> It seems that it's not released as a JAR (probably only in the zip/tar
> and source archive).
>> But if the test code is more generally useful, perhaps it should be
>> moved to the java subtree.
> I'd like to make it easy to use "PerfTestUtils" outside of the CM
> development environment.
> Is it OK to move it to "main"? Before doing so, I also expected that more
> people would have a look at it, and agree on the "methodology" (or suggest
> ways to improve it) and API.
> When I move it, should it go to the top-level package "o.a.c.m"? Or maybe
> into "util"? Or even a new "util/perf" subpackage (to separate utilities
> used by the CM code from utilities used to test the code's performance?

I don't know, to me it feels rather strange to add a TestPerfUtil to
the public API of a mathematical library. OTOH TestPerfUtils looks to
specific to be used outside the context of CM (it uses classes defined
in CM). I see two solutions:
1. if you need it just for one project, you could simply copy the
class to that project in the test tree
2. if you need it for several projects and there are additional useful
classes in the test tree that are concerned with tests in context of
CM, a new component could be created that defines a dependency to CM.
This dependency (commons-math-testutils ?!) could then be added to
what ever project in the test scope.


> Regards,
> Gilles
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message