[PATCH 1/2] riched20: move tests of QueryInterface to test_Interface().
Jactry Zeng
jactry92 at gmail.com
Wed Jul 31 02:10:07 CDT 2013
-------------- next part --------------
From f94e9992350d5b8bce53505e6fcba94983fabb2b Mon Sep 17 00:00:00 2001
From: Jactry Zeng <jactry92 at gmail.com>
Date: Sat, 29 Jun 2013 17:40:05 +0800
Subject: riched20: move tests of QueryInterface to test_Interface().
To: wine-patches <wine-patches at winehq.org>
Reply-To: wine-devel <wine-devel at winehq.org>
---
dlls/riched20/tests/richole.c | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c
index d22904a..6b1b1f4 100644
--- a/dlls/riched20/tests/richole.c
+++ b/dlls/riched20/tests/richole.c
@@ -50,8 +50,7 @@ static HWND new_richedit(HWND parent)
return new_window(RICHEDIT_CLASS, ES_MULTILINE, parent);
}
-
-START_TEST(richole)
+static void test_Interfaces(void)
{
IRichEditOle *reOle = NULL;
ITextDocument *txtDoc = NULL;
@@ -61,11 +60,6 @@ START_TEST(richole)
LRESULT res;
HWND w;
- /* Must explicitly LoadLibrary(). The test has no references to functions in
- * RICHED20.DLL, so the linker doesn't actually link to it. */
- hmoduleRichEdit = LoadLibrary("RICHED20.DLL");
- ok(hmoduleRichEdit != NULL, "error: %d\n", (int) GetLastError());
-
w = new_richedit(NULL);
if (!w) {
skip("Couldn't create window\n");
@@ -81,9 +75,7 @@ START_TEST(richole)
ok(hres == S_OK, "IRichEditOle_QueryInterface\n");
ok(txtDoc != NULL, "IRichEditOle_QueryInterface\n");
- hres = ITextDocument_GetSelection(txtDoc, &txtSel);
- ok(hres == S_OK, "ITextDocument_GetSelection\n");
- ok(txtSel != NULL, "ITextDocument_GetSelection\n");
+ ITextDocument_GetSelection(txtDoc, &txtSel);
punk = NULL;
hres = ITextSelection_QueryInterface(txtSel, &IID_ITextSelection, (void **) &punk);
@@ -114,3 +106,13 @@ START_TEST(richole)
ITextSelection_Release(txtSel);
}
+
+START_TEST(richole)
+{
+ /* Must explicitly LoadLibrary(). The test has no references to functions in
+ * RICHED20.DLL, so the linker doesn't actually link to it. */
+ hmoduleRichEdit = LoadLibrary("RICHED20.DLL");
+ ok(hmoduleRichEdit != NULL, "error: %d\n", (int) GetLastError());
+
+ test_Interfaces();
+}
--
1.8.1.2
More information about the wine-patches
mailing list