summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2020-09-08 12:18:42 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2020-09-08 14:29:32 +0200
commite29b91e348be22037d9a3bcb3d6fe8ca91d5ee61 (patch)
tree123aba1ca71566626242d21d8efea662ddbcc765 /sc
parent63bf8f042abe3c0f6989f6763d13f5389182b816 (diff)
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@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/data/ods/tdf125099.odsbin0 -> 10144 bytes
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx23
2 files changed, 23 insertions, 0 deletions
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
--- /dev/null
+++ b/sc/qa/unit/data/ods/tdf125099.ods
Binary files 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);