[COMCTL32_WINETEST] Add a PCH.
authorAmine Khaldi <amine.khaldi@reactos.org>
Sun, 17 Dec 2017 12:40:43 +0000 (13:40 +0100)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sun, 17 Dec 2017 12:40:43 +0000 (13:40 +0100)
30 files changed:
modules/rostests/winetests/comctl32/CMakeLists.txt
modules/rostests/winetests/comctl32/animate.c
modules/rostests/winetests/comctl32/button.c
modules/rostests/winetests/comctl32/comboex.c
modules/rostests/winetests/comctl32/datetime.c
modules/rostests/winetests/comctl32/dpa.c
modules/rostests/winetests/comctl32/header.c
modules/rostests/winetests/comctl32/imagelist.c
modules/rostests/winetests/comctl32/ipaddress.c
modules/rostests/winetests/comctl32/listview.c
modules/rostests/winetests/comctl32/misc.c
modules/rostests/winetests/comctl32/monthcal.c
modules/rostests/winetests/comctl32/mru.c
modules/rostests/winetests/comctl32/msg.h
modules/rostests/winetests/comctl32/pager.c
modules/rostests/winetests/comctl32/precomp.h [new file with mode: 0644]
modules/rostests/winetests/comctl32/progress.c
modules/rostests/winetests/comctl32/propsheet.c
modules/rostests/winetests/comctl32/rebar.c
modules/rostests/winetests/comctl32/status.c
modules/rostests/winetests/comctl32/subclass.c
modules/rostests/winetests/comctl32/syslink.c
modules/rostests/winetests/comctl32/tab.c
modules/rostests/winetests/comctl32/taskdialog.c
modules/rostests/winetests/comctl32/toolbar.c
modules/rostests/winetests/comctl32/tooltips.c
modules/rostests/winetests/comctl32/trackbar.c
modules/rostests/winetests/comctl32/treeview.c
modules/rostests/winetests/comctl32/updown.c
modules/rostests/winetests/comctl32/v6util.h

index b1798c3..f72f87a 100644 (file)
@@ -5,7 +5,6 @@ add_definitions(-DUSE_WINE_TODOS)
 
 list(APPEND SOURCE
     animate.c
-    button.c
     comboex.c
     datetime.c
     dpa.c
@@ -21,7 +20,6 @@ list(APPEND SOURCE
     propsheet.c
     rebar.c
     status.c
-    subclass.c
     syslink.c
     tab.c
     taskdialog.c
@@ -30,9 +28,14 @@ list(APPEND SOURCE
     trackbar.c
     treeview.c
     updown.c
-    testlist.c)
+    precomp.h)
 
-add_executable(comctl32_winetest ${SOURCE} rsrc.rc)
+add_executable(comctl32_winetest
+    ${SOURCE}
+    button.c
+    subclass.c
+    testlist.c
+    rsrc.rc)
 
 if(USE_CLANG_CL OR (NOT MSVC))
     add_target_compile_flags(comctl32_winetest "-Wno-format")
@@ -40,4 +43,5 @@ endif()
 
 set_module_type(comctl32_winetest win32cui)
 add_importlibs(comctl32_winetest comctl32 ole32 user32 gdi32 advapi32 msvcrt kernel32)
+add_pch(comctl32_winetest precomp.h SOURCE)
 add_rostests_file(TARGET comctl32_winetest)
index 28cf55b..9324acd 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <stdarg.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "commctrl.h"
-
-#include "wine/test.h"
+#include "precomp.h"
 
 #define SEARCHING_AVI_INDEX 151 /* From shell32 resource library */
 #define INVALID_AVI_INDEX 0xffff
index 8cb5b5f..ccc052b 100644 (file)
 
 #undef USE_WINE_TODOS
 
-//#include <windows.h>
-#include <stdarg.h>
-#include <windef.h>
-#include <winbase.h>
+#include "wine/test.h"
+
+#include <assert.h>
 #include <wingdi.h>
 #include <winuser.h>
 #include <commctrl.h>
 
-#include "wine/test.h"
 #include "v6util.h"
 #include "msg.h"
 
index ec13e22..947a871 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <assert.h>
-//#include <windows.h>
-#include <stdarg.h>
-#include <windef.h>
-#include <winbase.h>
-#include <winuser.h>
-#include <commctrl.h>
-
-//#include "wine/test.h"
-#include "msg.h"
+#include "precomp.h"
 
 #define EDITBOX_SEQ_INDEX  0
 #define NUM_MSG_SEQUENCES  1
index fcd7bee..19ee52b 100644 (file)
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 */
 
-//#include <windows.h>
-#include <stdarg.h>
-#include <windef.h>
-#include <winbase.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <winnls.h>
-#include <commctrl.h>
-//#include "wine/test.h"
-#include "msg.h"
+#include "precomp.h"
 
 #define expect(EXPECTED, GOT) ok((GOT)==(EXPECTED), "Expected %d, got %ld\n", (EXPECTED), (GOT))
 
index 291fb98..b722145 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-
-#include <stdarg.h>
-
-#include <windef.h>
-#include <winbase.h>
-#include <winuser.h>
-#include <commctrl.h>
-#include <objbase.h>
-//#include "objidl.h"
-
-#include <wine/test.h>
+#include "precomp.h"
 
 #define expect(expected, got) ok(got == expected, "Expected %d, got %d\n", expected, got)
 
index 8be4db2..f428349 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-//#include <windows.h>
-#include <stdarg.h>
-#include <windef.h>
-#include <winbase.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <winnls.h>
-#include <objbase.h>
-#include <commctrl.h>
-#include <assert.h>
-
-#include <wine/test.h>
-#include "v6util.h"
-#include "msg.h"
+#include "precomp.h"
 
 typedef struct tagEXPECTEDNOTIFY
 {
index 5d2cf3c..57e7f5c 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
+#include "precomp.h"
 
-#define COBJMACROS
-#define CONST_VTABLE
-
-//#include <stdarg.h>
-#include <stdio.h>
-
-#include <windef.h>
-#include <winbase.h>
-#include <wingdi.h>
-#include <objbase.h>
-#include <commctrl.h> /* must be included after objbase.h to get ImageList_Write */
 #include <ole2.h>
-#include <initguid.h>
-#include <commoncontrols.h>
 #include <shellapi.h>
 
-#include <wine/test.h>
-#include "v6util.h"
+#include <initguid.h>
+#include <commoncontrols.h>
 
 #define IMAGELIST_MAGIC (('L' << 8) | 'I')
 
index 22bd1d0..f507566 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <wine/test.h>
-
-//#include <windows.h>
-#include <winuser.h>
-#include <commctrl.h>
+#include "precomp.h"
 
 #define expect(expected, got) ok(expected == got, "expected %d, got %d\n", expected,got)
 
index ba3700f..2210fb3 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <wine/test.h>
-
-//#include <stdio.h>
-//#include <windows.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <commctrl.h>
-
-#include "v6util.h"
-#include "msg.h"
+#include "precomp.h"
 
 enum seq_index {
     PARENT_SEQ_INDEX,
index 89fc5f7..9fe3ae3 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-//#include <stdio.h>
-//#include <windows.h>
-
-#include <wine/test.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <commctrl.h>
-#include "v6util.h"
+#include "precomp.h"
 
 static PVOID (WINAPI * pAlloc)(LONG);
 static PVOID (WINAPI * pReAlloc)(PVOID, LONG);
index 1ca593e..84ba54a 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <wine/test.h>
-
-//#include <stdarg.h>
-
-//#include "windef.h"
-//#include "winbase.h"
-#include <winuser.h>
-#include <wingdi.h>
-#include <winnls.h>
-#include <commctrl.h>
-
-#include "v6util.h"
-//#include <assert.h>
-//#include <windows.h>
-#include "msg.h"
+#include "precomp.h"
 
 #define expect(expected, got) ok(expected == got, "Expected %d, got %d\n", expected, got);
 #define expect_hex(expected, got) ok(expected == got, "Expected %x, got %x\n", expected, got);
index 5c0ec48..1cb9a99 100644 (file)
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
-#include <stdarg.h>
-
-#include <windef.h>
-#include <winbase.h>
-//#include "wingdi.h"
-#include <winuser.h>
-//#include "winnls.h"
-#include <winreg.h>
-#include <commctrl.h>
-//#include "shlwapi.h"
-
-#include <wine/test.h>
+
+#include "precomp.h"
 
 /* Keys for testing MRU functions */
 #define REG_TEST_BASEKEYA    "Software\\Wine"
index 36327d1..fe9969d 100644 (file)
@@ -18,9 +18,7 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <assert.h>
-//#include <windows.h>
-#include <wine/test.h>
+#pragma once
 
 /* undocumented SWP flags - from SDK 3.1 */
 #define SWP_NOCLIENTSIZE       0x0800
@@ -164,7 +162,7 @@ static void dump_sequence( struct msg_sequence **seq, int sequence_index,
     }
 }
 
-static void ok_sequence_(struct msg_sequence **seq, int sequence_index,
+static inline void ok_sequence_(struct msg_sequence **seq, int sequence_index,
     const struct message *expected, const char *context, BOOL todo,
     const char *file, int line)
 {
@@ -387,7 +385,7 @@ done:
         ok_sequence_(seq, index, (exp), (contx), (todo), __FILE__, __LINE__)
 
 
-static void init_msg_sequences(struct msg_sequence **seq, int n)
+static inline void init_msg_sequences(struct msg_sequence **seq, int n)
 {
     int i;
 
index 4eb48be..4766656 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <wine/test.h>
-
-//#include <windows.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <commctrl.h>
-
-#include "msg.h"
+#include "precomp.h"
 
 #define NUM_MSG_SEQUENCES   1
 #define PAGER_SEQ_INDEX     0
diff --git a/modules/rostests/winetests/comctl32/precomp.h b/modules/rostests/winetests/comctl32/precomp.h
new file mode 100644 (file)
index 0000000..92352b7
--- /dev/null
@@ -0,0 +1,25 @@
+#ifndef _COMCTL32_WINETEST_PRECOMP_H_
+#define _COMCTL32_WINETEST_PRECOMP_H_
+
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+#define COBJMACROS
+#define CONST_VTABLE
+
+#include <stdio.h>
+
+#include <wine/test.h>
+#include <assert.h>
+#include <wingdi.h>
+#include <winuser.h>
+#include <winnls.h>
+#include <winreg.h>
+#include <objbase.h>
+#include <wine/commctrl.h>
+
+#include "msg.h"
+#include "resources.h"
+#include "v6util.h"
+
+#endif /* !_COMCTL32_WINETEST_PRECOMP_H_ */
index 7f69c35..506fee0 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <stdarg.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "commctrl.h" 
-
-#include "wine/test.h"
-
+#include "precomp.h"
 
 static HWND hProgressParentWnd, hProgressWnd;
 static const char progressTestClass[] = "ProgressBarTestClass";
index 76e706a..fd9f997 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <wine/test.h>
+#include "precomp.h"
 
-//#include <windows.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <commctrl.h>
 #include <reactos/undocuser.h>
-#include "msg.h"
-
-#include "resources.h"
 
 static HWND parenthwnd;
 static HWND sheethwnd;
index 16030e3..5aa3a1e 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-/* make sure the structures work with a comctl32 v5.x */
-#define _WIN32_WINNT 0x500
-#define _WIN32_IE 0x500
-
-#include <wine/test.h>
-
-#include <assert.h>
-//#include <stdarg.h>
-
-//#include <windows.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <commctrl.h>
-//#include <uxtheme.h>
+#include "precomp.h"
 
 static RECT height_change_notify_rect;
 static HWND hMainWnd;
index 6db6bf5..94345e1 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <wine/test.h>
-
-//#include <windows.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <commctrl.h>
+#include "precomp.h"
 
 #define SUBCLASS_NAME "MyStatusBar"
 
index 720c68e..7333c65 100644 (file)
 
 #define _WIN32_WINNT 0x0501 /* For SetWindowSubclass/etc */
 
+#include "wine/test.h"
+
 #include <assert.h>
-#include <stdarg.h>
 
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
 #include "winuser.h"
 #include "commctrl.h"
 
-#include "wine/test.h"
-
 static BOOL (WINAPI *pSetWindowSubclass)(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR);
 static BOOL (WINAPI *pRemoveWindowSubclass)(HWND, SUBCLASSPROC, UINT_PTR);
 static LRESULT (WINAPI *pDefSubclassProc)(HWND, UINT, WPARAM, LPARAM);
index 9f7233f..028e7a6 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <wine/test.h>
-
-//#include <windows.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <commctrl.h>
-
-#include "v6util.h"
-#include "msg.h"
+#include "precomp.h"
 
 #define expect(expected, got) ok(got == expected, "Expected %d, got %d\n", expected, got)
 #define NUM_MSG_SEQUENCE 2
index 431a49d..99f4bc3 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <wine/test.h>
-
-#include <assert.h>
-//#include <windows.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <commctrl.h>
-#include <stdio.h>
-
-#include "msg.h"
+#include "precomp.h"
 
 #define DEFAULT_MIN_TAB_WIDTH 54
 #define TAB_PADDING_X 6
index c937127..40ca163 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <stdarg.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "winuser.h"
-#include "commctrl.h"
-
-#include "wine/test.h"
-#include "v6util.h"
+#include "precomp.h"
 
 static HRESULT (WINAPI *pTaskDialogIndirect)(const TASKDIALOGCONFIG *, int *, int *, BOOL *);
 static HRESULT (WINAPI *pTaskDialog)(HWND, HINSTANCE, const WCHAR *, const WCHAR *, const WCHAR *,
index e2c29f4..f49cd2a 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <stdarg.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "winnls.h"
-#include "winreg.h"
-#include "commctrl.h" 
-
-#include "resources.h"
-
-#include "wine/test.h"
-
-#include "msg.h"
+#include "precomp.h"
 
 #define PARENT_SEQ_INDEX       0
 #define NUM_MSG_SEQUENCES      1
index 06b49e3..2cc0210 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <wine/test.h>
-
-#include <assert.h>
-//#include <windows.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <winnls.h>
-#include <commctrl.h>
-
-#include "resources.h"
+#include "precomp.h"
 
 #define expect(expected, got) ok(got == expected, "Expected %d, got %d\n", expected, got)
 
index 0bbe97c..9a02800 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <wine/test.h>
-
-//#include <windows.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <commctrl.h>
-#include <stdio.h>
-
-#include "msg.h"
+#include "precomp.h"
 
 #define expect(expected, got) ok(got == expected, "Expected %d, got %d\n", expected, got)
 #define NUM_MSG_SEQUENCE 2
index 83ba492..e14c336 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <stdarg.h>
-#include <stdio.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "winnls.h"
-#include "winreg.h"
-#include "wine/commctrl.h"
-
-#include "wine/test.h"
-#include "v6util.h"
-#include "msg.h"
+#include "precomp.h"
 
 static const char *TEST_CALLBACK_TEXT = "callback_text";
 
index fb5ade4..e3dde91 100644 (file)
  *   - more stuff to test
  */
 
-#include <wine/test.h>
-
-//#include <windows.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <commctrl.h>
-#include <stdio.h>
-
-#include "msg.h"
+#include "precomp.h"
 
 #define expect(EXPECTED,GOT) ok((GOT)==(EXPECTED), "Expected %d, got %d\n", (EXPECTED), (GOT))
 
index 9f5a9c4..0247df6 100644 (file)
@@ -20,6 +20,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+#pragma once
+
 #define expect(expected, got) ok(got == expected, "Expected %d, got %d\n", expected, got)
 
 #ifdef __i386__
@@ -60,7 +62,7 @@ static const CHAR manifest[] =
     "</dependency>\n"
     "</assembly>\n";
 
-static void unload_v6_module(ULONG_PTR cookie, HANDLE hCtx)
+static inline void unload_v6_module(ULONG_PTR cookie, HANDLE hCtx)
 {
     HANDLE hKernel32;
     BOOL (WINAPI *pDeactivateActCtx)(DWORD, ULONG_PTR);
@@ -81,7 +83,7 @@ static void unload_v6_module(ULONG_PTR cookie, HANDLE hCtx)
     DeleteFileA(manifest_name);
 }
 
-static BOOL load_v6_module(ULONG_PTR *pcookie, HANDLE *hCtx)
+static inline BOOL load_v6_module(ULONG_PTR *pcookie, HANDLE *hCtx)
 {
     HANDLE hKernel32;
     HANDLE (WINAPI *pCreateActCtxA)(ACTCTXA*);