summaryrefslogtreecommitdiff
path: root/sc/qa/unit/ucalc.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/qa/unit/ucalc.cxx')
-rw-r--r--sc/qa/unit/ucalc.cxx21
1 files changed, 14 insertions, 7 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 3c598f63e7ba..f00e3a0a2faa 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -3792,16 +3792,19 @@ void Test::testCutPasteRefUndo()
m_pDoc->CopyFromClip(ScAddress(2,1,0), aMark, IDF_CONTENTS, pUndoDoc, &aClipDoc, true, false);
CPPUNIT_ASSERT_EQUAL(12.0, m_pDoc->GetValue(0,1,0));
- checkFormula(*m_pDoc, ScAddress(0,1,0), "C2", "A2 should be referencing C2.");
+ if (!checkFormula(*m_pDoc, ScAddress(0,1,0), "C2"))
+ CPPUNIT_FAIL("A2 should be referencing C2.");
// At this point, the ref undo document should contain a formula cell at A2 that references B2.
- checkFormula(*pUndoDoc, ScAddress(0,1,0), "B2", "A2 in the undo document should be referencing B2.");
+ if (!checkFormula(*pUndoDoc, ScAddress(0,1,0), "B2"))
+ CPPUNIT_FAIL("A2 in the undo document should be referencing B2.");
ScUndoPaste aUndo(&getDocShell(), ScRange(ScAddress(2,1,0)), aMark, pUndoDoc, NULL, IDF_CONTENTS, NULL, false, NULL);
aUndo.Undo();
// Now A2 should be referencing B2 once again.
- checkFormula(*m_pDoc, ScAddress(0,1,0), "B2", "A2 should be referencing B2 after undo.");
+ if (!checkFormula(*m_pDoc, ScAddress(0,1,0), "B2"))
+ CPPUNIT_FAIL("A2 should be referencing B2 after undo.");
m_pDoc->DeleteTab(0);
}
@@ -3824,8 +3827,10 @@ void Test::testMoveRefBetweenSheets()
CPPUNIT_ASSERT_EQUAL(30.0, m_pDoc->GetValue(ScAddress(0,2,0)));
// These formulas should not display the sheet name.
- checkFormula(*m_pDoc, ScAddress(0,1,0), "A1", "Wrong formula!");
- checkFormula(*m_pDoc, ScAddress(0,2,0), "SUM(A1:C1)", "Wrong formula!");
+ if (!checkFormula(*m_pDoc, ScAddress(0,1,0), "A1"))
+ CPPUNIT_FAIL("Wrong formula!");
+ if (!checkFormula(*m_pDoc, ScAddress(0,2,0), "SUM(A1:C1)"))
+ CPPUNIT_FAIL("Wrong formula!");
// Move Test1.A2:A3 to Test2.A2:A3.
ScDocFunc& rFunc = getDocShell().GetDocFunc();
@@ -3837,8 +3842,10 @@ void Test::testMoveRefBetweenSheets()
CPPUNIT_ASSERT_EQUAL(30.0, m_pDoc->GetValue(ScAddress(0,2,1)));
// The reference in the pasted formula should display sheet name after the move.
- checkFormula(*m_pDoc, ScAddress(0,1,1), "Test1.A1", "Wrong formula!");
- checkFormula(*m_pDoc, ScAddress(0,2,1), "SUM(Test1.A1:C1)", "Wrong formula!");
+ if (!checkFormula(*m_pDoc, ScAddress(0,1,1), "Test1.A1"))
+ CPPUNIT_FAIL("Wrong formula!");
+ if (!checkFormula(*m_pDoc, ScAddress(0,2,1), "SUM(Test1.A1:C1)"))
+ CPPUNIT_FAIL("Wrong formula!");
m_pDoc->DeleteTab(1);
m_pDoc->DeleteTab(0);