https://bugs.documentfoundation.org/show_bug.cgi?id=139734
Bug ID: 139734
Summary: Drop redundant asserts after
MacrosTest::loadFromDesktop
Product: LibreOffice
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Keywords: difficultyBeginner, easyHack, skillCpp
Severity: normal
Priority: low
Component: LibreOffice
Assignee: [email protected]
Reporter: [email protected]
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
--
You are receiving this mail because:
You are the assignee for the bug._______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs