diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-03-16 10:01:25 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-03-16 11:01:20 +0100 |
commit | d2392723e1db63e31aa31fb4531a368b349fcd88 (patch) | |
tree | 30c09dd9520c9d012a54ac879bb170b74f801ac8 /sc | |
parent | 66e531d2337be9a2be7b1798779fb9da0e198bbf (diff) |
tdf#89998: sc_ucalc: Add unittest
Change-Id: I134ce260f0c605185125bbd2723c58661d9ba615
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112561
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 5fab68bcf3f1..8fa94e0cd8b2 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -5003,6 +5003,20 @@ void Test::testAutoFill() CPPUNIT_ASSERT_EQUAL( OUString("001-001-003"), m_pDoc->GetString( 0, 72, 0 ) ); CPPUNIT_ASSERT_EQUAL( OUString("001-001-004"), m_pDoc->GetString( 0, 73, 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, 80, 0, "1%" ); + m_pDoc->Fill( 0, 80, 0, 80, nullptr, aMarkData, 3, FILL_TO_BOTTOM, FILL_AUTO ); + + // tdf#89998: Without the fix in place, this test would have failed with + // - Expected: 2.00% + // - Actual : 101.00% + CPPUNIT_ASSERT_EQUAL( OUString("2.00%"), m_pDoc->GetString( 0, 81, 0 ) ); + CPPUNIT_ASSERT_EQUAL( OUString("3.00%"), m_pDoc->GetString( 0, 82, 0 ) ); + CPPUNIT_ASSERT_EQUAL( OUString("4.00%"), m_pDoc->GetString( 0, 83, 0 ) ); + m_pDoc->DeleteTab(0); } |