sc/qa/unit/ucalc.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
New commits: commit 863f1bfca71a5eb084931b49393fb7a9c5a0deaf Author: Kohei Yoshida <kohei.yosh...@collabora.com> Date: Sun Feb 9 22:17:59 2014 -0500 fdo#74323: Test the undo and redo as well. Change-Id: I5ed921290fc3f98ecd268b606c0f7ccbf9016c39 diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 5ae240f..fc539d9 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -5486,6 +5486,20 @@ void Test::testTransliterateText() CPPUNIT_ASSERT_EQUAL(OUString("NOAH"), m_pDoc->GetString(ScAddress(0,1,0))); CPPUNIT_ASSERT_EQUAL(OUString("OSCAR"), m_pDoc->GetString(ScAddress(0,2,0))); + // Test the undo and redo. + SfxUndoManager* pUndoMgr = m_pDoc->GetUndoManager(); + CPPUNIT_ASSERT_MESSAGE("Failed to get undo manager.", pUndoMgr); + + pUndoMgr->Undo(); + CPPUNIT_ASSERT_EQUAL(OUString("Mike"), m_pDoc->GetString(ScAddress(0,0,0))); + CPPUNIT_ASSERT_EQUAL(OUString("Noah"), m_pDoc->GetString(ScAddress(0,1,0))); + CPPUNIT_ASSERT_EQUAL(OUString("Oscar"), m_pDoc->GetString(ScAddress(0,2,0))); + + pUndoMgr->Redo(); + CPPUNIT_ASSERT_EQUAL(OUString("MIKE"), m_pDoc->GetString(ScAddress(0,0,0))); + CPPUNIT_ASSERT_EQUAL(OUString("NOAH"), m_pDoc->GetString(ScAddress(0,1,0))); + CPPUNIT_ASSERT_EQUAL(OUString("OSCAR"), m_pDoc->GetString(ScAddress(0,2,0))); + m_pDoc->DeleteTab(0); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits