commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sébastien Brisard <>
Subject Re: [math] Duplicate code in ArrayRealVectorTest, RealVectorTest, SparseRealVectorTest
Date Thu, 31 May 2012 05:56:15 GMT
assuming that no answer meant no (strong) opposition, I took the
liberty to create MATH-795 [1]. This refactoring has already revealed
a problem (see r1344570 and r1344571).

Best regards,



2012/5/30 Sébastien Brisard <>:
> Dear all,
> while working on MATH-792 [1], I've noticed that the above mentioned
> tests contain a lot of duplicate code. Besides, some of the unit tests
> are no longer (in my opinion) unit tests, since they test many
> different functionalities.
> I would be tempted to refactor these tests. I've recently implemented
> RealVectorAbstractTest for testing the various implementations of the
> visitor pattern. That's probably the place where the code should be
> factored out.
> Besides readability, the benefit would be use of implementation of
> other kinds of vector. The immediate benefit for me would be for the
> implementation of views of vectors (which have been discussed some
> time ago on the ML): testing would be almost trivial (I hope). I think
> this refactoring would also lead to a natural resolution of MATH-625
> [2].
> It could be argued that this is counter-productive, as I would be
> doing again what has already been done (and works!). I do not know if
> we intend to release 3.1 soon, in which case this proposal might be
> postponed.
> What do you think?
> Best regards,
> Sébastien
> [1]
> [2]

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

View raw message