From e1036f0faedcb58897628dcfa8ccbda42b20403c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Tue, 18 Mar 2014 19:17:43 +0100 Subject: [PATCH] add messages to utility test functions So that e.g. parseDump() in case of an incorrect xpath does not just plain give an equality assertion failure, which on its own is confusing. Change-Id: Ib9fc2b4f6720b5c472773afbe8dc18cd8961465c --- sw/qa/extras/inc/swmodeltestbase.hxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx index e07981057000..1fb6c48078f2 100644 --- a/sw/qa/extras/inc/swmodeltestbase.hxx +++ b/sw/qa/extras/inc/swmodeltestbase.hxx @@ -274,7 +274,7 @@ protected: xmlXPathContextPtr pXmlXpathCtx = xmlXPathNewContext(pXmlDoc); xmlXPathObjectPtr pXmlXpathObj = xmlXPathEvalExpression(BAD_CAST(aXPath.getStr()), pXmlXpathCtx); xmlNodeSetPtr pXmlNodes = pXmlXpathObj->nodesetval; - CPPUNIT_ASSERT_EQUAL(1, xmlXPathNodeSetGetLength(pXmlNodes)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("parsing dump failed", 1, xmlXPathNodeSetGetLength(pXmlNodes)); xmlNodePtr pXmlNode = pXmlNodes->nodeTab[0]; OUString aRet; if (aAttribute.getLength()) @@ -352,7 +352,7 @@ protected: uno::Reference const xParagraph( getParagraphOrTable(number), uno::UNO_QUERY_THROW); if( !content.isEmpty()) - CPPUNIT_ASSERT_EQUAL( content, xParagraph->getString()); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "paragraph does not have expected content", content, xParagraph->getString()); return xParagraph; } @@ -360,7 +360,7 @@ protected: { uno::Reference const xParagraph(getParagraphOrTable(number, xText), uno::UNO_QUERY_THROW); if (!content.isEmpty()) - CPPUNIT_ASSERT_EQUAL(content, xParagraph->getString()); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "paragraph does not contain expected content", content, xParagraph->getString()); return xParagraph; } @@ -373,7 +373,7 @@ protected: xRunEnum->nextElement(); uno::Reference xRun(xRunEnum->nextElement(), uno::UNO_QUERY); if( !content.isEmpty()) - CPPUNIT_ASSERT_EQUAL( content, xRun->getString()); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "run does not contain expected content", content, xRun->getString()); return xRun; } @@ -399,7 +399,7 @@ protected: { uno::Reference const xCellText(xCell, uno::UNO_QUERY_THROW); - CPPUNIT_ASSERT_EQUAL(rContent, xCellText->getString()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("cell does not contain expected content", rContent, xCellText->getString()); } return xCell; }