summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-02-08 07:48:59 +0100
committerStephan Bergmann <sbergman@redhat.com>2021-02-08 09:15:01 +0100
commit6b00d0576a310796590631d14c54d7d5ea6814ac (patch)
tree2e11a4454592be39cfeaa68458cae964d8cdef5e /sdext
parent17149f65f03a34e88bb4a10abcd20e6891f5d7ca (diff)
Improve loplugin:cppunitassertequal for CPPUNIT_ASSERT(a && b)
...by re-enabling the code temporarily #if'ed-out in a528392e71bc70136021be4e3d83732fccbb885e "Fixed/improved loplugin:cppunitassertequals" (and which then triggers lots of other lopglugin:cppunitassertequal CPPUNIT_ASSERT -> CPPUNIT_ASSERT_EQUAL warnings). For two css::uno::Reference equality comparisons in cppu/qa/test_any.cxx, it was more straightforward to rewrite them with an explicit call to operator == (which silences loplugin:cppunitassertequal) than to adapt them to CPPUNIT_ASSERT_EQUAL's requirement for arguments of identical types. In sc/qa/unit/ucalc_pivottable.cxx, ScDPItemData needs toString, which has been implemented trivially for now, but might want to combine that with the DEBUG_PIVOT_TABLE-only ScDPItemData::Dump. Change-Id: Iae6d09cf69bd4e52fe4411bba9e50c48e696291c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110546 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/pdfimport/test/tests.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/sdext/source/pdfimport/test/tests.cxx b/sdext/source/pdfimport/test/tests.cxx
index 0865224a7684..6caa07cb2354 100644
--- a/sdext/source/pdfimport/test/tests.cxx
+++ b/sdext/source/pdfimport/test/tests.cxx
@@ -86,9 +86,12 @@ namespace
CPPUNIT_ASSERT_MESSAGE( "endPage() called", m_bPageEnded );
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Num pages equal one", sal_Int32(1), m_nNumPages );
CPPUNIT_ASSERT_MESSAGE( "Correct hyperlink bounding box",
- rtl::math::approxEqual(m_aHyperlinkBounds.X1,34.7 ) &&
- rtl::math::approxEqual(m_aHyperlinkBounds.Y1,386.0) &&
- rtl::math::approxEqual(m_aHyperlinkBounds.X2,166.7) &&
+ rtl::math::approxEqual(m_aHyperlinkBounds.X1,34.7 ) );
+ CPPUNIT_ASSERT_MESSAGE( "Correct hyperlink bounding box",
+ rtl::math::approxEqual(m_aHyperlinkBounds.Y1,386.0) );
+ CPPUNIT_ASSERT_MESSAGE( "Correct hyperlink bounding box",
+ rtl::math::approxEqual(m_aHyperlinkBounds.X2,166.7) );
+ CPPUNIT_ASSERT_MESSAGE( "Correct hyperlink bounding box",
rtl::math::approxEqual(m_aHyperlinkBounds.Y2,406.2) );
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Correct hyperlink URI", OUString("http://download.openoffice.org/"), m_aURI );