fdo#74041: Write unit test for this.
Change-Id: I3af0e5be3f7c6ae15ebd26335020c8beb96d14d2
This commit is contained in:
@@ -250,6 +250,7 @@ public:
|
|||||||
void testSharedFormulasDeleteRows();
|
void testSharedFormulasDeleteRows();
|
||||||
void testSharedFormulasRefUpdateMoveSheets();
|
void testSharedFormulasRefUpdateMoveSheets();
|
||||||
void testSharedFormulasCopyPaste();
|
void testSharedFormulasCopyPaste();
|
||||||
|
void testSharedFormulaInsertColumn();
|
||||||
void testFormulaPosition();
|
void testFormulaPosition();
|
||||||
|
|
||||||
void testMixData();
|
void testMixData();
|
||||||
@@ -406,6 +407,7 @@ public:
|
|||||||
CPPUNIT_TEST(testSharedFormulasDeleteRows);
|
CPPUNIT_TEST(testSharedFormulasDeleteRows);
|
||||||
CPPUNIT_TEST(testSharedFormulasRefUpdateMoveSheets);
|
CPPUNIT_TEST(testSharedFormulasRefUpdateMoveSheets);
|
||||||
CPPUNIT_TEST(testSharedFormulasCopyPaste);
|
CPPUNIT_TEST(testSharedFormulasCopyPaste);
|
||||||
|
CPPUNIT_TEST(testSharedFormulaInsertColumn);
|
||||||
CPPUNIT_TEST(testFormulaPosition);
|
CPPUNIT_TEST(testFormulaPosition);
|
||||||
CPPUNIT_TEST(testJumpToPrecedentsDependents);
|
CPPUNIT_TEST(testJumpToPrecedentsDependents);
|
||||||
CPPUNIT_TEST(testSetBackgroundColor);
|
CPPUNIT_TEST(testSetBackgroundColor);
|
||||||
|
@@ -679,4 +679,24 @@ void Test::testSharedFormulasCopyPaste()
|
|||||||
m_pDoc->DeleteTab(0);
|
m_pDoc->DeleteTab(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Test::testSharedFormulaInsertColumn()
|
||||||
|
{
|
||||||
|
m_pDoc->InsertTab(0, "Test");
|
||||||
|
|
||||||
|
// Set shared formula group over H2:H3.
|
||||||
|
m_pDoc->SetString(ScAddress(7,1,0), "=G3*B3");
|
||||||
|
m_pDoc->SetString(ScAddress(7,2,0), "=G4*B4");
|
||||||
|
|
||||||
|
// Insert a single column at Column F. This used to crash before fdo#74041.
|
||||||
|
m_pDoc->InsertCol(ScRange(5,0,0,5,MAXROW,0));
|
||||||
|
|
||||||
|
if (!checkFormula(*m_pDoc, ScAddress(8,1,0), "H3*B3"))
|
||||||
|
CPPUNIT_FAIL("Wrong formula!");
|
||||||
|
|
||||||
|
if (!checkFormula(*m_pDoc, ScAddress(8,2,0), "H4*B4"))
|
||||||
|
CPPUNIT_FAIL("Wrong formula!");
|
||||||
|
|
||||||
|
m_pDoc->DeleteTab(0);
|
||||||
|
}
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
Reference in New Issue
Block a user