Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


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

--- Comment #14 from Markus Mohrhard <markus.mohrhard@googlemail.com> ---
(In reply to David Tardon from comment #13)
(In reply to Markus Mohrhard from comment #0)
ucalc is one of the mail calc tests and is split between many files in
sc/qa/unit

This task is about improving the existing pattern around checkFormula in
sc/qa/unit/ucalc_formula.cxx

A typical piece of code looks like this:

    if (!checkFormula(*m_pDoc, aPos, "SUM(A3:A7)"))
        CPPUNIT_FAIL("Wrong formula!");

This should be changed to something like:

checkFormula(*m_pDoc, aPos, "SUM(A3:A7)", "Wrong formula!");

What is wrong with

CPPUNIT_ASSERT_MESSAGE("Wrong formula!", checkFormula(*m_pDoc, aPos,
"SUM(A3:A7)"))

? That would address Kohei's concerns without any necessary changes to
cppunit.

I already talked to Kohei and he seems to be fine with changing it.

The reason that I wanted to move to CPPUNIT_ASSERT_EQUAL is that it will print
both strings in case of a failure which is extremely helpful for debugging.

I think if necessary we can implement Tor's suggestion in LibreOffice. There is
no need to do it in CPPUNIT as there should be already support for an own
asserter message.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.