summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2021-03-16 11:18:39 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2021-03-16 14:27:38 +0100
commit6fdff333560e625b7c5c4dd9053c9945a45a52d1 (patch)
treeb55df6d7484c6a4236e560a3e8e43710ee365218 /sc
parentf1073838d24d418c14afd0cf5cc4cfd547f5d213 (diff)
tdf#129606: sc_ucalc: Add unittest
Change-Id: I7fa9860da5f80fa903246d417f07a99dae4afb3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112566 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/ucalc.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 8fa94e0cd8b2..ec599ad7a42d 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -5017,6 +5017,19 @@ void Test::testAutoFill()
CPPUNIT_ASSERT_EQUAL( OUString("3.00%"), m_pDoc->GetString( 0, 82, 0 ) );
CPPUNIT_ASSERT_EQUAL( OUString("4.00%"), m_pDoc->GetString( 0, 83, 0 ) );
+ // Clear column A for a new test.
+ clearRange(m_pDoc, ScRange(0,0,0,0,MAXROW,0));
+ m_pDoc->SetRowHidden(0, MAXROW, 0, false); // Show all rows.
+
+ m_pDoc->SetString( 0, 0, 0, "1" );
+ m_pDoc->SetString( 0, 1, 0, "1.1" );
+ m_pDoc->Fill( 0, 0, 0, 1, nullptr, aMarkData, 60, FILL_TO_BOTTOM, FILL_AUTO );
+
+ // tdf#129606: Without the fix in place, this test would have failed with
+ // - Expected: 6
+ // - Actual : 6.00000000000001
+ CPPUNIT_ASSERT_EQUAL( OUString("6"), m_pDoc->GetString( 0, 50, 0 ) );
+
m_pDoc->DeleteTab(0);
}