From 89e662084f789e9dc5e9ad41dc3c5d26e7f3e051 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Wed, 23 Feb 2011 17:33:20 +0100 Subject: [PATCH] user32: Move functional code out of assert() (Coverity). --- dlls/user32/tests/win.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index cca222f2a59..603e93e2313 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -2897,6 +2897,7 @@ static void test_capture_4(void) HWND hwnd; WNDCLASSA wclass; HINSTANCE hInstance = GetModuleHandleA( NULL ); + ATOM aclass; if (!pGetGUIThreadInfo) { @@ -2913,10 +2914,11 @@ static void test_capture_4(void) wclass.lpszMenuName = 0; wclass.cbClsExtra = 0; wclass.cbWndExtra = 0; - assert (RegisterClassA( &wclass )); - assert (hwnd = CreateWindowA( wclass.lpszClassName, "MenuTest", - WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, - 400, 200, NULL, NULL, hInstance, NULL) ); + aclass = RegisterClassA( &wclass ); + ok( aclass, "RegisterClassA failed with error %d\n", GetLastError()); + hwnd = CreateWindowA( wclass.lpszClassName, "MenuTest", + WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, + 400, 200, NULL, NULL, hInstance, NULL); ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError()); if (!hwnd) return; hmenu = CreatePopupMenu(); -- 2.11.4.GIT