diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-01-06 08:33:59 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-01-06 09:34:59 +0000 |
commit | ff8f5e6255ed7b627fb42ecd9e2222f18293218f (patch) | |
tree | 3dc315a4c3b15b283af74757c84f2ef5d3dfcb6b /writerperfect | |
parent | 032b5090729a19170856851215a2ea8ea8616e81 (diff) |
writerperfect, xmloff: fix loplugin:cppunitassertequals warnings
Change-Id: Ie8246433a7cea0886f00d8c76cf6f7d023545417
Reviewed-on: https://gerrit.libreoffice.org/32770
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'writerperfect')
-rw-r--r-- | writerperfect/qa/unit/DirectoryStreamTest.cxx | 2 | ||||
-rw-r--r-- | writerperfect/qa/unit/WPXSvStreamTest.cxx | 24 |
2 files changed, 13 insertions, 13 deletions
diff --git a/writerperfect/qa/unit/DirectoryStreamTest.cxx b/writerperfect/qa/unit/DirectoryStreamTest.cxx index 79646ed4e6fa..0b347ac40d71 100644 --- a/writerperfect/qa/unit/DirectoryStreamTest.cxx +++ b/writerperfect/qa/unit/DirectoryStreamTest.cxx @@ -139,7 +139,7 @@ void lcl_testDataOperations(RVNGInputStream &rStream) CPPUNIT_ASSERT_EQUAL(-1, rStream.seek(0, librevenge::RVNG_SEEK_CUR)); unsigned long numBytesRead = 0; - CPPUNIT_ASSERT(nullptr == rStream.read(1, numBytesRead)); + CPPUNIT_ASSERT(!rStream.read(1, numBytesRead)); CPPUNIT_ASSERT_EQUAL(0UL, numBytesRead); } diff --git a/writerperfect/qa/unit/WPXSvStreamTest.cxx b/writerperfect/qa/unit/WPXSvStreamTest.cxx index 16d8ebc22b91..70ff441a4315 100644 --- a/writerperfect/qa/unit/WPXSvStreamTest.cxx +++ b/writerperfect/qa/unit/WPXSvStreamTest.cxx @@ -197,7 +197,7 @@ void WPXSvStreamTest::testSeekSet() CPPUNIT_ASSERT(!pInput->isEnd()); CPPUNIT_ASSERT_EQUAL(0, pInput->seek(nLen, RVNG_SEEK_SET)); - CPPUNIT_ASSERT(nLen == pInput->tell()); + CPPUNIT_ASSERT_EQUAL(pInput->tell(), nLen); CPPUNIT_ASSERT(pInput->isEnd()); // go back to the beginning @@ -212,7 +212,7 @@ void WPXSvStreamTest::testSeekSet() CPPUNIT_ASSERT(!pInput->isEnd()); CPPUNIT_ASSERT(0 != pInput->seek(nLen + 1, RVNG_SEEK_SET)); - CPPUNIT_ASSERT(nLen == pInput->tell()); + CPPUNIT_ASSERT_EQUAL(pInput->tell(), nLen); CPPUNIT_ASSERT(pInput->isEnd()); } @@ -249,7 +249,7 @@ void WPXSvStreamTest::testSeekCur() CPPUNIT_ASSERT(!pInput->isEnd()); CPPUNIT_ASSERT(0 != pInput->seek(nLen + 1, RVNG_SEEK_CUR)); - CPPUNIT_ASSERT(nLen == pInput->tell()); + CPPUNIT_ASSERT_EQUAL(pInput->tell(), nLen); CPPUNIT_ASSERT(pInput->isEnd()); } @@ -264,11 +264,11 @@ void WPXSvStreamTest::testSeekEnd() // valid seeks CPPUNIT_ASSERT_EQUAL(0, pInput->seek(0, RVNG_SEEK_END)); - CPPUNIT_ASSERT(nLen == pInput->tell()); + CPPUNIT_ASSERT_EQUAL(pInput->tell(), nLen); CPPUNIT_ASSERT(pInput->isEnd()); CPPUNIT_ASSERT_EQUAL(0, pInput->seek(-1, RVNG_SEEK_END)); - CPPUNIT_ASSERT((nLen - 1) == pInput->tell()); + CPPUNIT_ASSERT_EQUAL(pInput->tell(), (nLen - 1)); CPPUNIT_ASSERT(!pInput->isEnd()); CPPUNIT_ASSERT_EQUAL(0, pInput->seek(-nLen, RVNG_SEEK_END)); @@ -281,7 +281,7 @@ void WPXSvStreamTest::testSeekEnd() // invalid seeks CPPUNIT_ASSERT(0 != pInput->seek(1, RVNG_SEEK_END)); - CPPUNIT_ASSERT(nLen == pInput->tell()); + CPPUNIT_ASSERT_EQUAL(pInput->tell(), nLen); CPPUNIT_ASSERT(pInput->isEnd()); CPPUNIT_ASSERT(0 != pInput->seek(-nLen - 1, RVNG_SEEK_END)); @@ -297,7 +297,7 @@ void WPXSvStreamTest::testStructured() assert(bool(pInput)); CPPUNIT_ASSERT(pInput->isStructured()); - CPPUNIT_ASSERT(2 == pInput->subStreamCount()); + CPPUNIT_ASSERT_EQUAL(static_cast<unsigned>(2), pInput->subStreamCount()); lcl_testSubStreams(pInput); // check for existing substream @@ -318,7 +318,7 @@ void WPXSvStreamTest::testStructured() assert(bool(pInput)); CPPUNIT_ASSERT(pInput->isStructured()); - CPPUNIT_ASSERT(9 == pInput->subStreamCount()); + CPPUNIT_ASSERT_EQUAL(static_cast<unsigned>(9), pInput->subStreamCount()); lcl_testSubStreams(pInput); // check for existing substream @@ -338,11 +338,11 @@ void WPXSvStreamTest::testStructured() const shared_ptr<RVNGInputStream> pInput(lcl_createStream()); CPPUNIT_ASSERT(!pInput->isStructured()); - CPPUNIT_ASSERT(0 == pInput->subStreamCount()); + CPPUNIT_ASSERT_EQUAL(static_cast<unsigned>(0), pInput->subStreamCount()); CPPUNIT_ASSERT(!pInput->existsSubStream("foo")); - CPPUNIT_ASSERT(nullptr == pInput->getSubStreamByName("foo")); - CPPUNIT_ASSERT(nullptr == pInput->getSubStreamById(42)); - CPPUNIT_ASSERT(nullptr == pInput->subStreamName(42)); + CPPUNIT_ASSERT(!pInput->getSubStreamByName("foo")); + CPPUNIT_ASSERT(!pInput->getSubStreamById(42)); + CPPUNIT_ASSERT(!pInput->subStreamName(42)); } } |