[USER32_APITEST] Add a PCH.

This commit is contained in:
Amine Khaldi 2017-12-02 21:17:22 +01:00
parent 283bbe7346
commit c39b0fc667
39 changed files with 67 additions and 196 deletions

View file

@ -1,4 +1,6 @@
#pragma once
static __inline ATOM RegisterSimpleClass(WNDPROC lpfnWndProc, LPCWSTR lpszClassName) static __inline ATOM RegisterSimpleClass(WNDPROC lpfnWndProc, LPCWSTR lpszClassName)
{ {
WNDCLASSEXW wcex; WNDCLASSEXW wcex;

View file

@ -5,14 +5,7 @@
* PROGRAMMERS: Giannis Adamopoulos * PROGRAMMERS: Giannis Adamopoulos
*/ */
#include <apitest.h> #include "precomp.h"
#include <wingdi.h>
#include <winuser.h>
#include <msgtrace.h>
#include <user32testhelpers.h>
#define DESKTOP_ALL_ACCESS 0x01ff
typedef struct { typedef struct {
DWORD tid; DWORD tid;

View file

@ -38,13 +38,13 @@ list(APPEND SOURCE
TrackMouseEvent.c TrackMouseEvent.c
WndProc.c WndProc.c
wsprintf.c wsprintf.c
testlist.c precomp.h)
user32_apitest.rc)
add_executable(user32_apitest ${SOURCE}) add_executable(user32_apitest ${SOURCE} testlist.c user32_apitest.rc)
target_link_libraries(user32_apitest wine ${PSEH_LIB}) target_link_libraries(user32_apitest wine ${PSEH_LIB})
set_module_type(user32_apitest win32cui) set_module_type(user32_apitest win32cui)
add_importlibs(user32_apitest advapi32 gdi32 user32 msvcrt kernel32 ntdll) add_importlibs(user32_apitest advapi32 gdi32 user32 msvcrt kernel32 ntdll)
add_pch(user32_apitest precomp.h SOURCE)
add_rostests_file(TARGET user32_apitest) add_rostests_file(TARGET user32_apitest)
add_rostests_file(FILE "${CMAKE_CURRENT_SOURCE_DIR}/verclasstest1.manifest") add_rostests_file(FILE "${CMAKE_CURRENT_SOURCE_DIR}/verclasstest1.manifest")

View file

@ -5,12 +5,7 @@
* PROGRAMMERS: Andreas Maier * PROGRAMMERS: Andreas Maier
*/ */
#include <stdarg.h> #include "precomp.h"
#include <stdio.h>
#include <apitest.h>
#include <wingdi.h>
#include <winuser.h>
#define TEST_MAX_MSG 50 #define TEST_MAX_MSG 50

View file

@ -1,8 +1,5 @@
#include <apitest.h> #include "precomp.h"
#include <winuser.h>
#include <wingdi.h>
START_TEST(CreateIconFromResourceEx) START_TEST(CreateIconFromResourceEx)
{ {
@ -89,4 +86,4 @@ START_TEST(CreateIconFromResourceEx)
ok(hcur1 == NULL, "\n"); ok(hcur1 == NULL, "\n");
err = GetLastError(); err = GetLastError();
ok(err == 0x0badf00d, "err: %lu\n", err); ok(err == 0x0badf00d, "err: %lu\n", err);
} }

View file

@ -6,10 +6,7 @@
* Mark Jansen * Mark Jansen
*/ */
#include <apitest.h> #include "precomp.h"
#include <winuser.h>
#include <msgtrace.h>
#include <user32testhelpers.h>
static void Test_Params(void) static void Test_Params(void)
{ {

View file

@ -5,12 +5,7 @@
* PROGRAMMERS: Thomas Faber <thomas.faber@reactos.org> * PROGRAMMERS: Thomas Faber <thomas.faber@reactos.org>
*/ */
#include <apitest.h> #include "precomp.h"
#include <winuser.h>
#include <undocuser.h>
#include <msgtrace.h>
#include <user32testhelpers.h>
HWND hWnd1, hWnd2, hWnd3, hWnd4; HWND hWnd1, hWnd2, hWnd3, hWnd4;

View file

@ -1,8 +1,5 @@
#include <apitest.h> #include "precomp.h"
#include <wingdi.h>
#include <winuser.h>
START_TEST(DestroyCursorIcon) START_TEST(DestroyCursorIcon)
{ {
@ -51,4 +48,4 @@ START_TEST(DestroyCursorIcon)
/* clean up */ /* clean up */
DeleteObject(iconinfo.hbmMask); DeleteObject(iconinfo.hbmMask);
DeleteObject(iconinfo.hbmColor); DeleteObject(iconinfo.hbmColor);
} }

View file

@ -1,8 +1,5 @@
#include <apitest.h> #include "precomp.h"
#include <wingdi.h>
#include <winuser.h>
START_TEST(DrawIconEx) START_TEST(DrawIconEx)
{ {
@ -55,4 +52,4 @@ START_TEST(DrawIconEx)
hbmp = SelectObject(hdc, hbmp); hbmp = SelectObject(hdc, hbmp);
DeleteObject(hbmp); DeleteObject(hbmp);
DeleteDC(hdc); DeleteDC(hdc);
} }

View file

@ -5,13 +5,7 @@
* PROGRAMMERS: Giannis Adamopoulos * PROGRAMMERS: Giannis Adamopoulos
*/ */
#include <apitest.h> #include "precomp.h"
#include <wingdi.h>
#include <winuser.h>
#include <msgtrace.h>
#include <user32testhelpers.h>
HWND hWnd1, hWnd2; HWND hWnd1, hWnd2;

View file

@ -1,7 +1,5 @@
#include <apitest.h>
#include <wingdi.h> #include "precomp.h"
#include <winuser.h>
#define SIZEOF_DEVMODEW_300_W 188 #define SIZEOF_DEVMODEW_300_W 188
#define SIZEOF_DEVMODEW_400_W 212 #define SIZEOF_DEVMODEW_400_W 212

View file

@ -5,9 +5,7 @@
* PROGRAMMERS: Timo Kreuzer * PROGRAMMERS: Timo Kreuzer
*/ */
#include <stdio.h> #include "precomp.h"
#include <wine/test.h>
#include <windows.h>
#define DCX_USESTYLE 0x00010000 #define DCX_USESTYLE 0x00010000
@ -446,4 +444,3 @@ START_TEST(GetDCEx)
Test_GetDCEx_CS_Mixed(); Test_GetDCEx_CS_Mixed();
Test_GetDCEx_CS_SwitchedStyle(); Test_GetDCEx_CS_SwitchedStyle();
} }

View file

@ -1,10 +1,5 @@
#include <apitest.h> #include "precomp.h"
#include <wingdi.h>
#include <winuser.h>
#include "resource.h"
// FIXME user32 // FIXME user32
@ -278,5 +273,3 @@ START_TEST(GetIconInfo)
/* Delete cursor */ /* Delete cursor */
DestroyCursor(hcursor); DestroyCursor(hcursor);
} }

View file

@ -5,10 +5,7 @@
* PROGRAMMERS: Giannis Adamopoulos * PROGRAMMERS: Giannis Adamopoulos
*/ */
#include <apitest.h> #include "precomp.h"
#include <winuser.h>
#include <assert.h>
HHOOK hKbdHook, hKbdLLHook; HHOOK hKbdHook, hKbdLLHook;
@ -133,4 +130,4 @@ void Test_GetKeyState()
START_TEST(GetKeyState) START_TEST(GetKeyState)
{ {
Test_GetKeyState(); Test_GetKeyState();
} }

View file

@ -5,9 +5,7 @@
* PROGRAMMERS: Thomas Faber <thomas.faber@reactos.org> * PROGRAMMERS: Thomas Faber <thomas.faber@reactos.org>
*/ */
#include <apitest.h> #include "precomp.h"
#include <winuser.h>
void Test_GetMessage(HWND hWnd) void Test_GetMessage(HWND hWnd)
{ {

View file

@ -5,10 +5,7 @@
* PROGRAMMERS: Timo Kreuzer * PROGRAMMERS: Timo Kreuzer
*/ */
#include <apitest.h> #include "precomp.h"
#include <wingdi.h>
#include <winuser.h>
void Test_GetSystemMetrics() void Test_GetSystemMetrics()
{ {
@ -408,4 +405,3 @@ START_TEST(GetSystemMetrics)
{ {
Test_GetSystemMetrics(); Test_GetSystemMetrics();
} }

View file

@ -5,9 +5,8 @@
* PROGRAMMERS: Thomas Faber <thomas.faber@reactos.org> * PROGRAMMERS: Thomas Faber <thomas.faber@reactos.org>
*/ */
#include <apitest.h> #include "precomp.h"
#include <wingdi.h>
#include <winuser.h>
#include <ndk/mmfuncs.h> #include <ndk/mmfuncs.h>
#include <ndk/pstypes.h> #include <ndk/pstypes.h>
#include <strsafe.h> #include <strsafe.h>
@ -465,4 +464,4 @@ START_TEST(GetUserObjectInformation)
{ {
TestGetUserObjectInfoW(); TestGetUserObjectInfoW();
TestGetUserObjectInfoA(); TestGetUserObjectInfoA();
} }

View file

@ -5,8 +5,7 @@
* PROGRAMMERS: Thomas Faber <thomas.faber@reactos.org> * PROGRAMMERS: Thomas Faber <thomas.faber@reactos.org>
*/ */
#include <apitest.h> #include "precomp.h"
#include <winuser.h>
#define ALIGN_DOWN_BY(size, align) \ #define ALIGN_DOWN_BY(size, align) \
((ULONG_PTR)(size) & ~((ULONG_PTR)(align) - 1)) ((ULONG_PTR)(size) & ~((ULONG_PTR)(align) - 1))

View file

@ -5,9 +5,7 @@
* PROGRAMMERS: Magnus Olsen * PROGRAMMERS: Magnus Olsen
*/ */
#include <apitest.h> #include "precomp.h"
#include <winuser.h>
typedef struct _LPK_LPEDITCONTROL_LIST typedef struct _LPK_LPEDITCONTROL_LIST
{ {
@ -106,4 +104,3 @@ START_TEST(InitializeLpkHooks)
{ {
Test_InitializeLpkHooks(); Test_InitializeLpkHooks();
} }

View file

@ -1,9 +1,5 @@
#include <apitest.h> #include "precomp.h"
#include <stdio.h>
#include <wingdi.h>
#include <winuser.h>
START_TEST(LoadImage) START_TEST(LoadImage)
{ {

View file

@ -1,10 +1,5 @@
#include <apitest.h> #include "precomp.h"
#include <wingdi.h>
#include <winuser.h>
#include "resource.h"
START_TEST(LookupIconIdFromDirectoryEx) START_TEST(LookupIconIdFromDirectoryEx)
{ {
@ -129,4 +124,4 @@ START_TEST(LookupIconIdFromDirectoryEx)
ok(ChangeDisplaySettingsExW(NULL, &dm, NULL, 0, NULL) == DISP_CHANGE_SUCCESSFUL, "\n"); ok(ChangeDisplaySettingsExW(NULL, &dm, NULL, 0, NULL) == DISP_CHANGE_SUCCESSFUL, "\n");
FreeResource(hMem); FreeResource(hMem);
} }

View file

@ -5,12 +5,8 @@
* PROGRAMMERS: Katayama Hirofumi MZ * PROGRAMMERS: Katayama Hirofumi MZ
*/ */
#include <stdarg.h> #include "precomp.h"
#include <stdio.h>
#include <apitest.h>
#include <wingdi.h>
#include <winuser.h>
#include <windowsx.h> #include <windowsx.h>
#include <dlgs.h> #include <dlgs.h>

View file

@ -5,10 +5,7 @@
* PROGRAMMERS: Gregor Gullwi * PROGRAMMERS: Gregor Gullwi
*/ */
#include <apitest.h> #include "precomp.h"
#include <stdio.h>
#include <winuser.h>
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) #define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
@ -189,4 +186,3 @@ START_TEST(RealGetWindowClass)
Test_ClassAtoms(); Test_ClassAtoms();
Test_RealGetWindowClass(); Test_RealGetWindowClass();
} }

View file

@ -5,14 +5,7 @@
* PROGRAMMERS: Giannis Adamopoulos * PROGRAMMERS: Giannis Adamopoulos
*/ */
#include <apitest.h> #include "precomp.h"
#define WIN32_NO_STATUS
#include <ndk/rtlfuncs.h>
#include <wchar.h>
#include <wingdi.h>
#include <winuser.h>
#include <undocuser.h>
static ATOM _RegisterClass(LPCWSTR lpwszClassName, HINSTANCE hInstance, UINT style, WNDPROC lpfnWndProc) static ATOM _RegisterClass(LPCWSTR lpwszClassName, HINSTANCE hInstance, UINT style, WNDPROC lpfnWndProc)
{ {

View file

@ -5,12 +5,7 @@
* PROGRAMMERS: Thomas Faber <thomas.faber@reactos.org> * PROGRAMMERS: Thomas Faber <thomas.faber@reactos.org>
*/ */
#include <apitest.h> #include "precomp.h"
#include <winuser.h>
#include <shlobj.h>
#include <undocshell.h>
#include <undocuser.h>
#define msg_hotkey(msg, id, mod, vk) do \ #define msg_hotkey(msg, id, mod, vk) do \
{ \ { \

View file

@ -5,10 +5,7 @@
* PROGRAMMERS: Timo Kreuzer * PROGRAMMERS: Timo Kreuzer
*/ */
#include <apitest.h> #include "precomp.h"
#include <wingdi.h>
#include <winuser.h>
void Test_ScrollDC() void Test_ScrollDC()
{ {
@ -75,4 +72,3 @@ START_TEST(ScrollDC)
{ {
Test_ScrollDC(); Test_ScrollDC();
} }

View file

@ -5,10 +5,7 @@
* PROGRAMMERS: Timo Kreuzer * PROGRAMMERS: Timo Kreuzer
*/ */
#include <apitest.h> #include "precomp.h"
#include <wingdi.h>
#include <winuser.h>
void Test_ScrollWindowEx() void Test_ScrollWindowEx()
{ {
@ -61,4 +58,3 @@ START_TEST(ScrollWindowEx)
{ {
Test_ScrollWindowEx(); Test_ScrollWindowEx();
} }

View file

@ -5,11 +5,7 @@
* PROGRAMMERS: Thomas Faber <thomas.faber@reactos.org> * PROGRAMMERS: Thomas Faber <thomas.faber@reactos.org>
*/ */
#include <apitest.h> #include "precomp.h"
#include <winuser.h>
#include <msgtrace.h>
#include <user32testhelpers.h>
static DWORD dwThread1; static DWORD dwThread1;
static DWORD dwThread2; static DWORD dwThread2;

View file

@ -5,14 +5,7 @@
* PROGRAMMERS: Giannis Adamopoulos * PROGRAMMERS: Giannis Adamopoulos
*/ */
#include <apitest.h> #include "precomp.h"
#include <wingdi.h>
#include <winuser.h>
#include <undocuser.h>
#include <msgtrace.h>
#include <user32testhelpers.h>
HWND hWnd1, hWnd2; HWND hWnd1, hWnd2;

View file

@ -5,11 +5,7 @@
* PROGRAMMERS: Giannis Adamopoulos * PROGRAMMERS: Giannis Adamopoulos
*/ */
#include <apitest.h> #include "precomp.h"
#include <wingdi.h>
#include <winuser.h>
#include <assert.h>
HHOOK hMouseHookLL, hMouseHook; HHOOK hMouseHookLL, hMouseHook;

View file

@ -5,11 +5,7 @@
* PROGRAMMERS: Thomas Faber <thomas.faber@reactos.org> * PROGRAMMERS: Thomas Faber <thomas.faber@reactos.org>
*/ */
#include <apitest.h> #include "precomp.h"
#include <winuser.h>
#include <msgtrace.h>
#include <user32testhelpers.h>
static HWND hWndList[5 + 1]; static HWND hWndList[5 + 1];
static const int hWndCount = sizeof(hWndList) / sizeof(hWndList[0]) - 1; static const int hWndCount = sizeof(hWndList) / sizeof(hWndList[0]) - 1;

View file

@ -5,9 +5,7 @@
* PROGRAMMERS: Thomas Faber <thomas.faber@reactos.org> * PROGRAMMERS: Thomas Faber <thomas.faber@reactos.org>
*/ */
#include <apitest.h> #include "precomp.h"
#include <winuser.h>
#include <user32testhelpers.h>
static ATOM Atom1, Atom2, Atom3; static ATOM Atom1, Atom2, Atom3;

View file

@ -5,10 +5,7 @@
* PROGRAMMERS: Thomas Faber <thomas.faber@reactos.org> * PROGRAMMERS: Thomas Faber <thomas.faber@reactos.org>
*/ */
#include <apitest.h> #include "precomp.h"
#include <wingdi.h>
#include <winuser.h>
START_TEST(SetScrollInfo) START_TEST(SetScrollInfo)
{ {

View file

@ -5,10 +5,7 @@
* PROGRAMMERS: Thomas Faber <thomas.faber@reactos.org> * PROGRAMMERS: Thomas Faber <thomas.faber@reactos.org>
*/ */
#include <apitest.h> #include "precomp.h"
#include <wingdi.h>
#include <winuser.h>
START_TEST(SetScrollRange) START_TEST(SetScrollRange)
{ {

View file

@ -5,14 +5,7 @@
* PROGRAMMERS: Giannis Adamopoulos * PROGRAMMERS: Giannis Adamopoulos
*/ */
#include <apitest.h> #include "precomp.h"
#include <wingdi.h>
#include <winuser.h>
#include <undocuser.h>
#include <msgtrace.h>
#include <user32testhelpers.h>
HWND hWnd1, hWnd2; HWND hWnd1, hWnd2;
@ -193,4 +186,4 @@ START_TEST(SystemParametersInfo)
DestroyWindow(hWnd1); DestroyWindow(hWnd1);
DestroyWindow(hWnd2); DestroyWindow(hWnd2);
UnregisterClassW(L"sysparamstest", 0); UnregisterClassW(L"sysparamstest", 0);
} }

View file

@ -5,13 +5,7 @@
* PROGRAMMERS: Giannis Adamopoulos * PROGRAMMERS: Giannis Adamopoulos
*/ */
#include <apitest.h> #include "precomp.h"
#include <wingdi.h>
#include <winuser.h>
#include <undocuser.h>
#include <msgtrace.h>
#include <user32testhelpers.h>
HWND hWnd1, hWnd2, hWnd3; HWND hWnd1, hWnd2, hWnd3;
HHOOK hMouseHookLL, hMouseHook; HHOOK hMouseHookLL, hMouseHook;

View file

@ -5,10 +5,7 @@
* PROGRAMMERS: * PROGRAMMERS:
*/ */
#include <apitest.h> #include "precomp.h"
#include <wingdi.h>
#include <winuser.h>
/* Used wine Redraw test for proof in principle. */ /* Used wine Redraw test for proof in principle. */

View file

@ -6,18 +6,10 @@
* Thomas Faber * Thomas Faber
*/ */
#define WIN32_NO_STATUS #include "precomp.h"
#include <apitest.h>
#include <stdio.h>
#include <wingdi.h>
#include <winuser.h>
#include <user32testhelpers.h>
#include <ndk/umtypes.h>
#include <ndk/obfuncs.h> #include <ndk/obfuncs.h>
#define DESKTOP_ALL_ACCESS 0x01ff
struct test_info { struct test_info {
WCHAR* ExpectedWinsta; WCHAR* ExpectedWinsta;
WCHAR* ExpectedDesktp; WCHAR* ExpectedDesktp;

View file

@ -0,0 +1,18 @@
#ifndef _USER32_APITEST_PRECOMP_H_
#define _USER32_APITEST_PRECOMP_H_
#define WIN32_NO_STATUS
#include <assert.h>
#include <stdio.h>
#include <apitest.h>
#include <wingdi.h>
#include <winuser.h>
#include <msgtrace.h>
#include <user32testhelpers.h>
#include <undocuser.h>
#include "resource.h"
#define DESKTOP_ALL_ACCESS 0x01ff
#endif /* _USER32_APITEST_PRECOMP_H_ */