diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-04-28 14:22:08 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-04-28 14:22:08 +0200 |
commit | 8cab8bdfe3fd14a07fb472d6af752ee946dc2cad (patch) | |
tree | 8253f1dc3e53d4132453f9d11d460ceaae39809c /sc/qa | |
parent | 9384a34644fb1a6c791681c1bd7c4985f2437bea (diff) |
loplugin:cppunitassertequals: sc
Change-Id: Ifc250cf5bc293b4c87b9abb2d00be62078c2338a
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 2 | ||||
-rw-r--r-- | sc/qa/unit/tiledrendering/tiledrendering.cxx | 20 | ||||
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 2 |
3 files changed, 13 insertions, 11 deletions
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index d96a3b62025d..1b62334c6b43 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -3175,7 +3175,7 @@ void ScFiltersTest::testCustomNumFormatHybridCellODS() // Make sure the cell doesn't have an error value. ScFormulaCell* pFC = rDoc.GetFormulaCell(ScAddress(1,17,0)); CPPUNIT_ASSERT(pFC); - CPPUNIT_ASSERT(pFC->GetErrCode() == FormulaError::NONE); + CPPUNIT_ASSERT_EQUAL(FormulaError::NONE, pFC->GetErrCode()); xDocSh->DoClose(); } diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx index 4ee671a7122f..220a1a271e3b 100644 --- a/sc/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx @@ -33,6 +33,8 @@ #include <svx/svdpage.hxx> #include <chrono> +#include <cstddef> + #include <tabvwsh.hxx> #include <docsh.hxx> #include <document.hxx> @@ -1173,38 +1175,38 @@ void ScTiledRenderingTest::testUndoLimiting() Scheduler::ProcessEventsToIdle(); // check that undo action count in not 0 - CPPUNIT_ASSERT(pUndoManager->GetUndoActionCount() == 1); + CPPUNIT_ASSERT_EQUAL(std::size_t(1), pUndoManager->GetUndoActionCount()); // try to execute undo in view #2 SfxLokHelper::setView(nView2); comphelper::dispatchCommand(".uno:Undo", {}); Scheduler::ProcessEventsToIdle(); // check that undo has not been executed on view #2 - CPPUNIT_ASSERT(pUndoManager->GetUndoActionCount() == 1); + CPPUNIT_ASSERT_EQUAL(std::size_t(1), pUndoManager->GetUndoActionCount()); // try to execute undo in view #1 SfxLokHelper::setView(nView1); comphelper::dispatchCommand(".uno:Undo", {}); Scheduler::ProcessEventsToIdle(); // check that undo has been executed on view #1 - CPPUNIT_ASSERT(pUndoManager->GetUndoActionCount() == 0); + CPPUNIT_ASSERT_EQUAL(std::size_t(0), pUndoManager->GetUndoActionCount()); // check that redo action count in not 0 - CPPUNIT_ASSERT(pUndoManager->GetRedoActionCount() == 1); + CPPUNIT_ASSERT_EQUAL(std::size_t(1), pUndoManager->GetRedoActionCount()); // try to execute redo in view #2 SfxLokHelper::setView(nView2); comphelper::dispatchCommand(".uno:Redo", {}); Scheduler::ProcessEventsToIdle(); // check that redo has not been executed on view #2 - CPPUNIT_ASSERT(pUndoManager->GetRedoActionCount() == 1); + CPPUNIT_ASSERT_EQUAL(std::size_t(1), pUndoManager->GetRedoActionCount()); // try to execute redo in view #1 SfxLokHelper::setView(nView1); comphelper::dispatchCommand(".uno:Redo", {}); Scheduler::ProcessEventsToIdle(); // check that redo has been executed on view #1 - CPPUNIT_ASSERT(pUndoManager->GetRedoActionCount() == 0); + CPPUNIT_ASSERT_EQUAL(std::size_t(0), pUndoManager->GetRedoActionCount()); mxComponent->dispose(); mxComponent.clear(); @@ -1244,14 +1246,14 @@ void ScTiledRenderingTest::testUndoRepairDispatch() Scheduler::ProcessEventsToIdle(); // check that undo action count in not 0 - CPPUNIT_ASSERT(pUndoManager->GetUndoActionCount() == 1); + CPPUNIT_ASSERT_EQUAL(std::size_t(1), pUndoManager->GetUndoActionCount()); // try to execute undo in view #2 SfxLokHelper::setView(nView2); comphelper::dispatchCommand(".uno:Undo", {}); Scheduler::ProcessEventsToIdle(); // check that undo has not been executed on view #2 - CPPUNIT_ASSERT(pUndoManager->GetUndoActionCount() == 1); + CPPUNIT_ASSERT_EQUAL(std::size_t(1), pUndoManager->GetUndoActionCount()); // try to execute undo in view #2 in repair mode SfxLokHelper::setView(nView2); @@ -1262,7 +1264,7 @@ void ScTiledRenderingTest::testUndoRepairDispatch() comphelper::dispatchCommand(".uno:Undo", aPropertyValues); Scheduler::ProcessEventsToIdle(); // check that undo has been executed on view #2 in repair mode - CPPUNIT_ASSERT(pUndoManager->GetUndoActionCount() == 0); + CPPUNIT_ASSERT_EQUAL(std::size_t(0), pUndoManager->GetUndoActionCount()); mxComponent->dispose(); mxComponent.clear(); diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 9918e88e7f25..9e159df21875 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -5415,7 +5415,7 @@ void Test::testNoteLifeCycle() ScPostIt* pUndoNoteB4 = m_pDoc->GetNote(aPosB4); CPPUNIT_ASSERT_MESSAGE("No cell comment at B4 after Undo.", pUndoNoteB4); const SdrCaptionObj* pUndoCaptionB4 = pUndoNoteB4->GetCaption(); - CPPUNIT_ASSERT_MESSAGE("Captions not identical after Merge Undo.", pCaptionB4 == pUndoCaptionB4); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Captions not identical after Merge Undo.", pCaptionB4, pUndoCaptionB4); // In a second document copy a note from B5 to clipboard, close the |