summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-07-30 03:24:20 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-07-30 18:35:55 +0000
commitb3537a541053ab1c3c20664b4994fffe6ae26e7a (patch)
tree9420298e35bc66488e6f06f11ad3855596d1675d /sc
parent2acc9d06291b3f271c2a88bb4995d52d2d8d2152 (diff)
loplugin:cppunitassertequals
Change-Id: Iaf1874409310f2728a5170e4b08d5a8a81999ded Reviewed-on: https://gerrit.libreoffice.org/27713 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/opencl-test.cxx4
-rw-r--r--sc/qa/unit/subsequent_export-test.cxx10
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx2
3 files changed, 8 insertions, 8 deletions
diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx
index 8b71bb0463ac..64290cdcdae2 100644
--- a/sc/qa/unit/opencl-test.cxx
+++ b/sc/qa/unit/opencl-test.cxx
@@ -749,10 +749,10 @@ void ScOpenCLTest::testSystematic()
CPPUNIT_ASSERT(nBVertBegin != 0);
CPPUNIT_ASSERT(nAVertEnd > nAVertBegin + 100);
CPPUNIT_ASSERT(nBVertEnd > nBVertBegin + 100);
- CPPUNIT_ASSERT((nAVertEnd-nAVertBegin) == (nBVertEnd-nBVertBegin));
+ CPPUNIT_ASSERT_EQUAL(nAVertEnd-nAVertBegin, nBVertEnd-nBVertBegin);
CPPUNIT_ASSERT(nAHorEnd > 10);
CPPUNIT_ASSERT(nBHorEnd > 10);
- CPPUNIT_ASSERT(nAHorEnd == nBHorEnd);
+ CPPUNIT_ASSERT_EQUAL(nAHorEnd, nBHorEnd);
for (SCROW i = nAVertBegin; i < nAVertEnd; ++i)
{
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index eac7d9889542..60131bc99f3e 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -1924,8 +1924,8 @@ void ScExportTest::testBordersExchangeXLSX()
rDoc.GetBorderLines(nCol + 2, (nRow * 2) + 8, 0, nullptr, &pLineTop, nullptr, &pLineBottom);
if((nCol < 5) && (nRow == 6))
{ // in this range no lines
- CPPUNIT_ASSERT(pLineTop == nullptr);
- CPPUNIT_ASSERT(pLineBottom == nullptr);
+ CPPUNIT_ASSERT(!pLineTop);
+ CPPUNIT_ASSERT(!pLineBottom);
continue;
}
else
@@ -3289,7 +3289,7 @@ void ScExportTest::testMoveCellAnchoredShapes()
// Check cell anchor state
ScAnchorType oldType = ScDrawLayer::GetAnchorType(*pObj);
- CPPUNIT_ASSERT_MESSAGE( "Failed to get anchor type", oldType == SCA_CELL );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Failed to get anchor type", SCA_CELL, oldType);
// Get anchor data
ScDrawObjData* pData = ScDrawLayer::GetObjData(pObj);
@@ -3351,7 +3351,7 @@ void ScExportTest::testMoveCellAnchoredShapes()
// Check cell anchor state
oldType = ScDrawLayer::GetAnchorType(*pObj);
- CPPUNIT_ASSERT_MESSAGE( "Failed to get anchor type", oldType == SCA_CELL );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Failed to get anchor type", SCA_CELL, oldType);
// Get anchor data
pData = ScDrawLayer::GetObjData(pObj);
@@ -3412,7 +3412,7 @@ void ScExportTest::testMoveCellAnchoredShapes()
// Check cell anchor state
oldType = ScDrawLayer::GetAnchorType(*pObj);
- CPPUNIT_ASSERT_MESSAGE( "Failed to get anchor type", oldType == SCA_CELL );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Failed to get anchor type", SCA_CELL, oldType);
// Get anchor data
pData = ScDrawLayer::GetObjData(pObj);
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 62ce8054ad7d..cef4feffda22 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -924,7 +924,7 @@ void ScFiltersTest::testBorderODS()
CPPUNIT_ASSERT_EQUAL(
table::BorderLineStyle::SOLID, pRight->GetBorderLineStyle());
CPPUNIT_ASSERT_EQUAL(5L, pRight->GetWidth());
- CPPUNIT_ASSERT(pRight->GetColor() == Color(COL_BLUE));
+ CPPUNIT_ASSERT_EQUAL(Color(COL_BLUE), pRight->GetColor());
xDocSh->DoClose();
}