Dan Hipschman : riched20/tests: Add a test for creating ITextDocument.

Alexandre Julliard julliard at winehq.org
Mon Jun 23 07:35:26 CDT 2008


Module: wine
Branch: master
Commit: 9615e2977d136d24fd8acd6dac7701d320657f7f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9615e2977d136d24fd8acd6dac7701d320657f7f

Author: Dan Hipschman <dsh at linux.ucla.edu>
Date:   Thu Jun 19 17:11:47 2008 -0700

riched20/tests: Add a test for creating ITextDocument.

---

 dlls/riched20/tests/richole.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c
index ba9ce55..dc87676 100644
--- a/dlls/riched20/tests/richole.c
+++ b/dlls/riched20/tests/richole.c
@@ -29,8 +29,12 @@
 #include <ole2.h>
 #include <richedit.h>
 #include <richole.h>
+#include <tom.h>
 #include <wine/test.h>
 
+#include <initguid.h>
+DEFINE_GUID(IID_ITextDocument, 0x8cc497c0, 0xa1df, 0x11ce, 0x80, 0x98, 0x00, 0xaa, 0x00, 0x47, 0xbe, 0x5d);
+
 static HMODULE hmoduleRichEdit;
 
 static HWND new_window(LPCTSTR lpClassName, DWORD dwStyle, HWND parent)
@@ -52,6 +56,8 @@ static HWND new_richedit(HWND parent)
 START_TEST(richole)
 {
   IRichEditOle *reOle = NULL;
+  ITextDocument *txtDoc = NULL;
+  HRESULT hres;
   LRESULT res;
   HWND w;
 
@@ -70,6 +76,12 @@ START_TEST(richole)
   ok(res, "SendMessage\n");
   ok(reOle != NULL, "EM_GETOLEINTERFACE\n");
 
+  hres = IUnknown_QueryInterface(reOle, &IID_ITextDocument,
+                                 (void **) &txtDoc);
+  ok(hres == S_OK, "IRichEditOle_QueryInterface\n");
+  ok(txtDoc != NULL, "IRichEditOle_QueryInterface\n");
+
+  ITextDocument_Release(txtDoc);
   IUnknown_Release(reOle);
   DestroyWindow(w);
 }




More information about the wine-cvs mailing list