[Libreoffice-commits] core.git: sc/qa
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Thu Aug 12 21:50:44 UTC 2021
sc/qa/unit/data/ods/tdf143809.ods |binary
sc/qa/unit/subsequent_filters-test.cxx | 25 +++++++++++++++++++++++++
2 files changed, 25 insertions(+)
New commits:
commit 18771471f75685a6d3838a22d16dcff5c398e652
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Thu Aug 12 17:50:32 2021 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Thu Aug 12 23:50:06 2021 +0200
tdf#143809: sc_subsequent_filters: Add unittest
Change-Id: I5e2729edbf46128195c441459970c5946cd2ad17
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120403
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/sc/qa/unit/data/ods/tdf143809.ods b/sc/qa/unit/data/ods/tdf143809.ods
new file mode 100644
index 000000000000..35e0988fe905
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf143809.ods differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index b48e9a2df575..16e3ced78ce7 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -115,6 +115,7 @@ public:
void testUpdateCircleInMergedCellODS();
void testDeleteCircleInMergedCellODS();
void testBooleanFormatXLSX();
+ void testTdf143809();
void testTdf76310();
void testBasicCellContentODS();
void testRangeNameXLS();
@@ -225,6 +226,7 @@ public:
CPPUNIT_TEST(testUpdateCircleInMergedCellODS);
CPPUNIT_TEST(testDeleteCircleInMergedCellODS);
CPPUNIT_TEST(testBooleanFormatXLSX);
+ CPPUNIT_TEST(testTdf143809);
CPPUNIT_TEST(testTdf76310);
CPPUNIT_TEST(testBasicCellContentODS);
CPPUNIT_TEST(testRangeNameXLS);
@@ -673,6 +675,29 @@ void ScFiltersTest::testBooleanFormatXLSX()
xDocSh->DoClose();
}
+void ScFiltersTest::testTdf143809()
+{
+ ScDocShellRef xDocSh = loadDoc(u"tdf143809.", FORMAT_ODS);
+
+ ScDocument& rDoc = xDocSh->GetDocument();
+
+ OUString aFormula;
+ rDoc.GetFormula(0, 0, 0, aFormula);
+ CPPUNIT_ASSERT_EQUAL(OUString("=SUMPRODUCT(IFERROR(CEILING.MATH(DURATIONS,300),0))"), aFormula);
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: 53700
+ // - Actual : Err:502
+ CPPUNIT_ASSERT_EQUAL(OUString("53700"), rDoc.GetString(0, 0, 0));
+
+ rDoc.GetFormula(0, 1, 0, aFormula);
+ CPPUNIT_ASSERT_EQUAL(
+ OUString("=SUMPRODUCT(IFERROR(CEILING(SUMIFS(DURATIONS,IDS,IDS),300)/COUNTIFS(IDS,IDS),0))"), aFormula);
+ CPPUNIT_ASSERT_EQUAL(OUString("51900"), rDoc.GetString(0, 1, 0));
+
+ xDocSh->DoClose();
+}
+
void ScFiltersTest::testTdf76310()
{
ScDocShellRef xDocSh = loadDoc(u"tdf76310.", FORMAT_ODS);
More information about the Libreoffice-commits
mailing list