add concept for chart xshape tests
will be run on a tinderbox for now that will be the reference for anything related to it Change-Id: Ib795b53f74e9207d0272342f12d426bbc21164b4
This commit is contained in:
130
chart2/CppunitTest_chart2_xshape.mk
Normal file
130
chart2/CppunitTest_chart2_xshape.mk
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
|
||||||
|
#*************************************************************************
|
||||||
|
#
|
||||||
|
# This file is part of the LibreOffice project.
|
||||||
|
#
|
||||||
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
#
|
||||||
|
#*************************************************************************
|
||||||
|
|
||||||
|
$(eval $(call gb_CppunitTest_CppunitTest,chart2_xshape))
|
||||||
|
|
||||||
|
$(eval $(call gb_CppunitTest_use_externals,chart2_xshape, \
|
||||||
|
boost_headers \
|
||||||
|
libxml2 \
|
||||||
|
))
|
||||||
|
|
||||||
|
$(eval $(call gb_CppunitTest_add_exception_objects,chart2_xshape, \
|
||||||
|
chart2/qa/extras/xshape/chart2xshape \
|
||||||
|
))
|
||||||
|
|
||||||
|
$(eval $(call gb_CppunitTest_use_libraries,chart2_xshape, \
|
||||||
|
avmedia \
|
||||||
|
basegfx \
|
||||||
|
comphelper \
|
||||||
|
cppu \
|
||||||
|
cppuhelper \
|
||||||
|
drawinglayer \
|
||||||
|
editeng \
|
||||||
|
for \
|
||||||
|
forui \
|
||||||
|
i18nlangtag \
|
||||||
|
msfilter \
|
||||||
|
vcl \
|
||||||
|
oox \
|
||||||
|
sal \
|
||||||
|
salhelper \
|
||||||
|
sax \
|
||||||
|
sb \
|
||||||
|
sc \
|
||||||
|
sw \
|
||||||
|
sd \
|
||||||
|
sfx \
|
||||||
|
sot \
|
||||||
|
svl \
|
||||||
|
svt \
|
||||||
|
svx \
|
||||||
|
svxcore \
|
||||||
|
test \
|
||||||
|
tl \
|
||||||
|
tk \
|
||||||
|
ucbhelper \
|
||||||
|
unotest \
|
||||||
|
utl \
|
||||||
|
vbahelper \
|
||||||
|
xo \
|
||||||
|
sw \
|
||||||
|
$(gb_UWINAPI) \
|
||||||
|
))
|
||||||
|
|
||||||
|
$(eval $(call gb_CppunitTest_set_include,chart2_xshape,\
|
||||||
|
-I$(SRCDIR)/chart2/qa/extras \
|
||||||
|
$$(INCLUDE) \
|
||||||
|
))
|
||||||
|
|
||||||
|
$(eval $(call gb_CppunitTest_use_api,chart2_xshape,\
|
||||||
|
offapi \
|
||||||
|
udkapi \
|
||||||
|
))
|
||||||
|
|
||||||
|
$(eval $(call gb_CppunitTest_use_ure,chart2_xshape))
|
||||||
|
|
||||||
|
$(eval $(call gb_CppunitTest_use_components,chart2_xshape,\
|
||||||
|
basic/util/sb \
|
||||||
|
animations/source/animcore/animcore \
|
||||||
|
chart2/source/controller/chartcontroller \
|
||||||
|
chart2/source/chartcore \
|
||||||
|
comphelper/util/comphelp \
|
||||||
|
configmgr/source/configmgr \
|
||||||
|
dtrans/util/mcnttype \
|
||||||
|
embeddedobj/util/embobj \
|
||||||
|
eventattacher/source/evtatt \
|
||||||
|
filter/source/config/cache/filterconfig1 \
|
||||||
|
forms/util/frm \
|
||||||
|
framework/util/fwk \
|
||||||
|
i18npool/util/i18npool \
|
||||||
|
linguistic/source/lng \
|
||||||
|
oox/util/oox \
|
||||||
|
package/source/xstor/xstor \
|
||||||
|
package/util/package2 \
|
||||||
|
sax/source/expatwrap/expwrap \
|
||||||
|
sc/util/sc \
|
||||||
|
sc/util/scd \
|
||||||
|
sc/util/scfilt \
|
||||||
|
sw/util/sw \
|
||||||
|
sw/util/swd \
|
||||||
|
sw/util/msword \
|
||||||
|
sd/util/sd \
|
||||||
|
sd/util/sdfilt \
|
||||||
|
sd/util/sdd \
|
||||||
|
$(if $(filter TRUE,$(DISABLE_SCRIPTING)),, \
|
||||||
|
sc/util/vbaobj) \
|
||||||
|
scaddins/source/analysis/analysis \
|
||||||
|
scaddins/source/datefunc/date \
|
||||||
|
scripting/source/basprov/basprov \
|
||||||
|
scripting/util/scriptframe \
|
||||||
|
sfx2/util/sfx \
|
||||||
|
sot/util/sot \
|
||||||
|
svl/source/fsstor/fsstorage \
|
||||||
|
svl/util/svl \
|
||||||
|
svtools/util/svt \
|
||||||
|
svx/util/svx \
|
||||||
|
svx/util/svxcore \
|
||||||
|
toolkit/util/tk \
|
||||||
|
ucb/source/core/ucb1 \
|
||||||
|
ucb/source/ucp/file/ucpfile1 \
|
||||||
|
ucb/source/ucp/tdoc/ucptdoc1 \
|
||||||
|
unotools/util/utl \
|
||||||
|
unoxml/source/rdf/unordf \
|
||||||
|
unoxml/source/service/unoxml \
|
||||||
|
writerfilter/util/writerfilter \
|
||||||
|
xmloff/util/xo \
|
||||||
|
))
|
||||||
|
|
||||||
|
$(eval $(call gb_CppunitTest_use_configuration,chart2_xshape))
|
||||||
|
|
||||||
|
$(eval $(call gb_CppunitTest_use_unittest_configuration,chart2_xshape))
|
||||||
|
|
||||||
|
# vim: set noet sw=4 ts=4:
|
@@ -28,6 +28,13 @@ $(eval $(call gb_Module_add_slowcheck_targets,chart2,\
|
|||||||
CppunitTest_chart2_import \
|
CppunitTest_chart2_import \
|
||||||
))
|
))
|
||||||
|
|
||||||
|
ifeq ($(ENABLE_CHART_TESTS),TRUE)
|
||||||
|
$(eval $(call gb_Module_add_slowcheck_targets,chart2,\
|
||||||
|
CppunitTest_chart2_xshape \
|
||||||
|
))
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
$(eval $(call gb_Module_add_subsequentcheck_targets,chart2,\
|
$(eval $(call gb_Module_add_subsequentcheck_targets,chart2,\
|
||||||
JunitTest_chart2_unoapi \
|
JunitTest_chart2_unoapi \
|
||||||
))
|
))
|
||||||
|
86
chart2/qa/extras/xshape/chart2xshape.cxx
Normal file
86
chart2/qa/extras/xshape/chart2xshape.cxx
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||||
|
/*
|
||||||
|
* This file is part of the LibreOffice project.
|
||||||
|
*
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "charttest.hxx"
|
||||||
|
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
|
||||||
|
#include <com/sun/star/chart2/CurveStyle.hpp>
|
||||||
|
#include <com/sun/star/chart/ErrorBarStyle.hpp>
|
||||||
|
#include <com/sun/star/chart2/XChartDocument.hpp>
|
||||||
|
#include <com/sun/star/chart/XChartDocument.hpp>
|
||||||
|
#include <com/sun/star/chart/XChartData.hpp>
|
||||||
|
#include <com/sun/star/chart2/XInternalDataProvider.hpp>
|
||||||
|
#include <com/sun/star/chart/XChartDataArray.hpp>
|
||||||
|
|
||||||
|
#include <com/sun/star/qa/XDumper.hpp>
|
||||||
|
|
||||||
|
#include <test/xmldiff.hxx>
|
||||||
|
|
||||||
|
#include <fstream>
|
||||||
|
|
||||||
|
class Chart2XShapeTest : public ChartTest
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
void testFdo75075();
|
||||||
|
|
||||||
|
CPPUNIT_TEST_SUITE(Chart2XShapeTest);
|
||||||
|
CPPUNIT_TEST(testFdo75075);
|
||||||
|
CPPUNIT_TEST_SUITE_END();
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
void compareAgainstReference(const OUString& rReferenceFile, bool bCreateReference = false);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
bool checkDumpAgainstFile( const OUString& rDump, const OUString aFilePath)
|
||||||
|
{
|
||||||
|
OString aOFile = OUStringToOString(aFilePath, RTL_TEXTENCODING_UTF8);
|
||||||
|
|
||||||
|
CPPUNIT_ASSERT_MESSAGE("dump is empty", !rDump.isEmpty());
|
||||||
|
|
||||||
|
OString aDump = OUStringToOString(rDump, RTL_TEXTENCODING_UTF8);
|
||||||
|
return doXMLDiff(aOFile.getStr(), aDump.getStr(),
|
||||||
|
static_cast<int>(rDump.getLength()), NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Chart2XShapeTest::compareAgainstReference(const OUString& rReferenceFile, bool bCreateReference)
|
||||||
|
{
|
||||||
|
uno::Reference< chart::XChartDocument > xChartDoc ( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW);
|
||||||
|
uno::Reference< qa::XDumper > xDumper( xChartDoc, UNO_QUERY_THROW );
|
||||||
|
OUString aDump = xDumper->dump();
|
||||||
|
OUString aReference = getPathFromSrc("/chart2/qa/extras/xshape/data/reference/") + rReferenceFile;
|
||||||
|
if(bCreateReference)
|
||||||
|
{
|
||||||
|
OString aOFile = OUStringToOString(aReference, RTL_TEXTENCODING_UTF8);
|
||||||
|
OString aODump = OUStringToOString(aDump, RTL_TEXTENCODING_UTF8);
|
||||||
|
std::ofstream aReferenceFile(aOFile.getStr());
|
||||||
|
aReferenceFile << aODump.getStr();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
checkDumpAgainstFile(aDump, aReference);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Chart2XShapeTest::testFdo75075()
|
||||||
|
{
|
||||||
|
load("chart2/qa/extras/xshape/data/ods/", "fdo75075.ods");
|
||||||
|
compareAgainstReference("fdo75075.xml");
|
||||||
|
}
|
||||||
|
|
||||||
|
CPPUNIT_TEST_SUITE_REGISTRATION(Chart2XShapeTest);
|
||||||
|
|
||||||
|
CPPUNIT_PLUGIN_IMPLEMENT();
|
||||||
|
|
||||||
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
BIN
chart2/qa/extras/xshape/data/ods/fdo75075.ods
Normal file
BIN
chart2/qa/extras/xshape/data/ods/fdo75075.ods
Normal file
Binary file not shown.
1690
chart2/qa/extras/xshape/data/reference/fdo75075.xml
Normal file
1690
chart2/qa/extras/xshape/data/reference/fdo75075.xml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -107,6 +107,7 @@ export EBOOK_CFLAGS=$(gb_SPACE)@EBOOK_CFLAGS@
|
|||||||
export EBOOK_LIBS=$(gb_SPACE)@EBOOK_LIBS@
|
export EBOOK_LIBS=$(gb_SPACE)@EBOOK_LIBS@
|
||||||
export ENABLE_AVAHI=@ENABLE_AVAHI@
|
export ENABLE_AVAHI=@ENABLE_AVAHI@
|
||||||
export ENABLE_CAIRO_CANVAS=@ENABLE_CAIRO_CANVAS@
|
export ENABLE_CAIRO_CANVAS=@ENABLE_CAIRO_CANVAS@
|
||||||
|
export ENABLE_CHART_TESTS=@ENABLE_CHART_TESTS@
|
||||||
export ENABLE_CMIS=@ENABLE_CMIS@
|
export ENABLE_CMIS=@ENABLE_CMIS@
|
||||||
export ENABLE_COINMP=@ENABLE_COINMP@
|
export ENABLE_COINMP=@ENABLE_COINMP@
|
||||||
export ENABLE_CRASHDUMP=@ENABLE_CRASHDUMP@
|
export ENABLE_CRASHDUMP=@ENABLE_CRASHDUMP@
|
||||||
|
17
configure.ac
17
configure.ac
@@ -1130,6 +1130,11 @@ AC_ARG_ENABLE(cve-tests,
|
|||||||
[Prevent CVE tests to be executed]),
|
[Prevent CVE tests to be executed]),
|
||||||
,)
|
,)
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(chart-tests,
|
||||||
|
AS_HELP_STRING([--enable-chart-tests],
|
||||||
|
[Executes chart XShape tests]),
|
||||||
|
,)
|
||||||
|
|
||||||
AC_ARG_ENABLE(build-unowinreg,
|
AC_ARG_ENABLE(build-unowinreg,
|
||||||
AS_HELP_STRING([--enable-build-unowinreg],
|
AS_HELP_STRING([--enable-build-unowinreg],
|
||||||
[Do not use the prebuilt unowinreg.dll. Build it instead. The MinGW C++
|
[Do not use the prebuilt unowinreg.dll. Build it instead. The MinGW C++
|
||||||
@@ -9193,6 +9198,18 @@ else
|
|||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl ===================================================================
|
||||||
|
dnl Check for enabling chart XShape tests
|
||||||
|
dnl ===================================================================
|
||||||
|
AC_MSG_CHECKING([whether to execute chart XShape tests])
|
||||||
|
if test "$enable_chart_tests" = "yes"; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
ENABLE_CHART_TESTS=TRUE
|
||||||
|
AC_SUBST(ENABLE_CHART_TESTS)
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
fi
|
||||||
|
|
||||||
dnl ===================================================================
|
dnl ===================================================================
|
||||||
dnl Check for system openssl
|
dnl Check for system openssl
|
||||||
dnl ===================================================================
|
dnl ===================================================================
|
||||||
|
Reference in New Issue
Block a user