summaryrefslogtreecommitdiff
path: root/unoxml
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 /unoxml
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 'unoxml')
-rw-r--r--unoxml/qa/unit/domtest.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/unoxml/qa/unit/domtest.cxx b/unoxml/qa/unit/domtest.cxx
index 67afde99d3a0..1b1daa56b1f9 100644
--- a/unoxml/qa/unit/domtest.cxx
+++ b/unoxml/qa/unit/domtest.cxx
@@ -242,7 +242,9 @@ struct BasicTest : public test::BootstrapFixture
CPPUNIT_ASSERT_MESSAGE("Valid input file did not result in XDocument #2 (exception thrown)", false);
}
CPPUNIT_ASSERT_MESSAGE("No parse warnings in unclean input file",
- mxErrHandler->mnWarnCount && !mxErrHandler->mnErrCount /*&& !mxErrHandler->mnFatalCount*/);
+ mxErrHandler->mnWarnCount);
+ CPPUNIT_ASSERT_MESSAGE("No parse warnings in unclean input file",
+ !mxErrHandler->mnErrCount /*&& !mxErrHandler->mnFatalCount*/);
}
void errorInputTest()
@@ -261,7 +263,9 @@ struct BasicTest : public test::BootstrapFixture
// It's OK to catch an exception here as we parse incorrect XML file
}
CPPUNIT_ASSERT_MESSAGE("No parse errors in unclean input file",
- !mxErrHandler->mnWarnCount && mxErrHandler->mnErrCount /*&& !mxErrHandler->mnFatalCount*/);
+ !mxErrHandler->mnWarnCount);
+ CPPUNIT_ASSERT_MESSAGE("No parse errors in unclean input file",
+ mxErrHandler->mnErrCount /*&& !mxErrHandler->mnFatalCount*/);
}
// Change the following lines only, if you add, remove or rename