From a22af0b1702d625f12711e9997daebbddb02b6e0 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 3 Jun 2016 09:04:39 +0200 Subject: CppunitTest_sal_osl_file: fix loplugin:cppunitassertequals warnings Change-Id: Ib0594ba236284aa69d180fb72ce60435b679ea05 Reviewed-on: https://gerrit.libreoffice.org/25852 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- o3tl/qa/test-lru_map.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'o3tl') diff --git a/o3tl/qa/test-lru_map.cxx b/o3tl/qa/test-lru_map.cxx index 489dd9015834..abd9cb237bb9 100644 --- a/o3tl/qa/test-lru_map.cxx +++ b/o3tl/qa/test-lru_map.cxx @@ -62,7 +62,7 @@ void lru_map_test::testBaseUsage() CPPUNIT_ASSERT_EQUAL(5, it->second); it = lru.find(0); - CPPUNIT_ASSERT(it == lru.end()); + CPPUNIT_ASSERT(bool(it == lru.end())); } void lru_map_test::testReplaceValue() @@ -110,20 +110,20 @@ void lru_map_test::testReplaceKey() lru.insert(std::make_pair(1, 100)); CPPUNIT_ASSERT_EQUAL(size_t(1), lru.size()); CPPUNIT_ASSERT_EQUAL(100, lru.find(1)->second); - CPPUNIT_ASSERT(lru.find(2) == lru.end()); - CPPUNIT_ASSERT(lru.find(3) == lru.end()); + CPPUNIT_ASSERT(bool(lru.find(2) == lru.end())); + CPPUNIT_ASSERT(bool(lru.find(3) == lru.end())); // inserting new entry lru.insert(std::make_pair(2, 200)); CPPUNIT_ASSERT_EQUAL(size_t(2), lru.size()); CPPUNIT_ASSERT_EQUAL(100, lru.find(1)->second); CPPUNIT_ASSERT_EQUAL(200, lru.find(2)->second); - CPPUNIT_ASSERT(lru.find(3) == lru.end()); + CPPUNIT_ASSERT(bool(lru.find(3) == lru.end())); // inserting new entry, lru entry is removed lru.insert(std::make_pair(3, 300)); CPPUNIT_ASSERT_EQUAL(size_t(2), lru.size()); - CPPUNIT_ASSERT(lru.find(1) == lru.end()); + CPPUNIT_ASSERT(bool(lru.find(1) == lru.end())); CPPUNIT_ASSERT_EQUAL(200, lru.find(2)->second); CPPUNIT_ASSERT_EQUAL(300, lru.find(3)->second); @@ -131,8 +131,8 @@ void lru_map_test::testReplaceKey() std::pair pair(4, 400); lru.insert(pair); CPPUNIT_ASSERT_EQUAL(size_t(2), lru.size()); - CPPUNIT_ASSERT(lru.find(1) == lru.end()); - CPPUNIT_ASSERT(lru.find(2) == lru.end()); + CPPUNIT_ASSERT(bool(lru.find(1) == lru.end())); + CPPUNIT_ASSERT(bool(lru.find(2) == lru.end())); CPPUNIT_ASSERT_EQUAL(300, lru.find(3)->second); CPPUNIT_ASSERT_EQUAL(400, lru.find(4)->second); } @@ -221,7 +221,7 @@ void lru_map_test::testCustomHash() lru.insert(std::make_pair(TestClassKey(1,2), 9)); CPPUNIT_ASSERT_EQUAL(size_t(2), lru.size()); - CPPUNIT_ASSERT(lru.end() == lru.find(TestClassKey(0,0))); // non existent + CPPUNIT_ASSERT(bool(lru.end() == lru.find(TestClassKey(0,0)))); // non existent CPPUNIT_ASSERT_EQUAL(7, lru.find(TestClassKey(1,1))->second); CPPUNIT_ASSERT_EQUAL(9, lru.find(TestClassKey(1,2))->second); @@ -229,7 +229,7 @@ void lru_map_test::testCustomHash() CPPUNIT_ASSERT_EQUAL(size_t(2), lru.size()); - CPPUNIT_ASSERT(lru.end() == lru.find(TestClassKey(1,1))); + CPPUNIT_ASSERT(bool(lru.end() == lru.find(TestClassKey(1,1)))); CPPUNIT_ASSERT_EQUAL(9, lru.find(TestClassKey(1,2))->second); CPPUNIT_ASSERT_EQUAL(13, lru.find(TestClassKey(2,1))->second); } -- cgit v1.2.3