Kaydet (Commit) ce21baa3 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

add test case for smaller MatConcat case, related tdf#88849

Change-Id: I8faf836e87ae371a156e07ec7a5bc274ccf32efd
Reviewed-on: https://gerrit.libreoffice.org/24124Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst 92f12d0d
......@@ -74,7 +74,8 @@ public:
CPPUNIT_TEST(testLoadingFileWithSingleBigSheet);
CPPUNIT_TEST(testFixedSum);
CPPUNIT_TEST(testVariableSum);
CPPUNIT_TEST(testMatConcat);
CPPUNIT_TEST(testMatConcatSmall);
CPPUNIT_TEST(testMatConcatLarge);
CPPUNIT_TEST_SUITE_END();
private:
......@@ -99,7 +100,8 @@ private:
void testLoadingFileWithSingleBigSheet();
void testFixedSum();
void testVariableSum();
void testMatConcat();
void testMatConcatSmall();
void testMatConcatLarge();
};
sal_Int32 ScPerfObj::nTest = 0;
......@@ -630,7 +632,35 @@ void ScPerfObj::testVariableSum()
callgrindDump("sc:sum_with_variable_array_formula");
}
void ScPerfObj::testMatConcat()
void ScPerfObj::testMatConcatSmall()
{
uno::Reference< sheet::XSpreadsheetDocument > xDoc(init("empty.ods"), UNO_QUERY_THROW);
CPPUNIT_ASSERT(xDoc.is());
uno::Reference< sheet::XCalculatable > xCalculatable(xDoc, UNO_QUERY_THROW);
// get getSheets
uno::Reference< sheet::XSpreadsheets > xSheets (xDoc->getSheets(), UNO_QUERY_THROW);
uno::Any rSheet = xSheets->getByName("Sheet1");
// query for the XSpreadsheet interface
uno::Reference< sheet::XSpreadsheet > xSheet (rSheet, UNO_QUERY);
// query for the XCellRange interface
uno::Reference< table::XCellRange > rCellRange(rSheet, UNO_QUERY);
// query the cell range
uno::Reference< table::XCellRange > xCellRange = rCellRange->getCellRangeByName("C1");
uno::Reference< sheet::XArrayFormulaRange > xArrayFormulaRange(xCellRange, UNO_QUERY_THROW);
callgrindStart();
xArrayFormulaRange->setArrayFormula("=A1:A20&B1:B20");
xCalculatable->calculate();
callgrindDump("sc:mat_concat_small");
}
void ScPerfObj::testMatConcatLarge()
{
uno::Reference< sheet::XSpreadsheetDocument > xDoc(init("empty.ods"), UNO_QUERY_THROW);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment