diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-02-28 01:37:03 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-02-28 00:41:23 +0000 |
commit | 5978b78eb2ee016bfda0a572ae1a9c86dc639241 (patch) | |
tree | b6330aa83595caabe76c7e6aba3db80e6c3bda27 /test | |
parent | 6b6d3f9d3df25d337cd1b5c191b2b2b05835cb7b (diff) |
use better assert macros
Change-Id: I6fcfcced0c9017003472e19ab5619ecb26a992eb
Reviewed-on: https://gerrit.libreoffice.org/22741
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/source/container/xnamed.cxx | 6 | ||||
-rw-r--r-- | test/source/sheet/xdatapilotdescriptor.cxx | 3 |
2 files changed, 4 insertions, 5 deletions
diff --git a/test/source/container/xnamed.cxx b/test/source/container/xnamed.cxx index a3344026bf16..f9b935c76b6e 100644 --- a/test/source/container/xnamed.cxx +++ b/test/source/container/xnamed.cxx @@ -19,7 +19,7 @@ namespace apitest { void XNamed::testGetName() { uno::Reference< container::XNamed > xNamed(init(), UNO_QUERY_THROW); - CPPUNIT_ASSERT( maTestName == xNamed->getName() ); + CPPUNIT_ASSERT_EQUAL(maTestName, xNamed->getName()); } void XNamed::testSetName() @@ -28,11 +28,11 @@ void XNamed::testSetName() OUString aTestName("NewName"); xNamed->setName(aTestName); - CPPUNIT_ASSERT( aTestName == xNamed->getName() ); + CPPUNIT_ASSERT_EQUAL(aTestName, xNamed->getName()); // restore old name xNamed->setName(maTestName); - CPPUNIT_ASSERT(maTestName == xNamed->getName()); + CPPUNIT_ASSERT_EQUAL(maTestName, xNamed->getName()); } XNamed::~XNamed() diff --git a/test/source/sheet/xdatapilotdescriptor.cxx b/test/source/sheet/xdatapilotdescriptor.cxx index ba5b89f60247..4def745151cf 100644 --- a/test/source/sheet/xdatapilotdescriptor.cxx +++ b/test/source/sheet/xdatapilotdescriptor.cxx @@ -194,8 +194,7 @@ void XDataPilotDescriptor::checkName( uno::Reference< container::XIndexAccess > for (sal_Int32 i = 0; i < xIndex->getCount(); ++i) { uno::Reference< container::XNamed > xNamed( xIndex->getByIndex(i), UNO_QUERY_THROW); - std::cout << "Expected: " << maFieldNames[nIndex] << " Got: " << xNamed->getName() << std::endl; - CPPUNIT_ASSERT( xNamed->getName() == maFieldNames[nIndex] ); + CPPUNIT_ASSERT_EQUAL(maFieldNames[nIndex], xNamed->getName()); } } |