[Libreoffice-commits] core.git: sc/qa

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Thu Jun 25 13:08:56 UTC 2020


 sc/qa/unit/data/ods/tdf134234.ods      |binary
 sc/qa/unit/subsequent_filters-test.cxx |   15 +++++++++++++++
 2 files changed, 15 insertions(+)

New commits:
commit f6fba24f41baab07eb40f4e2787f68df95e989d2
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Thu Jun 25 12:01:35 2020 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Thu Jun 25 15:08:19 2020 +0200

    tdf#134234: sc: Add unittest
    
    Change-Id: Ie49cabb8ba10aaa8ec4453f6284b86617e98d490
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97103
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/sc/qa/unit/data/ods/tdf134234.ods b/sc/qa/unit/data/ods/tdf134234.ods
new file mode 100644
index 000000000000..744f991cff71
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf134234.ods differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 80a616339ed4..ca1f0b53a983 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -246,6 +246,7 @@ public:
     void testBackgroundColorStandardXLSXML();
     void testTdf131536();
     void testTdf85617();
+    void testTdf134234();
     void testNamedExpressionsXLSXML();
     void testEmptyRowsXLSXML();
     void testBorderDirectionsXLSXML();
@@ -394,6 +395,7 @@ public:
     CPPUNIT_TEST(testBackgroundColorStandardXLSXML);
     CPPUNIT_TEST(testTdf131536);
     CPPUNIT_TEST(testTdf85617);
+    CPPUNIT_TEST(testTdf134234);
     CPPUNIT_TEST(testNamedExpressionsXLSXML);
     CPPUNIT_TEST(testEmptyRowsXLSXML);
     CPPUNIT_TEST(testBorderDirectionsXLSXML);
@@ -3858,6 +3860,19 @@ void ScFiltersTest::testTdf85617()
     CPPUNIT_ASSERT_EQUAL(4.5, rDoc.GetValue(aPos));
 }
 
+void ScFiltersTest::testTdf134234()
+{
+    ScDocShellRef xDocSh = loadDoc("tdf134234.", FORMAT_ODS);
+    CPPUNIT_ASSERT_MESSAGE("Failed to load the document", xDocSh.is());
+    ScDocument& rDoc = xDocSh->GetDocument();
+
+    CPPUNIT_ASSERT_EQUAL(3.0, rDoc.GetValue(ScAddress(1,0,1)));
+
+    //Without the fix in place, SUMPRODUCT would have returned 0
+    CPPUNIT_ASSERT_EQUAL(36.54, rDoc.GetValue(ScAddress(2,0,1)));
+    CPPUNIT_ASSERT_EQUAL(sal_uInt32(833), static_cast<sal_uInt32>(rDoc.GetValue(ScAddress(3,0,1))));
+}
+
 void ScFiltersTest::testNamedExpressionsXLSXML()
 {
     {


More information about the Libreoffice-commits mailing list