summaryrefslogtreecommitdiff
path: root/sc/qa/unit
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2023-04-27 10:55:31 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2023-04-27 13:53:21 +0200
commite5498d5323b2e9f1c4760d780a1a5542fbe9a4b9 (patch)
tree2632e88f53b7e70f8a819be94168a84f3b8e2551 /sc/qa/unit
parent4b6b9411e4ac912817dd804782ad2054bc0d1660 (diff)
tdf#151958: sc_subsequent_filters_test4: Add unittest
Change-Id: I43413ecb2ddf49676e7e446c6cdd1d4bfea7d8e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151088 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc/qa/unit')
-rw-r--r--sc/qa/unit/data/ods/tdf151958.odsbin0 -> 33175 bytes
-rw-r--r--sc/qa/unit/subsequent_filters_test4.cxx15
2 files changed, 15 insertions, 0 deletions
diff --git a/sc/qa/unit/data/ods/tdf151958.ods b/sc/qa/unit/data/ods/tdf151958.ods
new file mode 100644
index 000000000000..a37d3adae6af
--- /dev/null
+++ b/sc/qa/unit/data/ods/tdf151958.ods
Binary files differ
diff --git a/sc/qa/unit/subsequent_filters_test4.cxx b/sc/qa/unit/subsequent_filters_test4.cxx
index c439a02c6582..86e53499d0f0 100644
--- a/sc/qa/unit/subsequent_filters_test4.cxx
+++ b/sc/qa/unit/subsequent_filters_test4.cxx
@@ -1319,6 +1319,21 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest4, testTdf153444)
CPPUNIT_ASSERT_EQUAL(OUString(u"ß, µm/m"), pDoc->GetString(5, 0, 0));
}
+CPPUNIT_TEST_FIXTURE(ScFiltersTest4, testTdf151958)
+{
+ // Without the fix in place, this test would have failed with
+ // sal_uInt64 ScCountIfCellIterator<accessType>::GetCount(): Assertion `false' failed.
+ createScDoc("ods/tdf151958.ods");
+
+ ScDocument* pDoc = getScDoc();
+
+ double aValues[13] = { 17.0, 6.0, 6.0, 6.0, 5.0, 5.0, 4.0, 4.0, 4.0, 3.0, 3.0, 3.0, 2.0 };
+ for (size_t i = 3; i < 15; ++i)
+ {
+ CPPUNIT_ASSERT_EQUAL(aValues[i - 3], pDoc->GetValue(6, i, 0));
+ }
+}
+
CPPUNIT_TEST_FIXTURE(ScFiltersTest4, testTdf151046)
{
createScDoc("ods/tdf151046.ods");