office-gobmx/sc/qa/unit/functions_array.cxx
Stephan Bergmann 72b2561996 For now, disable tests giving dubious results on AArch64
when built with -ffp-contract enabled (-ffp-contract=on default on Clang 14
trunk since
<f04e387055>
"Making the code compliant to the documentation about Floating Point", cf.
19559ebbee "Allow for a presumably more precise
result of BESSELY(80,9)"; and -ffp-contract=fast default when building with
optimizations on GCC) on both Linux (with
6cb20e0b29 "Disable
CppunitTset_sc_*_functions_test for linux_aarch64 for now, too" reverted) and
macOS.

Change-Id: Ie867d999173410ec9868bd14c0ee04bbba371920
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126727
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-12-13 13:28:48 +01:00

49 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:
#if !((defined __clang__ || defined __GNUC__) && defined __aarch64__)
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("sc/qa/unit/data/functions/array/fods/")
{
}
CPPUNIT_TEST_SUITE_REGISTRATION(ArrayFunctionsTest);
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */