summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@centrum.cz>2014-03-18 19:17:43 +0100
committerLuboš Luňák <l.lunak@centrum.cz>2014-03-18 20:57:03 +0100
commite1036f0faedcb58897628dcfa8ccbda42b20403c (patch)
treee8bd31fd44aa2151682243886e5be8e8e6972084 /sw
parent9970d5d9878bf8b40361606cfad6b25a2b6cc83d (diff)
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
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/inc/swmodeltestbase.hxx10
1 files 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<text::XTextRange> 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<text::XTextRange> 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<text::XTextRange> 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<text::XText> 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;
}