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

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Fri Jul 3 16:07:30 UTC 2020


 sc/qa/unit/data/xlsx/tdf134455.xlsx    |binary
 sc/qa/unit/subsequent_filters-test.cxx |   20 ++++++++++++++++++++
 2 files changed, 20 insertions(+)

New commits:
commit 643df295fa72b0d252460ae98104e347ce76cc22
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Fri Jul 3 11:22:14 2020 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Fri Jul 3 18:06:53 2020 +0200

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

diff --git a/sc/qa/unit/data/xlsx/tdf134455.xlsx b/sc/qa/unit/data/xlsx/tdf134455.xlsx
new file mode 100644
index 000000000000..df1648d5e9e9
Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf134455.xlsx differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 8c8f4f292862..8399cef636e8 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -229,6 +229,7 @@ public:
     void testTdf103734();
     void testTdf98844();
     void testTdf100458();
+    void testTdf134455();
     void testTdf127982();
     void testTdf131424();
     void testTdf100709XLSX();
@@ -389,6 +390,7 @@ public:
     CPPUNIT_TEST(testTdf103734);
     CPPUNIT_TEST(testTdf98844);
     CPPUNIT_TEST(testTdf100458);
+    CPPUNIT_TEST(testTdf134455);
     CPPUNIT_TEST(testTdf127982);
     CPPUNIT_TEST(testTdf131424);
     CPPUNIT_TEST(testTdf100709XLSX);
@@ -3796,6 +3798,24 @@ void ScFiltersTest::testTdf100458()
     xDocSh->DoClose();
 }
 
+void ScFiltersTest::testTdf134455()
+{
+    ScDocShellRef xDocSh = loadDoc("tdf134455.", FORMAT_XLSX);
+    CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
+    ScDocument& rDoc = xDocSh->GetDocument();
+
+    CPPUNIT_ASSERT_EQUAL(OUString("00:05"), rDoc.GetString(ScAddress(3,4,0)));
+    CPPUNIT_ASSERT_EQUAL(OUString("00:10"), rDoc.GetString(ScAddress(3,5,0)));
+    CPPUNIT_ASSERT_EQUAL(OUString("00:59"), rDoc.GetString(ScAddress(3,6,0)));
+
+    // Without the fix in place, TIMEVALUE would have returned Err:502 for values
+    // greater than 59
+    CPPUNIT_ASSERT_EQUAL(OUString("01:05"), rDoc.GetString(ScAddress(3,7,0)));
+    CPPUNIT_ASSERT_EQUAL(OUString("04:00"), rDoc.GetString(ScAddress(3,8,0)));
+
+    xDocSh->DoClose();
+}
+
 void ScFiltersTest::testTdf127982()
 {
     ScDocShellRef xDocSh = loadDoc("tdf127982.", FORMAT_ODS);


More information about the Libreoffice-commits mailing list