[Bug 90290] reduce some copy&paste code in ucalc

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat Apr 11 01:26:03 PDT 2015


https://bugs.documentfoundation.org/show_bug.cgi?id=90290

--- Comment #12 from Tor Lillqvist <tml at iki.fi> ---
Brent: The line number and file name in messages about failed unit tests come
(in the examples in the initial comment) from where the CPPUNIT_FAIL macro is
called. So if CPPUNIT_FAIL is moved into some function that is called from
multiple places, the message no longer gives the true line number and source
file to identify which test actually fails. Thus it might be useful if there
was another macro, CPPUNIT_FAIL_AT(message, file, line), and such a function
(the checkFormula() in Markus's comment) would then take also file name and
line number, which would be passed on to CPPUNIT_FAIL.

CPPUNIT_FAIL (and other macros starting with "CPPUNIT_") are from a separate
piece of software called cppunit. As it happens, it's the LibreOffice
developers (Markus in particular, I think) that are the upstream nowadays of
that software, so we can easily amend its API as we see useful, and release a
new version. Brent, you could even suggest such a patch to cppunit. (I am not
sure what the correct procedure for that is, do we even have gerrit for that,
too?)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20150411/e0dfbc6c/attachment.html>


More information about the LibreOffice mailing list