riched20/tests: Don't test function directly when reporting GetLastError()

André Hentschel nerv at dawncrow.de
Wed Dec 29 19:39:40 CST 2010


---
 dlls/riched20/tests/editor.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c
index efd2023..63b23e9 100644
--- a/dlls/riched20/tests/editor.c
+++ b/dlls/riched20/tests/editor.c
@@ -7070,6 +7070,7 @@ static void test_dialogmode(void)
 
 START_TEST( editor )
 {
+  BOOL ret;
   /* 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");
@@ -7134,5 +7135,6 @@ START_TEST( editor )
   }
 
   OleFlushClipboard();
-  ok(FreeLibrary(hmoduleRichEdit) != 0, "error: %d\n", (int) GetLastError());
+  ret = FreeLibrary(hmoduleRichEdit);
+  ok(ret, "error: %d\n", (int) GetLastError());
 }
-- 

Best Regards, André Hentschel



More information about the wine-patches mailing list