summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-11-11 08:58:43 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-11-13 16:26:04 +0000
commitc622982a7a85007b4f40b101643c638adb8651db (patch)
tree592d0a194beaa1b9f6958d0390fe30c1f385de51 /sot
parentbf5eef2415fb84a1c885c8f74a22e575de6971fe (diff)
sot: fix loplugin:cppunitassertequals warnings
Change-Id: Ib4ec7d5c3dc89c80cc46bbbe8a14f6b1393ffa76 Reviewed-on: https://gerrit.libreoffice.org/30767 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sot')
-rw-r--r--sot/qa/cppunit/test_sot.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/sot/qa/cppunit/test_sot.cxx b/sot/qa/cppunit/test_sot.cxx
index 587f62c3afc4..931d7f84177a 100644
--- a/sot/qa/cppunit/test_sot.cxx
+++ b/sot/qa/cppunit/test_sot.cxx
@@ -58,8 +58,8 @@ namespace
xStream->Seek(0);
sal_uLong nRemaining = xStream->GetSize() - xStream->Tell();
- CPPUNIT_ASSERT_MESSAGE( "check size", nRemaining == nSize );
- CPPUNIT_ASSERT_MESSAGE( "check size #2", xStream->remainingSize() == nSize );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "check size", nSize, nRemaining );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "check size #2", static_cast<sal_uInt64>(nSize), xStream->remainingSize());
// Read as much as we can, a corrupted FAT chain can cause real grief here
nReadableSize = xStream->ReadBytes(static_cast<void *>(pData), nSize);
@@ -72,10 +72,10 @@ namespace
CPPUNIT_ASSERT_MESSAGE( "sot reading error", !xStream->GetError() );
unsigned char c;
xStream->Seek( i - 1 );
- CPPUNIT_ASSERT_MESSAGE( "sot storage reading byte",
- xStream->ReadBytes(&c, 1) == 1);
- CPPUNIT_ASSERT_MESSAGE( "mismatching data storage reading byte",
- pData[i - 1] == c );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "sot storage reading byte",
+ static_cast<size_t>(1), xStream->ReadBytes(&c, 1));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "mismatching data storage reading byte",
+ c, pData[i - 1] );
}
}
free(pData);
@@ -133,16 +133,16 @@ namespace
xStream.Is() && !xObjStor->GetError());
CPPUNIT_ASSERT_MESSAGE("error in opened stream", !xStream->GetError());
sal_uLong nPos = xStream->GetSize();
- CPPUNIT_ASSERT_MESSAGE("odd stream length", nPos == 13312);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("odd stream length", static_cast<sal_uLong>(13312), nPos);
xStream->Seek(STREAM_SEEK_TO_END);
CPPUNIT_ASSERT_MESSAGE("error seeking to end", !xStream->GetError());
// cf. comment in Pos2Page, not extremely intuitive ...
- CPPUNIT_ASSERT_MESSAGE("stream not at beginning", xStream->Tell() == xStream->GetSize());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("stream not at beginning", static_cast<sal_uInt64>(xStream->GetSize()), xStream->Tell());
xStream->Seek(STREAM_SEEK_TO_BEGIN);
CPPUNIT_ASSERT_MESSAGE("error seeking to beginning", !xStream->GetError());
- CPPUNIT_ASSERT_MESSAGE("stream not at beginning", xStream->Tell() == 0);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("stream not at beginning", static_cast<sal_uInt64>(0), xStream->Tell());
}
CPPUNIT_TEST_SUITE_REGISTRATION(SotTest);