summaryrefslogtreecommitdiff
path: root/sw/qa/extras/htmlexport
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.com>2014-05-15 22:03:54 +0200
committerTomaž Vajngerl <tomaz.vajngerl@collabora.com>2014-05-15 22:03:54 +0200
commit0261d4999ad930bffa26eab089af70b805f24857 (patch)
tree1392414daa7b10a7e8b0972f301184234264bbbf /sw/qa/extras/htmlexport
parent543a88d7c291d53884aab74f5f379e8bfc4b73c4 (diff)
sw test: HtmlExportTest - assert pDoc exists, rename class
Change-Id: I5e17b8636236c2a0f78df80c36d82a3ba16a1c5f
Diffstat (limited to 'sw/qa/extras/htmlexport')
-rw-r--r--sw/qa/extras/htmlexport/htmlexport.cxx28
1 files changed, 13 insertions, 15 deletions
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx
index 8d73286c62a0..961b050e5718 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -22,13 +22,13 @@
using namespace rtl;
-class Test : public SwModelTestBase, public HtmlTestTools
+class HtmlExportTest : public SwModelTestBase, public HtmlTestTools
{
private:
FieldUnit m_eUnit;
public:
- Test() :
+ HtmlExportTest() :
SwModelTestBase("/sw/qa/extras/htmlexport/data/", "HTML (StarWriter)"),
m_eUnit(FUNIT_NONE)
{}
@@ -70,7 +70,7 @@ private:
}
};
-#define DECLARE_HTMLEXPORT_ROUNDTRIP_TEST(TestName, filename) DECLARE_SW_ROUNDTRIP_TEST(TestName, filename, Test)
+#define DECLARE_HTMLEXPORT_ROUNDTRIP_TEST(TestName, filename) DECLARE_SW_ROUNDTRIP_TEST(TestName, filename, HtmlExportTest)
DECLARE_HTMLEXPORT_ROUNDTRIP_TEST(testFdo62336, "fdo62336.docx")
{
@@ -105,22 +105,20 @@ DECLARE_HTMLEXPORT_ROUNDTRIP_TEST(testCharacterBorder, "charborder.odt")
DECLARE_HTMLEXPORT_TEST(testExportOfImages, "textAndImage.docx")
{
- htmlDocPtr pDoc = parseHtml(m_aTempFile);
- if (pDoc)
- {
- assertXPath(pDoc, "/html/body", 1);
- assertXPath(pDoc, "/html/body/p/img", 1);
- }
+ htmlDocPtr pDoc = parseHtml(maTempFile);
+ CPPUNIT_ASSERT(pDoc);
+
+ assertXPath(pDoc, "/html/body", 1);
+ assertXPath(pDoc, "/html/body/p/img", 1);
}
DECLARE_HTMLEXPORT_TEST(testExportOfImagesWithSkipImageEnabled, "textAndImage.docx")
{
- htmlDocPtr pDoc = parseHtml(m_aTempFile);
- if (pDoc)
- {
- assertXPath(pDoc, "/html/body", 1);
- assertXPath(pDoc, "/html/body/p/img", 0);
- }
+ htmlDocPtr pDoc = parseHtml(maTempFile);
+ CPPUNIT_ASSERT(pDoc);
+
+ assertXPath(pDoc, "/html/body", 1);
+ assertXPath(pDoc, "/html/body/p/img", 0);
}
#endif