[Libreoffice-commits] .: starmath/qa
Caolán McNamara
caolan at kemper.freedesktop.org
Mon Nov 29 13:03:54 PST 2010
starmath/qa/cppunit/test_starmath.cxx | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
New commits:
commit 42388226b5e43eef1577444f5ae605ed9d8c1fba
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Nov 29 21:03:42 2010 +0000
cppunit: shrink these test-cases a bit
diff --git a/starmath/qa/cppunit/test_starmath.cxx b/starmath/qa/cppunit/test_starmath.cxx
index 950390a..4c77c34 100644
--- a/starmath/qa/cppunit/test_starmath.cxx
+++ b/starmath/qa/cppunit/test_starmath.cxx
@@ -238,6 +238,15 @@ void Test::tmEditUndoRedo(SmDocShellRef &rDocShRef)
rtl::OUString sFinalText = rDocShRef->GetText();
CPPUNIT_ASSERT_MESSAGE("Strings much match", sStringOne == sFinalText);
}
+
+ {
+ rEditEngine.SetText(0, rtl::OUString());
+ rDocShRef->UpdateText();
+ rEditEngine.ClearModifyFlag();
+ rtl::OUString sFinalText = rDocShRef->GetText();
+ CPPUNIT_ASSERT_MESSAGE("Must be empty", !sFinalText.getLength());
+ }
+
}
void Test::createDocument()
@@ -252,25 +261,18 @@ void Test::createDocument()
SfxViewFrame *pViewFrame = SfxViewFrame::LoadHiddenDocument(*xDocShRef, 0);
- CPPUNIT_ASSERT_MESSAGE("Should have SfxViewFrame", pViewFrame);
-
- EditEngine &rEditEngine = xDocShRef->GetEditEngine();
- Window aFoo(NULL, 0);
- EditView aEditView(&rEditEngine, &aFoo);
- rEditEngine.SetActiveView(&aEditView);
-
- tmEditUndoRedo(xDocShRef);
- tmEditFailure(xDocShRef);
+ CPPUNIT_ASSERT_MESSAGE("Should have a SfxViewFrame", pViewFrame);
SfxBindings aBindings;
SfxDispatcher aDispatcher(pViewFrame);
aBindings.SetDispatcher(&aDispatcher);
SmCmdBoxWindow aSmCmdBoxWindow(&aBindings, NULL, NULL);
SmEditWindow aEditWindow(aSmCmdBoxWindow);
- aEditWindow.Flush();
- tmEditMarker(aEditWindow);
+ tmEditUndoRedo(xDocShRef);
tmEditAllClipboard(aEditWindow);
+ tmEditMarker(aEditWindow);
+ tmEditFailure(xDocShRef);
xDocShRef.Clear();
}
More information about the Libreoffice-commits
mailing list