test/source/container/xnamed.cxx | 6 +++--- test/source/sheet/xdatapilotdescriptor.cxx | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-)
New commits: commit 5978b78eb2ee016bfda0a572ae1a9c86dc639241 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Sun Feb 28 01:37:03 2016 +0100 use better assert macros Change-Id: I6fcfcced0c9017003472e19ab5619ecb26a992eb Reviewed-on: https://gerrit.libreoffice.org/22741 Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/test/source/container/xnamed.cxx b/test/source/container/xnamed.cxx index a334402..f9b935c 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 ba5b89f..4def745 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()); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits