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>
This commit is contained in:
parent
d8c386593e
commit
3ab9cebf45
@ -212,8 +212,8 @@ void ScFiltersTest::testTdf91979()
|
|||||||
Point aPos = aViewData.GetScrPos(MAXCOL - 1, 10000, SC_SPLIT_TOPLEFT, true);
|
Point aPos = aViewData.GetScrPos(MAXCOL - 1, 10000, SC_SPLIT_TOPLEFT, true);
|
||||||
int nColWidth = ScViewData::ToPixel(pDoc->GetColWidth(0, 0), aViewData.GetPPTX());
|
int nColWidth = ScViewData::ToPixel(pDoc->GetColWidth(0, 0), aViewData.GetPPTX());
|
||||||
int nRowHeight = ScViewData::ToPixel(pDoc->GetRowHeight(0, 0), aViewData.GetPPTY());
|
int nRowHeight = ScViewData::ToPixel(pDoc->GetRowHeight(0, 0), aViewData.GetPPTY());
|
||||||
CPPUNIT_ASSERT(aPos.getX() == (MAXCOL - 1) * nColWidth);
|
CPPUNIT_ASSERT_EQUAL(static_cast<long>((MAXCOL - 1) * nColWidth), aPos.getX());
|
||||||
CPPUNIT_ASSERT(aPos.getY() == 10000 * nRowHeight);
|
CPPUNIT_ASSERT_EQUAL(static_cast<long>(10000 * nRowHeight), aPos.getY());
|
||||||
|
|
||||||
xComponent->dispose();
|
xComponent->dispose();
|
||||||
}
|
}
|
||||||
|
@ -114,7 +114,7 @@ void Test::editMarker()
|
|||||||
m_pEditWindow->SetText(sMarkedText);
|
m_pEditWindow->SetText(sMarkedText);
|
||||||
m_pEditWindow->Flush();
|
m_pEditWindow->Flush();
|
||||||
OUString sFinalText = m_pEditWindow->GetText();
|
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();
|
m_pEditWindow->Flush();
|
||||||
OUString sFinalText = m_pEditWindow->GetText();
|
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);
|
rEditEngine.SetText(0, sStringOne);
|
||||||
m_xDocShRef->UpdateText();
|
m_xDocShRef->UpdateText();
|
||||||
OUString sFinalText = m_xDocShRef->GetText();
|
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");
|
OUString sStringTwo("a over b");
|
||||||
@ -186,7 +186,7 @@ void Test::editUndoRedo()
|
|||||||
rEditEngine.SetText(0, sStringTwo);
|
rEditEngine.SetText(0, sStringTwo);
|
||||||
m_xDocShRef->UpdateText();
|
m_xDocShRef->UpdateText();
|
||||||
OUString sFinalText = m_xDocShRef->GetText();
|
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());
|
SfxRequest aUndo(SID_UNDO, SfxCallMode::SYNCHRON, SmDocShell::GetPool());
|
||||||
@ -195,7 +195,7 @@ void Test::editUndoRedo()
|
|||||||
m_xDocShRef->Execute(aUndo);
|
m_xDocShRef->Execute(aUndo);
|
||||||
m_xDocShRef->UpdateText();
|
m_xDocShRef->UpdateText();
|
||||||
OUString sFinalText = m_xDocShRef->GetText();
|
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->Execute(aRedo);
|
||||||
m_xDocShRef->UpdateText();
|
m_xDocShRef->UpdateText();
|
||||||
OUString sFinalText = m_xDocShRef->GetText();
|
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);
|
rEditEngine.SetText(0, sStringOne);
|
||||||
m_xDocShRef->UpdateText();
|
m_xDocShRef->UpdateText();
|
||||||
OUString sFinalText = m_xDocShRef->GetText();
|
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();
|
SmGraphicWindow &rGraphicWindow = m_pViewShell->GetGraphicWindow();
|
||||||
@ -263,7 +263,7 @@ void Test::viewZoom()
|
|||||||
SfxRequest aZoomOut(SID_ZOOMOUT, SfxCallMode::SYNCHRON, m_pViewShell->GetPool());
|
SfxRequest aZoomOut(SID_ZOOMOUT, SfxCallMode::SYNCHRON, m_pViewShell->GetPool());
|
||||||
m_pViewShell->Execute(aZoomOut);
|
m_pViewShell->Execute(aZoomOut);
|
||||||
nFinalZoom = rGraphicWindow.GetZoom();
|
nFinalZoom = rGraphicWindow.GetZoom();
|
||||||
CPPUNIT_ASSERT_MESSAGE("Should be equal", nFinalZoom == nOrigZoom);
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be equal", nOrigZoom, nFinalZoom);
|
||||||
}
|
}
|
||||||
|
|
||||||
sal_uInt16 nOptimalZoom=0;
|
sal_uInt16 nOptimalZoom=0;
|
||||||
@ -281,7 +281,7 @@ void Test::viewZoom()
|
|||||||
SfxRequest aZoom(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, aSet);
|
SfxRequest aZoom(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, aSet);
|
||||||
m_pViewShell->Execute(aZoom);
|
m_pViewShell->Execute(aZoom);
|
||||||
nFinalZoom = rGraphicWindow.GetZoom();
|
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
|
//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);
|
SfxRequest aZoom(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, aSet);
|
||||||
m_pViewShell->Execute(aZoom);
|
m_pViewShell->Execute(aZoom);
|
||||||
nFinalZoom = rGraphicWindow.GetZoom();
|
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);
|
SfxRequest aZoom(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, aSet);
|
||||||
m_pViewShell->Execute(aZoom);
|
m_pViewShell->Execute(aZoom);
|
||||||
nFinalZoom = rGraphicWindow.GetZoom();
|
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);
|
SfxRequest aZoom(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, aSet);
|
||||||
m_pViewShell->Execute(aZoom);
|
m_pViewShell->Execute(aZoom);
|
||||||
nFinalZoom = rGraphicWindow.GetZoom();
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user