summaryrefslogtreecommitdiff
path: root/sc/qa/extras
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-11-28 09:31:18 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-11-28 10:05:27 +0000
commit2b04d710a27edb16bb6c47fd572a8c81d265b046 (patch)
treeae1e968eedfd76f8fa758ddcaee26ec3a69fc682 /sc/qa/extras
parentdd974413acc6ab00168a301cbb53b3c9caa11e32 (diff)
sc: fix remaining loplugin:cppunitassertequals warnings
Change-Id: I12191d1fd776d617d9418079b77b4c8e84d199a3 Reviewed-on: https://gerrit.libreoffice.org/31306 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sc/qa/extras')
-rw-r--r--sc/qa/extras/anchor.cxx16
-rw-r--r--sc/qa/extras/macros-test.cxx8
2 files changed, 12 insertions, 12 deletions
diff --git a/sc/qa/extras/anchor.cxx b/sc/qa/extras/anchor.cxx
index 823370529e0c..b5310abe69d3 100644
--- a/sc/qa/extras/anchor.cxx
+++ b/sc/qa/extras/anchor.cxx
@@ -95,13 +95,13 @@ void ScAnchorTest::testUndoAnchor()
ScDrawLayer::SetCellAnchoredFromPosition(*pObject, rDoc, 0);
// Check state
ScAnchorType oldType = ScDrawLayer::GetAnchorType(*pObject);
- CPPUNIT_ASSERT(oldType == SCA_CELL );
+ CPPUNIT_ASSERT_EQUAL(SCA_CELL, oldType);
// Change all selected objects to page anchor
pViewShell->GetViewData().GetDispatcher().Execute(SID_ANCHOR_PAGE);
// Check state
ScAnchorType newType = ScDrawLayer::GetAnchorType(*pObject);
- CPPUNIT_ASSERT(newType == SCA_PAGE );
+ CPPUNIT_ASSERT_EQUAL(SCA_PAGE, newType);
// Undo and check its result.
SfxUndoManager* pUndoMgr = rDoc.GetUndoManager();
@@ -109,39 +109,39 @@ void ScAnchorTest::testUndoAnchor()
pUndoMgr->Undo();
// Check anchor type
- CPPUNIT_ASSERT(oldType == ScDrawLayer::GetAnchorType(*pObject) );
+ CPPUNIT_ASSERT_EQUAL(oldType, ScDrawLayer::GetAnchorType(*pObject));
CPPUNIT_ASSERT_EQUAL(int(GraphicType::Bitmap), int(rGraphicObj.GetGraphic().GetType()));
CPPUNIT_ASSERT_EQUAL(sal_uLong(864900), rGraphicObj.GetSizeBytes());
pUndoMgr->Redo();
// Check anchor type
- CPPUNIT_ASSERT(newType == ScDrawLayer::GetAnchorType(*pObject) );
+ CPPUNIT_ASSERT_EQUAL(newType, ScDrawLayer::GetAnchorType(*pObject));
CPPUNIT_ASSERT_EQUAL(int(GraphicType::Bitmap), int(rGraphicObj.GetGraphic().GetType()));
CPPUNIT_ASSERT_EQUAL(sal_uLong(864900), rGraphicObj.GetSizeBytes());
ScDrawLayer::SetPageAnchored(*pObject);
// Check state
oldType = ScDrawLayer::GetAnchorType(*pObject);
- CPPUNIT_ASSERT(oldType == SCA_PAGE );
+ CPPUNIT_ASSERT_EQUAL(SCA_PAGE, oldType);
// Change all selected objects to cell anchor
pViewShell->GetViewData().GetDispatcher().Execute(SID_ANCHOR_CELL);
// Check state
newType = ScDrawLayer::GetAnchorType(*pObject);
- CPPUNIT_ASSERT(newType == SCA_CELL );
+ CPPUNIT_ASSERT_EQUAL(SCA_CELL, newType);
pUndoMgr->Undo();
// Check anchor type
- CPPUNIT_ASSERT(oldType == ScDrawLayer::GetAnchorType(*pObject) );
+ CPPUNIT_ASSERT_EQUAL(oldType, ScDrawLayer::GetAnchorType(*pObject));
CPPUNIT_ASSERT_EQUAL(int(GraphicType::Bitmap), int(rGraphicObj.GetGraphic().GetType()));
CPPUNIT_ASSERT_EQUAL(sal_uLong(864900), rGraphicObj.GetSizeBytes());
pUndoMgr->Redo();
// Check anchor type
- CPPUNIT_ASSERT(newType == ScDrawLayer::GetAnchorType(*pObject) );
+ CPPUNIT_ASSERT_EQUAL(newType, ScDrawLayer::GetAnchorType(*pObject));
CPPUNIT_ASSERT_EQUAL(int(GraphicType::Bitmap), int(rGraphicObj.GetGraphic().GetType()));
CPPUNIT_ASSERT_EQUAL(sal_uLong(864900), rGraphicObj.GetSizeBytes());
diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx
index 064dccd09c55..591a7f88c129 100644
--- a/sc/qa/extras/macros-test.cxx
+++ b/sc/qa/extras/macros-test.cxx
@@ -91,7 +91,7 @@ void ScMacrosTest::testMSP()
aRet >>= sResult;
SAL_INFO("sc.qa", "Result is " << sResult );
- CPPUNIT_ASSERT_MESSAGE("TestMSP ( for fdo#67547) failed", sResult == "OK" );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("TestMSP ( for fdo#67547) failed", OUString("OK"), sResult);
pDocSh->DoClose();
}
@@ -124,7 +124,7 @@ void ScMacrosTest::testPasswordProtectedStarBasic()
aParams, aRet, aOutParamIndex, aOutParam);
OUString aValue = rDoc.GetString(0,0,0);
- CPPUNIT_ASSERT_MESSAGE("User defined types script did not change the value of Sheet1.A1", aValue == "success");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("User defined types script did not change the value of Sheet1.A1", OUString("success"), aValue);
// Big Module
@@ -134,7 +134,7 @@ void ScMacrosTest::testPasswordProtectedStarBasic()
aParams, aRet, aOutParamIndex, aOutParam);
aValue = rDoc.GetString(1,0,0);
- CPPUNIT_ASSERT_MESSAGE("Big module script did not change the value of Sheet1.B1", aValue == "success");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Big module script did not change the value of Sheet1.B1", OUString("success"), aValue);
// far big method tdf#94617
@@ -144,7 +144,7 @@ void ScMacrosTest::testPasswordProtectedStarBasic()
aParams, aRet, aOutParamIndex, aOutParam);
aValue = rDoc.GetString(2,0,0);
- CPPUNIT_ASSERT_MESSAGE("Far Method script did not change the value of Sheet1.C1", aValue == "success");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Far Method script did not change the value of Sheet1.C1", OUString("success"), aValue);
pDocSh->DoClose();