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

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Sat May 16 12:43:07 UTC 2020


 sc/qa/unit/data/xlsx/tdf85617.xlsx     |binary
 sc/qa/unit/subsequent_filters-test.cxx |   15 ++++++++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

New commits:
commit aca453050547b586c3c96e332d8f508368f0b434
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Sat May 16 13:54:36 2020 +0200
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Sat May 16 14:42:29 2020 +0200

    tdf#85617: sc: Add unittest
    
    Change-Id: I3baa89c210bf7bb44543e7b501986aae4ac9f270
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94358
    Tested-by: Jenkins
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/sc/qa/unit/data/xlsx/tdf85617.xlsx b/sc/qa/unit/data/xlsx/tdf85617.xlsx
new file mode 100644
index 000000000000..df515f276939
Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf85617.xlsx differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index fe786fb99b0d..e56ebd256eb1 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -244,6 +244,7 @@ public:
     void testMergedCellsXLSXML();
     void testBackgroundColorStandardXLSXML();
     void testTdf131536();
+    void testTdf85617();
     void testNamedExpressionsXLSXML();
     void testEmptyRowsXLSXML();
     void testBorderDirectionsXLSXML();
@@ -390,6 +391,7 @@ public:
     CPPUNIT_TEST(testMergedCellsXLSXML);
     CPPUNIT_TEST(testBackgroundColorStandardXLSXML);
     CPPUNIT_TEST(testTdf131536);
+    CPPUNIT_TEST(testTdf85617);
     CPPUNIT_TEST(testNamedExpressionsXLSXML);
     CPPUNIT_TEST(testEmptyRowsXLSXML);
     CPPUNIT_TEST(testBorderDirectionsXLSXML);
@@ -3833,7 +3835,7 @@ void ScFiltersTest::testBackgroundColorStandardXLSXML()
 void ScFiltersTest::testTdf131536()
 {
     ScDocShellRef xDocSh = loadDoc("tdf131536.", FORMAT_XLSX);
-    CPPUNIT_ASSERT_MESSAGE("Failed to load named-exp-global.xml", xDocSh.is());
+    CPPUNIT_ASSERT_MESSAGE("Failed to load the document", xDocSh.is());
     ScDocument& rDoc = xDocSh->GetDocument();
 
     ScAddress aPos(3,9,0);
@@ -3847,6 +3849,17 @@ void ScFiltersTest::testTdf131536()
                                       "=RIGHT(TEXT(INDEX($Comparison.$L:$Z,$Comparison.$A5,$Comparison.D$4),\"0\"),4))", nullptr);
 }
 
+void ScFiltersTest::testTdf85617()
+{
+    ScDocShellRef xDocSh = loadDoc("tdf85617.", FORMAT_XLSX);
+    CPPUNIT_ASSERT_MESSAGE("Failed to load the document", xDocSh.is());
+    ScDocument& rDoc = xDocSh->GetDocument();
+
+    ScAddress aPos(2,2,0);
+    //Without the fix in place, it would be Err:509
+    CPPUNIT_ASSERT_EQUAL(4.5, rDoc.GetValue(aPos));
+}
+
 void ScFiltersTest::testNamedExpressionsXLSXML()
 {
     {


More information about the Libreoffice-commits mailing list