=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: comctl32/tests: Don' t test functions directly when reporting GetLastError().

Alexandre Julliard julliard at winehq.org
Mon Jun 10 13:43:54 CDT 2019


Module: wine
Branch: master
Commit: 8ad4cce047b153e1f0691a0f84b45b9c2e009d79
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=8ad4cce047b153e1f0691a0f84b45b9c2e009d79

Author: André Hentschel <nerv at dawncrow.de>
Date:   Sun Jun  9 18:17:23 2019 +0200

comctl32/tests: Don't test functions directly when reporting GetLastError().

Signed-off-by: André Hentschel <nerv at dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/comctl32/tests/pager.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/dlls/comctl32/tests/pager.c b/dlls/comctl32/tests/pager.c
index f48dc03..4b5dfe6 100644
--- a/dlls/comctl32/tests/pager.c
+++ b/dlls/comctl32/tests/pager.c
@@ -564,9 +564,11 @@ static void test_wm_notifyformat(void)
     static const INT formats[] = {NFR_UNICODE, NFR_ANSI};
     HWND parent, pager, child;
     LRESULT ret;
+    BOOL bret;
     INT i;
 
-    ok(register_notifyformat_class(), "Register test class failed, error 0x%08x\n", GetLastError());
+    bret = register_notifyformat_class();
+    ok(bret, "Register test class failed, error 0x%08x\n", GetLastError());
 
     for (i = 0; i < ARRAY_SIZE(formats); i++)
     {
@@ -1280,9 +1282,11 @@ static void test_wm_notify(void)
         {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
          TVN_SELCHANGEDW, TVN_SELCHANGEDA, CONVERT_SEND, TVITEM_OLD_HANDLER}
     };
+    BOOL bret;
     INT i;
 
-    ok(register_test_notify_class(), "Register test class failed, error 0x%08x\n", GetLastError());
+    bret = register_test_notify_class();
+    ok(bret, "Register test class failed, error 0x%08x\n", GetLastError());
 
     parent = CreateWindowA(class, "parent", WS_OVERLAPPED, 0, 0, 100, 100, 0, 0, GetModuleHandleA(0), 0);
     ok(parent != NULL, "CreateWindow failed\n");




More information about the wine-cvs mailing list