[Libreoffice-bugs] [Bug 139734] Drop redundant asserts after MacrosTest::loadFromDesktop

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Feb 5 03:17:38 UTC 2021


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

--- Comment #2 from Moaz El-defrawy <moaz.eldefrawy at gmail.com> ---
(In reply to Mike Kaganski from comment #0)
> In many unit tests (e.g., in dbaccess/qa/extras/empty-stdlib-save.cxx), we
> have this pattern asserting on return value of MacrosTest::loadFromDesktop:
> 
> > uno::Reference<lang::XComponent> xComponent = loadFromDesktop(aFileName);
> > CPPUNIT_ASSERT(xComponent.is());
> 
> MacrosTest::loadFromDesktop itself asserts on its return value (see [1]).
> Thus, there additional checks in unit tests are redundant, and only create
> noise unrelated to the tested functionality.
> 
> This easy hack is about finding all the places where the method is used, and
> removing the direct assert on its return value if present.
> 
> [1]
> https://opengrok.libreoffice.org/xref/core/unotest/source/cpp/macros_test.
> cxx?r=042033f1&mo=984&fi=39#39

Hey, can I work on this?
(Sorry, for making the comment twice. still getting used to the UI)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210205/ea92f410/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list