proposed easyhack: converting c++ unit tests from JUnit to CppUnit

Markus Mohrhard markus.mohrhard at googlemail.com
Mon Apr 2 08:49:54 PDT 2012


2012/4/2 Stephan Bergmann <sbergman at redhat.com>:
> On 04/02/2012 01:29 PM, Noel Grandin wrote:
>>
>> So moving them to CppUnit would at least be a step in the right direction?
>
>
> I don't think simply rewriting them from Java to C++ in their current form
> is worth it.  It would be better to replace them with better tests.

I agree with that. But it is still a good idea what the old interface
tests did because often they had some nice ideas for corner cases that
you would normally forget. A big advantage of the c++ based tests is
that we are no longer bound to one test method for each api method.
And then there are the test documents(generated test documents) in the
java tests that I found extremelly valuable. Just storing the file in
the java api test and reusing the content to write a c++ based test is
really helpful.

> And once these better tests offer coverage comparable to the old ones, we can
> finally ditch them.
>

I would prefer an incremental process here, but that is just my
opinion. I think it makes sense every time a interface is covered by a
c++ based test that we disable the old java test and only use the new
test.

Regards,
Markus


More information about the LibreOffice mailing list