diff options
author | Caolán McNamara <caolanm@redhat.com> | 2010-11-29 21:03:42 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2010-11-29 21:03:42 +0000 |
commit | 1df0455c57279b582a6a08c48a03e8abe50e0e2b (patch) | |
tree | 78441b752f77b5db806ad0b21e03b2bdf67c736a /starmath | |
parent | 3d9ff29a1636e29da56f401e9d86d5abe4ee5f80 (diff) |
cppunit: shrink these test-cases a bit
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/qa/cppunit/test_starmath.cxx | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/starmath/qa/cppunit/test_starmath.cxx b/starmath/qa/cppunit/test_starmath.cxx index 950390a070ac..4c77c3470755 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(); } |