diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-31 13:20:41 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-01 09:14:25 +0200 |
commit | 23b08449736ba825a9c582ba18b7a5fdba178e47 (patch) | |
tree | 8513c824f1964f84f957a41658f6d173a008c469 /desktop | |
parent | 8e63d451b2aeb646ece98c4e219f92957f4482bd (diff) |
loplugin: look for CPPUNIT_ASSERT_EQUALS with params swapped
idea originally from either tml or moggi, can't remember which
Change-Id: Id78d75035036d3aa1666e33469c6eeb38f9e624d
Reviewed-on: https://gerrit.libreoffice.org/55126
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/qa/desktop_lib/test_desktop_lib.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index 51e048d04af4..1d41456adda8 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -813,8 +813,8 @@ void DesktopLOKTest::testCommandResult() std::stringstream aStream(m_aCommandResult.getStr()); boost::property_tree::read_json(aStream, aTree); - CPPUNIT_ASSERT_EQUAL(aTree.get_child("commandName").get_value<std::string>(), std::string(".uno:Bold")); - CPPUNIT_ASSERT_EQUAL(aTree.get_child("success").get_value<bool>(), true); + CPPUNIT_ASSERT_EQUAL(std::string(".uno:Bold"), aTree.get_child("commandName").get_value<std::string>()); + CPPUNIT_ASSERT_EQUAL(true, aTree.get_child("success").get_value<bool>()); comphelper::LibreOfficeKit::setActive(false); } @@ -909,7 +909,7 @@ void DesktopLOKTest::testSheetOperations() "{ \"Index\": { \"type\": \"long\", \"value\": 3 } }", false); Scheduler::ProcessEventsToIdle(); - CPPUNIT_ASSERT_EQUAL(pDocument->pClass->getParts(pDocument), 6); + CPPUNIT_ASSERT_EQUAL(6, pDocument->pClass->getParts(pDocument)); std::vector<OString> aExpected = { "FirstSheet", "Renamed", "Sheet3", "Sheet4", "Sheet5", "LastSheet" }; for (int i = 0; i < 6; ++i) @@ -2242,7 +2242,7 @@ void DesktopLOKTest::testExtractParameter() namespace { -size_t documentClassOffset(int i) +constexpr size_t documentClassOffset(int i) { return sizeof(static_cast<struct _LibreOfficeKitDocumentClass*>(nullptr)->nSize) + i * sizeof(void*); } |