summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorDaniel Arato (NISZ) <arato.daniel@nisz.hu>2020-08-31 13:10:26 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2020-09-01 09:04:06 +0200
commitceae73dd294b5ca4073062afc1223efb1c206780 (patch)
treef000b456921d486d7b95c3b5cc97e992292aa072 /chart2
parentd350f0c712cf7b29d8c633be0394b63de0f8dc3a (diff)
tdf#129423 sw: Make yet more tests export-only
This commit continues an earlier, incomplete unit test refactor under the same bug ticket number. Eliminates a few unwanted nullptr tests in chart2/qa/. Change-Id: I6bd5c24ba264793ebe8fff20ba954be0d1e84882 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101540 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/qa/extras/chart2export.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx
index 7e17c2f1307c..3e1f5d86e897 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -655,8 +655,7 @@ void Chart2ExportTest::testStockChart()
load("/chart2/qa/extras/data/docx/", "testStockChart.docx");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
- if (!pXmlDoc)
- return;
+ CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:stockChart/c:ser[1]/c:idx", "val", "1");
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:stockChart/c:ser[1]/c:order", "val", "1");
@@ -670,8 +669,7 @@ void Chart2ExportTest::testBarChart()
{
load("/chart2/qa/extras/data/docx/", "testBarChart.docx");
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
- if (!pXmlDoc)
- return;
+ CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:barDir", "val", "col");
}
@@ -727,8 +725,7 @@ void Chart2ExportTest::testScatterChartTextXValues()
// Test the export.
xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text");
- if (!pXmlDoc)
- return;
+ CPPUNIT_ASSERT(pXmlDoc);
assertXPathContent(pXmlDoc, "//c:scatterChart/c:ser[1]/c:xVal[1]/c:numRef[1]/c:numCache[1]/c:pt[1]/c:v[1]", "1");
}