summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-10-14 09:10:01 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-10-14 08:59:32 +0000
commitd2081e8b61bbe982f4e0977c2b46e00ccf19732f (patch)
treee078c6339af200c98cdffe390f491c6c8c9893f2 /sal
parentfaf4bf0c3e017b9caec27a1f7355c9cf636bf19b (diff)
CppunitTest_desktop_lib: fix loplugin:cppunitassertequals warnings
And also address a few new warnings in sal, plus silence such warnings in salhelper till we can't print typeids out of the box. Change-Id: I38049146710b6885f6a874bf74eedbc38b4d4651 Reviewed-on: https://gerrit.libreoffice.org/29809 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sal')
-rw-r--r--sal/qa/rtl/strings/test_ostring.cxx4
-rw-r--r--sal/qa/rtl/strings/test_oustring_compare.cxx4
-rw-r--r--sal/qa/rtl/strings/test_oustring_stringliterals.cxx4
3 files changed, 6 insertions, 6 deletions
diff --git a/sal/qa/rtl/strings/test_ostring.cxx b/sal/qa/rtl/strings/test_ostring.cxx
index ffdd46821b38..cd2e0a22bb99 100644
--- a/sal/qa/rtl/strings/test_ostring.cxx
+++ b/sal/qa/rtl/strings/test_ostring.cxx
@@ -95,8 +95,8 @@ void Test::testCompareTo()
OString s1(str1, 2);
OString s2(str2, 2);
- CPPUNIT_ASSERT(s1.compareTo(s1) == 0);
- CPPUNIT_ASSERT(s2.compareTo(s2) == 0);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), s1.compareTo(s1));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), s2.compareTo(s2));
CPPUNIT_ASSERT(s1.compareTo(s2) < 0);
CPPUNIT_ASSERT(s2.compareTo(s1) > 0);
CPPUNIT_ASSERT(s1.compareTo(OString(s2 + "y")) < 0);
diff --git a/sal/qa/rtl/strings/test_oustring_compare.cxx b/sal/qa/rtl/strings/test_oustring_compare.cxx
index da3cd57bd9ea..d500e5cce700 100644
--- a/sal/qa/rtl/strings/test_oustring_compare.cxx
+++ b/sal/qa/rtl/strings/test_oustring_compare.cxx
@@ -84,8 +84,8 @@ void test::oustring::Compare::compareTo()
OUString s1(str1, 2);
OUString s2(str2, 2);
- CPPUNIT_ASSERT(s1.compareTo(s1) == 0);
- CPPUNIT_ASSERT(s2.compareTo(s2) == 0);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), s1.compareTo(s1));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), s2.compareTo(s2));
CPPUNIT_ASSERT(s1.compareTo(s2) < 0);
CPPUNIT_ASSERT(s2.compareTo(s1) > 0);
CPPUNIT_ASSERT(s1.compareTo(OUString(s2 + "y")) < 0);
diff --git a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
index 082e83e9dd7c..27f70800d0d2 100644
--- a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
+++ b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
@@ -276,8 +276,8 @@ void test::oustring::StringLiterals::checkUtf16() {
CPPUNIT_ASSERT_EQUAL(rtl::OUString(u"def"), s2);
CPPUNIT_ASSERT(s1.endsWithIgnoreAsciiCase(u"EFDE", &s2));
CPPUNIT_ASSERT_EQUAL(rtl::OUString(u"d"), s2);
- CPPUNIT_ASSERT(s1 == u"defde");
- CPPUNIT_ASSERT(u"defde" == s1);
+ CPPUNIT_ASSERT(bool(s1 == u"defde"));
+ CPPUNIT_ASSERT(bool(u"defde" == s1));
CPPUNIT_ASSERT(s1 != u"abc");
CPPUNIT_ASSERT(u"abc" != s1);
CPPUNIT_ASSERT_EQUAL(sal_Int32(3), s1.indexOf(u"de", 1));