diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-06-25 12:01:35 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-06-25 15:08:19 +0200 |
commit | f6fba24f41baab07eb40f4e2787f68df95e989d2 (patch) | |
tree | 9d1f1dd6c227a40d9d1730768d0dcb09ab2d5075 /sc | |
parent | 4202d8e5ff8849652ebc79aed1e879f74289b632 (diff) |
tdf#134234: sc: Add unittest
Change-Id: Ie49cabb8ba10aaa8ec4453f6284b86617e98d490
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97103
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/data/ods/tdf134234.ods | bin | 0 -> 10523 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 15 |
2 files changed, 15 insertions, 0 deletions
diff --git a/sc/qa/unit/data/ods/tdf134234.ods b/sc/qa/unit/data/ods/tdf134234.ods Binary files differnew file mode 100644 index 000000000000..744f991cff71 --- /dev/null +++ b/sc/qa/unit/data/ods/tdf134234.ods diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 80a616339ed4..ca1f0b53a983 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -246,6 +246,7 @@ public: void testBackgroundColorStandardXLSXML(); void testTdf131536(); void testTdf85617(); + void testTdf134234(); void testNamedExpressionsXLSXML(); void testEmptyRowsXLSXML(); void testBorderDirectionsXLSXML(); @@ -394,6 +395,7 @@ public: CPPUNIT_TEST(testBackgroundColorStandardXLSXML); CPPUNIT_TEST(testTdf131536); CPPUNIT_TEST(testTdf85617); + CPPUNIT_TEST(testTdf134234); CPPUNIT_TEST(testNamedExpressionsXLSXML); CPPUNIT_TEST(testEmptyRowsXLSXML); CPPUNIT_TEST(testBorderDirectionsXLSXML); @@ -3858,6 +3860,19 @@ void ScFiltersTest::testTdf85617() CPPUNIT_ASSERT_EQUAL(4.5, rDoc.GetValue(aPos)); } +void ScFiltersTest::testTdf134234() +{ + ScDocShellRef xDocSh = loadDoc("tdf134234.", FORMAT_ODS); + CPPUNIT_ASSERT_MESSAGE("Failed to load the document", xDocSh.is()); + ScDocument& rDoc = xDocSh->GetDocument(); + + CPPUNIT_ASSERT_EQUAL(3.0, rDoc.GetValue(ScAddress(1,0,1))); + + //Without the fix in place, SUMPRODUCT would have returned 0 + CPPUNIT_ASSERT_EQUAL(36.54, rDoc.GetValue(ScAddress(2,0,1))); + CPPUNIT_ASSERT_EQUAL(sal_uInt32(833), static_cast<sal_uInt32>(rDoc.GetValue(ScAddress(3,0,1)))); +} + void ScFiltersTest::testNamedExpressionsXLSXML() { { |