forked from amazingfate/loongoffice
We have confirmed that ArrayFunctionsTest::testDubiousArrayFormulasFODS gives different results depending on the -ffp-contract setting on ppc64le and likely also on s390x in addition to aarch64. Thus limit the check only to x86_64 where it's known to give consistent results. Change-Id: Iedb63fb4340cfe9a88e374c7498d97574bcdfcc7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156453 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
51 lines
1.8 KiB
C++
51 lines
1.8 KiB
C++
#include "functions_test.hxx"
|
|
|
|
class ArrayFunctionsTest : public FunctionsTest
|
|
{
|
|
public:
|
|
ArrayFunctionsTest();
|
|
|
|
void testArrayFormulasFODS();
|
|
void testDubiousArrayFormulasFODS();
|
|
|
|
CPPUNIT_TEST_SUITE(ArrayFunctionsTest);
|
|
CPPUNIT_TEST(testArrayFormulasFODS);
|
|
CPPUNIT_TEST(testDubiousArrayFormulasFODS);
|
|
CPPUNIT_TEST_SUITE_END();
|
|
|
|
};
|
|
|
|
void ArrayFunctionsTest::testArrayFormulasFODS()
|
|
{
|
|
OUString aDirectoryURL = m_directories.getURLFromSrc(u"/sc/qa/unit/data/functions/array/fods/");
|
|
recursiveScan(test::pass, "OpenDocument Spreadsheet Flat XML", aDirectoryURL,
|
|
"com.sun.star.comp.filter.OdfFlatXml,,com.sun.star.comp.Calc.XMLOasisImporter,com.sun.star.comp.Calc.XMLOasisExporter,,,true",
|
|
FODS_FORMAT_TYPE, SotClipboardFormatId::NONE, 0, false);
|
|
}
|
|
|
|
void ArrayFunctionsTest::testDubiousArrayFormulasFODS()
|
|
{
|
|
//TODO: sc/qa/unit/data/functions/array/dubious/fods/linest.fods produces widely different
|
|
// values when built with -ffp-contract enabled (-ffp-contract=on default on Clang 14,
|
|
// -ffp-contract=fast default when building with optimizations on GCC) on at least aarch64
|
|
// and ppc64le. Thus limit the check only to platforms with consistent results.
|
|
#if defined X86_64
|
|
OUString aDirectoryURL
|
|
= m_directories.getURLFromSrc(u"/sc/qa/unit/data/functions/array/dubious/fods/");
|
|
recursiveScan(test::pass, "OpenDocument Spreadsheet Flat XML", aDirectoryURL,
|
|
"com.sun.star.comp.filter.OdfFlatXml,,com.sun.star.comp.Calc.XMLOasisImporter,com.sun.star.comp.Calc.XMLOasisExporter,,,true",
|
|
FODS_FORMAT_TYPE, SotClipboardFormatId::NONE, 0, false);
|
|
#endif
|
|
}
|
|
|
|
ArrayFunctionsTest::ArrayFunctionsTest():
|
|
FunctionsTest()
|
|
{
|
|
}
|
|
|
|
CPPUNIT_TEST_SUITE_REGISTRATION(ArrayFunctionsTest);
|
|
|
|
CPPUNIT_PLUGIN_IMPLEMENT();
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|