summaryrefslogtreecommitdiffstats
path: root/comphelper/qa/container/comphelper_ifcontainer.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-08-10 09:08:24 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-08-10 10:56:02 +0000
commit583e41b9c8f734cb403b9ba9ffe2d0844fab981f (patch)
tree33f9051430ed8d9c210b9a6d5a43d1656cea454d /comphelper/qa/container/comphelper_ifcontainer.cxx
parentupdate credits (diff)
downloadcore-583e41b9c8f734cb403b9ba9ffe2d0844fab981f.tar.gz
core-583e41b9c8f734cb403b9ba9ffe2d0844fab981f.zip
comphelper: fix loplugin:cppunitassertequals warnings
Change-Id: If042462d8f250dbe2e1be278b7524dab243b08e8 Reviewed-on: https://gerrit.libreoffice.org/28012 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'comphelper/qa/container/comphelper_ifcontainer.cxx')
-rw-r--r--comphelper/qa/container/comphelper_ifcontainer.cxx30
1 files changed, 15 insertions, 15 deletions
diff --git a/comphelper/qa/container/comphelper_ifcontainer.cxx b/comphelper/qa/container/comphelper_ifcontainer.cxx
index 733a7e056751..261dedba34db 100644
--- a/comphelper/qa/container/comphelper_ifcontainer.cxx
+++ b/comphelper/qa/container/comphelper_ifcontainer.cxx
@@ -68,8 +68,8 @@ namespace comphelper_ifcontainer
pContainer = new comphelper::OInterfaceContainerHelper2(m_aGuard);
- CPPUNIT_ASSERT_MESSAGE("Empty container not empty",
- pContainer->getLength() == 0);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Empty container not empty",
+ static_cast<sal_Int32>(0), pContainer->getLength());
int i;
for (i = 0; i < nTests; i++)
@@ -77,21 +77,21 @@ namespace comphelper_ifcontainer
Reference<XEventListener> xRef = new ContainerListener(&aStats);
int nNewLen = pContainer->addInterface(xRef);
- CPPUNIT_ASSERT_MESSAGE("addition length mismatch",
- nNewLen == i + 1);
- CPPUNIT_ASSERT_MESSAGE("addition length mismatch",
- pContainer->getLength() == i + 1);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("addition length mismatch",
+ i + 1, nNewLen);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("addition length mismatch",
+ static_cast<sal_Int32>(i + 1), pContainer->getLength());
}
- CPPUNIT_ASSERT_MESSAGE("alive count mismatch",
- aStats.m_nAlive == nTests);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("alive count mismatch",
+ nTests, aStats.m_nAlive);
EventObject aObj;
pContainer->disposeAndClear(aObj);
- CPPUNIT_ASSERT_MESSAGE("dispose count mismatch",
- aStats.m_nDisposed == nTests);
- CPPUNIT_ASSERT_MESSAGE("leaked container left alive",
- aStats.m_nAlive == 0);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("dispose count mismatch",
+ nTests, aStats.m_nDisposed);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("leaked container left alive",
+ 0, aStats.m_nAlive);
delete pContainer;
}
@@ -119,13 +119,13 @@ namespace comphelper_ifcontainer
for (i = 0; i < nTests; i++)
{
CPPUNIT_ASSERT_MESSAGE("mismatching elements",
- aElements[i] == aListeners[i]);
+ bool(aElements[i] == aListeners[i]));
}
}
pContainer->clear();
- CPPUNIT_ASSERT_MESSAGE("non-empty container post clear",
- pContainer->getLength() == 0);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("non-empty container post clear",
+ static_cast<sal_Int32>(0), pContainer->getLength());
delete pContainer;
}