summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-11-18 08:12:33 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-11-18 08:27:24 +0000
commit3ab9cebf45e725bbd3d7828dbcf974d3bef2c32c (patch)
tree8034abc8e3d93c73b48288919750de922b4c6708 /starmath
parentd8c386593e42e1f0cce52d052b1009c59e75afa2 (diff)
starmath: fix loplugin:cppunitassertequals warnings
Change-Id: I49bddc1e51550c1696a1e93ce22e6b85bb663cd6 Reviewed-on: https://gerrit.libreoffice.org/30949 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/qa/cppunit/test_starmath.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/starmath/qa/cppunit/test_starmath.cxx b/starmath/qa/cppunit/test_starmath.cxx
index 91a14bd91a9f..05cddc500d8e 100644
--- a/starmath/qa/cppunit/test_starmath.cxx
+++ b/starmath/qa/cppunit/test_starmath.cxx
@@ -114,7 +114,7 @@ void Test::editMarker()
m_pEditWindow->SetText(sMarkedText);
m_pEditWindow->Flush();
OUString sFinalText = m_pEditWindow->GetText();
- CPPUNIT_ASSERT_MESSAGE("Should be equal text", sFinalText == sMarkedText);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be equal text", sMarkedText, sFinalText);
}
{
@@ -135,7 +135,7 @@ void Test::editMarker()
m_pEditWindow->Flush();
OUString sFinalText = m_pEditWindow->GetText();
- CPPUNIT_ASSERT_MESSAGE("Should be a under b under c", sFinalText == sTargetText);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be a under b under c", sTargetText, sFinalText);
}
{
@@ -178,7 +178,7 @@ void Test::editUndoRedo()
rEditEngine.SetText(0, sStringOne);
m_xDocShRef->UpdateText();
OUString sFinalText = m_xDocShRef->GetText();
- CPPUNIT_ASSERT_MESSAGE("Strings must match", sStringOne == sFinalText);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Strings must match", sFinalText, sStringOne);
}
OUString sStringTwo("a over b");
@@ -186,7 +186,7 @@ void Test::editUndoRedo()
rEditEngine.SetText(0, sStringTwo);
m_xDocShRef->UpdateText();
OUString sFinalText = m_xDocShRef->GetText();
- CPPUNIT_ASSERT_MESSAGE("Strings must match", sStringTwo == sFinalText);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Strings must match", sFinalText, sStringTwo);
}
SfxRequest aUndo(SID_UNDO, SfxCallMode::SYNCHRON, SmDocShell::GetPool());
@@ -195,7 +195,7 @@ void Test::editUndoRedo()
m_xDocShRef->Execute(aUndo);
m_xDocShRef->UpdateText();
OUString sFinalText = m_xDocShRef->GetText();
- CPPUNIT_ASSERT_MESSAGE("Strings much match", sStringOne == sFinalText);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Strings much match", sFinalText, sStringOne);
}
{
@@ -210,7 +210,7 @@ void Test::editUndoRedo()
m_xDocShRef->Execute(aRedo);
m_xDocShRef->UpdateText();
OUString sFinalText = m_xDocShRef->GetText();
- CPPUNIT_ASSERT_MESSAGE("Strings much match", sStringOne == sFinalText);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Strings much match", sFinalText, sStringOne);
}
{
@@ -245,7 +245,7 @@ void Test::viewZoom()
rEditEngine.SetText(0, sStringOne);
m_xDocShRef->UpdateText();
OUString sFinalText = m_xDocShRef->GetText();
- CPPUNIT_ASSERT_MESSAGE("Strings must match", sStringOne == sFinalText);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Strings must match", sFinalText, sStringOne);
}
SmGraphicWindow &rGraphicWindow = m_pViewShell->GetGraphicWindow();
@@ -263,7 +263,7 @@ void Test::viewZoom()
SfxRequest aZoomOut(SID_ZOOMOUT, SfxCallMode::SYNCHRON, m_pViewShell->GetPool());
m_pViewShell->Execute(aZoomOut);
nFinalZoom = rGraphicWindow.GetZoom();
- CPPUNIT_ASSERT_MESSAGE("Should be equal", nFinalZoom == nOrigZoom);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be equal", nOrigZoom, nFinalZoom);
}
sal_uInt16 nOptimalZoom=0;
@@ -281,7 +281,7 @@ void Test::viewZoom()
SfxRequest aZoom(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, aSet);
m_pViewShell->Execute(aZoom);
nFinalZoom = rGraphicWindow.GetZoom();
- CPPUNIT_ASSERT_MESSAGE("Should be optimal zoom", nFinalZoom == nOptimalZoom);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be optimal zoom", nOptimalZoom, nFinalZoom);
}
//To-Do: investigate GetPrinter logic of SvxZoomType::PAGEWIDTH/SvxZoomType::WHOLEPAGE to ensure
@@ -327,7 +327,7 @@ void Test::viewZoom()
SfxRequest aZoom(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, aSet);
m_pViewShell->Execute(aZoom);
nFinalZoom = rGraphicWindow.GetZoom();
- CPPUNIT_ASSERT_MESSAGE("Should be 50%", nFinalZoom == 50);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be 50%", static_cast<sal_uInt16>(50), nFinalZoom);
}
{
@@ -336,7 +336,7 @@ void Test::viewZoom()
SfxRequest aZoom(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, aSet);
m_pViewShell->Execute(aZoom);
nFinalZoom = rGraphicWindow.GetZoom();
- CPPUNIT_ASSERT_MESSAGE("Should be Clipped to 25%", nFinalZoom == 25);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be Clipped to 25%", static_cast<sal_uInt16>(25), nFinalZoom);
}
{
@@ -345,7 +345,7 @@ void Test::viewZoom()
SfxRequest aZoom(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, aSet);
m_pViewShell->Execute(aZoom);
nFinalZoom = rGraphicWindow.GetZoom();
- CPPUNIT_ASSERT_MESSAGE("Should be Clipped to 800%", nFinalZoom == 800);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be Clipped to 800%", static_cast<sal_uInt16>(800), nFinalZoom);
}
}