diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:54:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:54:39 +0000 |
commit | 267c6f2ac71f92999e969232431ba04678e7437e (patch) | |
tree | 358c9467650e1d0a1d7227a21dac2e3d08b622b2 /sc/qa/unit/functions_array.cxx | |
parent | Initial commit. (diff) | |
download | libreoffice-267c6f2ac71f92999e969232431ba04678e7437e.tar.xz libreoffice-267c6f2ac71f92999e969232431ba04678e7437e.zip |
Adding upstream version 4:24.2.0.upstream/4%24.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sc/qa/unit/functions_array.cxx')
-rw-r--r-- | sc/qa/unit/functions_array.cxx | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/sc/qa/unit/functions_array.cxx b/sc/qa/unit/functions_array.cxx new file mode 100644 index 0000000000..2053c44dfa --- /dev/null +++ b/sc/qa/unit/functions_array.cxx @@ -0,0 +1,50 @@ +#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: */ |