summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-07-15 19:04:52 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-07-24 23:29:20 -0400
commitf724552dec5bc4c0fd565ac300b4b3bbdd042310 (patch)
tree88175d3f9672972c336449815f01055bdf720078
parentc665c1e7f4bdfb368d80ae51e13cfa0c9ab89de5 (diff)
We don't need this test any more.
We have tests for in-place grouping of formula cells in ucalc_sharedformula. Change-Id: I04ca2e53bc7351084cac5d0bf609f1bdb2a25066
-rw-r--r--sc/qa/unit/ucalc.cxx62
-rw-r--r--sc/qa/unit/ucalc.hxx5
2 files changed, 0 insertions, 67 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index b3ddaffb11b6..fb34ca3bbe30 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -3935,68 +3935,6 @@ void Test::testCellTextWidth()
m_pDoc->DeleteTab(0);
}
-void Test::testFormulaGrouping()
-{
- if ( !getenv("SC_FORMULAGROUP") )
- return;
-
- static const struct {
- const char *pFormula[3];
- bool bGroup[3];
- } aGroupTests[] = {
- { { "=B1", "=B2", "" }, // relative reference
- { true, true, false } },
- { { "=B1", "=B2", "=B3" },
- { true, true, true } },
- { { "=B1", "", "=B3" }, // a gap
- { false, false, false } },
- { { "=$B$1", "=$B$1", "" }, // absolute reference
- { true, true, false } },
- { { "=$Z$10", "=$Z$10", "=$Z$10" },
- { true, true, true } },
- { { "=C1+$Z$10", "=C2+$Z$10", "=C3+$Z$10" }, // mixture
- { true, true, true } },
- { { "=C1+$Z$11", "=C2+$Z$12", "=C3+$Z$12" }, // mixture
- { false, true, true } },
- { { "=SUM(B1)", "", "=SUM(B3)" }, // a gap
- { false, false, false } },
- };
-
- m_pDoc->InsertTab( 0, "sheet" );
-
- for (size_t i = 0; i < SAL_N_ELEMENTS(aGroupTests); ++i)
- {
- for (size_t j = 0; j < SAL_N_ELEMENTS(aGroupTests[0].pFormula); ++j)
- {
- OUString aFormula = OUString::createFromAscii(aGroupTests[i].pFormula[j]);
- m_pDoc->SetString(0, static_cast<SCROW>(j), 0, aFormula);
- }
- m_pDoc->RebuildFormulaGroups();
-
- for (size_t j = 0; j < SAL_N_ELEMENTS(aGroupTests[0].pFormula); ++j)
- {
- ScRefCellValue aCell;
- aCell.assign(*m_pDoc, ScAddress(0, static_cast<SCROW>(j), 0));
- if (aCell.isEmpty())
- {
- CPPUNIT_ASSERT_MESSAGE("invalid empty cell", !aGroupTests[i].bGroup[j]);
- continue;
- }
- CPPUNIT_ASSERT_MESSAGE("Cell expected, but not there.", !aCell.isEmpty());
- CPPUNIT_ASSERT_MESSAGE("Cell wrong type.",
- aCell.meType == CELLTYPE_FORMULA);
- ScFormulaCell *pCur = aCell.mpFormula;
-
- if( !!pCur->GetCellGroup().get() ^ aGroupTests[i].bGroup[j] )
- {
- cout << "expected group test " << i << " at row " << j << " to be "
- << aGroupTests[i].bGroup[j] << " but is " << !!pCur->GetCellGroup().get() << endl;
- CPPUNIT_FAIL("Failed");
- }
- }
- }
-}
-
void Test::testCondFormatINSDEL()
{
// fdo#62206
diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx
index 8c4edcfa8272..43b10a983f11 100644
--- a/sc/qa/unit/ucalc.hxx
+++ b/sc/qa/unit/ucalc.hxx
@@ -257,10 +257,6 @@ public:
void testAnchoredRotatedShape();
void testCellTextWidth();
- /**
- * Test formula & formula grouping
- */
- void testFormulaGrouping();
void testCondFormatINSDEL();
CPPUNIT_TEST_SUITE(Test);
@@ -345,7 +341,6 @@ public:
CPPUNIT_TEST(testDeleteCol);
CPPUNIT_TEST(testAnchoredRotatedShape);
CPPUNIT_TEST(testCellTextWidth);
- CPPUNIT_TEST(testFormulaGrouping);
CPPUNIT_TEST(testCondFormatINSDEL);
CPPUNIT_TEST_SUITE_END();