tdf#147894: sc_uicalc: Add unittest
Change-Id: Id7e5159542b17a510958ea8e22343e979720a56b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131527 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
parent
3a2c156eb8
commit
3d8c11a8ea
1 changed files with 25 additions and 0 deletions
|
@ -355,6 +355,31 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf63805)
|
|||
CPPUNIT_ASSERT_EQUAL(OUString(""), pDoc->GetString(ScAddress(0, 1, 0)));
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf147894)
|
||||
{
|
||||
mxComponent = loadFromDesktop("private:factory/scalc");
|
||||
ScModelObj* pModelObj = dynamic_cast<ScModelObj*>(mxComponent.get());
|
||||
CPPUNIT_ASSERT(pModelObj);
|
||||
ScDocument* pDoc = pModelObj->GetDocument();
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
|
||||
//Select the first row
|
||||
goToCell("1:1");
|
||||
|
||||
uno::Sequence<beans::PropertyValue> aArgs(
|
||||
comphelper::InitPropertySequence({ { "FillDir", uno::Any(OUString("R")) },
|
||||
{ "FillCmd", uno::Any(OUString("L")) },
|
||||
{ "FillStep", uno::Any(OUString("1")) },
|
||||
{ "FillDateCmd", uno::Any(OUString("D")) },
|
||||
{ "FillStart", uno::Any(OUString("1")) } }));
|
||||
|
||||
// Without the fix in place, this test would have crashed here
|
||||
dispatchCommand(mxComponent, ".uno:FillSeries", aArgs);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(1.0, pDoc->GetValue(ScAddress(0, 0, 0)));
|
||||
CPPUNIT_ASSERT_EQUAL(16384.0, pDoc->GetValue(ScAddress(16383, 0, 0)));
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf94208)
|
||||
{
|
||||
mxComponent = loadFromDesktop("private:factory/scalc");
|
||||
|
|
Loading…
Reference in a new issue