[Libreoffice] howto for getting non-trivial cppunit tests up and running
thb at documentfoundation.org
Wed Oct 20 16:20:55 PDT 2010
Caolan McNamara wrote:
> sc/qa/unit had an existing cppunit test to ensure that calc can do
> =SUM(A1:A2) correctly but it was currently disabled seeing as it didn't
> work, mostly due to miserable bootstrapping problems. I've fixed that
> test (I think), so I hope it can now provide a basis for adding more.
Hi Caolan -
interesting, cool that this is actually possible - I kinda evaded
the full-scale bootstrapping problem somehow, mostly doing
scaffolding for testing parts of app functionality. There are three
patches where I ended up with useful unit tests:
The impress autolayout actually gets away w/o any uno setup; the
writer test fakes a uno.ini (see the makefile there) - I guess,
there's a fine line between trying to fake a ~whole office setup,
vs. testing exactly one class (and doing some scaffolding and/or
refactoring to really only test that one class) - for the former,
maybe the complextest framework is a closer fit?
> So, one suggestion I have it to look at stripmining testtool and
> try and start to *move* the calc tests out of the unreliable and
> painful testtool and into hopefully reliable cppunit tests which
> are run at buildtime
That would be a *very* useful end result.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: not available
More information about the LibreOffice