summaryrefslogtreecommitdiff
path: root/svl/qa/unit/svl.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-12-02 08:17:32 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-12-02 09:04:07 +0000
commit49f658f568dfae574217ec8f1c72654ffd6855bc (patch)
treee3f636e9a8eb1b0e93ce9eb269ac68358601569b /svl/qa/unit/svl.cxx
parentb0e7e6293d733a6e46f9f4fb9df262c94ef8e62c (diff)
svl: fix loplugin:cppunitassertequals warnings
Change-Id: Ice929418e46ff42517a47dfcd5888a5cce36ae51 Reviewed-on: https://gerrit.libreoffice.org/31523 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'svl/qa/unit/svl.cxx')
-rw-r--r--svl/qa/unit/svl.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index b8c3fc324651..9804c7eeaca5 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -246,8 +246,8 @@ void Test::testNumberFormat()
size_t nStart = aTests[i].eStart;
size_t nEnd = aTests[i].eEnd;
- CPPUNIT_ASSERT_MESSAGE("Unexpected number of formats for this category.",
- (nEnd - nStart + 1) == aTests[i].nSize);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unexpected number of formats for this category.",
+ aTests[i].nSize, (nEnd - nStart + 1));
for (size_t j = nStart; j <= nEnd; ++j)
{
@@ -291,7 +291,7 @@ void Test::testSharedString()
{
// Use shared string as normal, non-shared string, which is allowed.
SharedString aSS1("Test"), aSS2("Test");
- CPPUNIT_ASSERT_MESSAGE("Equality check should return true.", aSS1 == aSS2);
+ CPPUNIT_ASSERT_MESSAGE("Equality check should return true.", bool(aSS1 == aSS2));
SharedString aSS3("test");
CPPUNIT_ASSERT_MESSAGE("Equality check is case sensitive.", aSS1 != aSS3);
}
@@ -322,11 +322,11 @@ void Test::testSharedStringPool()
p2 = aPool.intern(aAndyLower);
CPPUNIT_ASSERT_MESSAGE("Failed to intern strings.", p1.getData() && p2.getData());
CPPUNIT_ASSERT_MESSAGE("These two ID's should differ.", p1.getData() != p2.getData());
- CPPUNIT_ASSERT_MESSAGE("These two ID's should be equal.", p1.getDataIgnoreCase() == p2.getDataIgnoreCase());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("These two ID's should be equal.", p2.getDataIgnoreCase(), p1.getDataIgnoreCase());
p2 = aPool.intern(aAndyUpper);
CPPUNIT_ASSERT_MESSAGE("Failed to intern string.", p2.getData());
CPPUNIT_ASSERT_MESSAGE("These two ID's should differ.", p1.getData() != p2.getData());
- CPPUNIT_ASSERT_MESSAGE("These two ID's should be equal.", p1.getDataIgnoreCase() == p2.getDataIgnoreCase());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("These two ID's should be equal.", p2.getDataIgnoreCase(), p1.getDataIgnoreCase());
}
void Test::testSharedStringPoolPurge()
@@ -337,8 +337,8 @@ void Test::testSharedStringPoolPurge()
aPool.intern("andy");
aPool.intern("ANDY");
- CPPUNIT_ASSERT_MESSAGE("Wrong string count.", aPool.getCount() == 3);
- CPPUNIT_ASSERT_MESSAGE("Wrong case insensitive string count.", aPool.getCountIgnoreCase() == 1);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong string count.", static_cast<size_t>(3), aPool.getCount());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong case insensitive string count.", static_cast<size_t>(1), aPool.getCountIgnoreCase());
// Since no string objects referencing the pooled strings exist, purging
// the pool should empty it.