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

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Tue Sep 8 12:30:18 UTC 2020


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

New commits:
commit e29b91e348be22037d9a3bcb3d6fe8ca91d5ee61
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Tue Sep 8 12:18:42 2020 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue Sep 8 14:29:32 2020 +0200

    tdf#125099: sc_subsequent_filters_test: Add unittest
    
    Change-Id: Ie63b0c9c6d2228fc9a4a9b1e084df2ada0a1f951
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102233
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/sc/qa/unit/data/ods/tdf125099.ods b/sc/qa/unit/data/ods/tdf125099.ods
new file mode 100644
index 000000000000..538fa398768f
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf125099.ods differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index bbedc4b46f0b..7ca0f5fa1a25 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -231,6 +231,7 @@ public:
     void testTdf98844();
     void testTdf100458();
     void testTdf118561();
+    void testTdf125099();
     void testTdf134455();
     void testTdf119533();
     void testTdf127982();
@@ -398,6 +399,7 @@ public:
     CPPUNIT_TEST(testTdf98844);
     CPPUNIT_TEST(testTdf100458);
     CPPUNIT_TEST(testTdf118561);
+    CPPUNIT_TEST(testTdf125099);
     CPPUNIT_TEST(testTdf134455);
     CPPUNIT_TEST(testTdf119533);
     CPPUNIT_TEST(testTdf127982);
@@ -3845,6 +3847,27 @@ void ScFiltersTest::testTdf118561()
     xDocSh->DoClose();
 }
 
+void ScFiltersTest::testTdf125099()
+{
+    ScDocShellRef xDocSh = loadDoc("tdf125099.", FORMAT_ODS);
+    CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
+    ScDocument& rDoc = xDocSh->GetDocument();
+
+    CPPUNIT_ASSERT_EQUAL(OUString("03:53:46"), rDoc.GetString(ScAddress(0,0,0)));
+    CPPUNIT_ASSERT_EQUAL(OUString("03:23:59"), rDoc.GetString(ScAddress(0,1,0)));
+
+    xDocSh->DoHardRecalc();
+
+    CPPUNIT_ASSERT_EQUAL(OUString("03:53:46"), rDoc.GetString(ScAddress(0,0,0)));
+
+    // Without the fix in place, this would have failed with
+    // - Expected: 03:24:00
+    // - Actual  : 03:23:59
+    CPPUNIT_ASSERT_EQUAL(OUString("03:24:00"), rDoc.GetString(ScAddress(0,1,0)));
+
+    xDocSh->DoClose();
+}
+
 void ScFiltersTest::testTdf134455()
 {
     ScDocShellRef xDocSh = loadDoc("tdf134455.", FORMAT_XLSX);


More information about the Libreoffice-commits mailing list