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 /comphelper | |
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 'comphelper')
-rw-r--r-- | comphelper/qa/container/comphelper_ifcontainer.cxx | 2 | ||||
-rw-r--r-- | comphelper/qa/string/test_string.cxx | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/comphelper/qa/container/comphelper_ifcontainer.cxx b/comphelper/qa/container/comphelper_ifcontainer.cxx index caa54c55398f..cf38b4e45bfe 100644 --- a/comphelper/qa/container/comphelper_ifcontainer.cxx +++ b/comphelper/qa/container/comphelper_ifcontainer.cxx @@ -112,7 +112,7 @@ namespace comphelper_ifcontainer std::vector< Reference< XInterface > > aElements = pContainer->getElements(); CPPUNIT_ASSERT_EQUAL_MESSAGE("query contents", - static_cast<int>(aElements.size()), nTests); + nTests, static_cast<int>(aElements.size())); if (static_cast<int>(aElements.size()) == nTests) { for (i = 0; i < nTests; i++) diff --git a/comphelper/qa/string/test_string.cxx b/comphelper/qa/string/test_string.cxx index 32a3e7c45e2f..8e4910cc6085 100644 --- a/comphelper/qa/string/test_string.cxx +++ b/comphelper/qa/string/test_string.cxx @@ -75,13 +75,13 @@ void TestString::testDecimalStringToNumber() void TestString::testIsdigitAsciiString() { OString s1("1234"); - CPPUNIT_ASSERT_EQUAL(comphelper::string::isdigitAsciiString(s1), true); + CPPUNIT_ASSERT_EQUAL(true, comphelper::string::isdigitAsciiString(s1)); OString s2("1A34"); - CPPUNIT_ASSERT_EQUAL(comphelper::string::isdigitAsciiString(s2), false); + CPPUNIT_ASSERT_EQUAL(false, comphelper::string::isdigitAsciiString(s2)); OString s3; - CPPUNIT_ASSERT_EQUAL(comphelper::string::isdigitAsciiString(s3), true); + CPPUNIT_ASSERT_EQUAL(true, comphelper::string::isdigitAsciiString(s3)); } using namespace ::com::sun::star; |