https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0622ce1775a1a2fc45a6b…
commit 0622ce1775a1a2fc45a6b5bebf1a1ce22a68eb7d
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Sun Dec 17 12:28:41 2017 +0100
[COMDLG32_WINETEST] Add a PCH.
---
modules/rostests/winetests/comdlg32/CMakeLists.txt | 9 +++++++--
modules/rostests/winetests/comdlg32/filedlg.c | 16 +---------------
modules/rostests/winetests/comdlg32/finddlg.c | 11 +----------
modules/rostests/winetests/comdlg32/fontdlg.c | 14 +-------------
modules/rostests/winetests/comdlg32/itemdlg.c | 10 ++--------
modules/rostests/winetests/comdlg32/precomp.h | 18 ++++++++++++++++++
modules/rostests/winetests/comdlg32/printdlg.c | 20 +-------------------
7 files changed, 31 insertions(+), 67 deletions(-)
diff --git a/modules/rostests/winetests/comdlg32/CMakeLists.txt
b/modules/rostests/winetests/comdlg32/CMakeLists.txt
index b61e43056c..11afc77f49 100644
--- a/modules/rostests/winetests/comdlg32/CMakeLists.txt
+++ b/modules/rostests/winetests/comdlg32/CMakeLists.txt
@@ -7,10 +7,15 @@ list(APPEND SOURCE
fontdlg.c
itemdlg.c
printdlg.c
- testlist.c)
+ precomp.h)
+
+add_executable(comdlg32_winetest
+ ${SOURCE}
+ testlist.c
+ rsrc.rc)
-add_executable(comdlg32_winetest ${SOURCE} rsrc.rc)
target_link_libraries(comdlg32_winetest uuid)
set_module_type(comdlg32_winetest win32cui)
add_importlibs(comdlg32_winetest comdlg32 winspool user32 gdi32 ole32 shell32 msvcrt
kernel32)
+add_pch(comdlg32_winetest precomp.h SOURCE)
add_rostests_file(TARGET comdlg32_winetest)
diff --git a/modules/rostests/winetests/comdlg32/filedlg.c
b/modules/rostests/winetests/comdlg32/filedlg.c
index e779cd5536..514f2513a2 100644
--- a/modules/rostests/winetests/comdlg32/filedlg.c
+++ b/modules/rostests/winetests/comdlg32/filedlg.c
@@ -19,24 +19,10 @@
*
*/
-//#include <windows.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#include <wine/test.h>
-
-#include <wingdi.h>
-#include <objbase.h>
-#include <cderr.h>
-#include <dlgs.h>
-#include <commdlg.h>
+#include "precomp.h"
#include <shlguid.h>
-#define COBJMACROS
#include <shobjidl.h>
-
#include <ole2.h>
#include <reactos/undocuser.h>
diff --git a/modules/rostests/winetests/comdlg32/finddlg.c
b/modules/rostests/winetests/comdlg32/finddlg.c
index 5445d65e5e..99c9eb1e22 100644
--- a/modules/rostests/winetests/comdlg32/finddlg.c
+++ b/modules/rostests/winetests/comdlg32/finddlg.c
@@ -19,16 +19,7 @@
*
*/
-//#include "windows.h"
-
-#define WIN32_NO_STATUS
-
-#include <wine/test.h>
-
-#include <wingdi.h>
-#include <winuser.h>
-#include <cderr.h>
-#include <commdlg.h>
+#include "precomp.h"
static UINT ID_FINDMSGSTRING;
diff --git a/modules/rostests/winetests/comdlg32/fontdlg.c
b/modules/rostests/winetests/comdlg32/fontdlg.c
index 6b59d7ba45..4a17bbcb1d 100644
--- a/modules/rostests/winetests/comdlg32/fontdlg.c
+++ b/modules/rostests/winetests/comdlg32/fontdlg.c
@@ -19,21 +19,9 @@
*
*/
-#define WIN32_NO_STATUS
+#include "precomp.h"
-#include <wine/test.h>
-
-//#include <stdarg.h>
-
-//#include "windef.h"
-//#include "winbase.h"
-//#include "winerror.h"
-#include <wingdi.h>
#include <winspool.h>
-#include <winuser.h>
-//#include "objbase.h"
-
-#include <commdlg.h>
static int get_dpiy(void)
{
diff --git a/modules/rostests/winetests/comdlg32/itemdlg.c
b/modules/rostests/winetests/comdlg32/itemdlg.c
index e338dcb00e..f14a298de8 100644
--- a/modules/rostests/winetests/comdlg32/itemdlg.c
+++ b/modules/rostests/winetests/comdlg32/itemdlg.c
@@ -19,15 +19,9 @@
*
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#include <wine/test.h>
-
-#define COBJMACROS
-#define CONST_VTABLE
+#include "precomp.h"
+#include <wincon.h>
#include <shlobj.h>
#define IDT_CHANGEFILETYPE 500
diff --git a/modules/rostests/winetests/comdlg32/precomp.h
b/modules/rostests/winetests/comdlg32/precomp.h
new file mode 100644
index 0000000000..86ad3d3cf6
--- /dev/null
+++ b/modules/rostests/winetests/comdlg32/precomp.h
@@ -0,0 +1,18 @@
+#ifndef _COMDLG32_WINETEST_PRECOMP_H_
+#define _COMDLG32_WINETEST_PRECOMP_H_
+
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+#define COBJMACROS
+#define CONST_VTABLE
+
+#include <wine/test.h>
+
+#include <wingdi.h>
+#include <objbase.h>
+#include <cderr.h>
+#include <commdlg.h>
+#include <dlgs.h>
+
+#endif /* !_COMDLG32_WINETEST_PRECOMP_H_ */
diff --git a/modules/rostests/winetests/comdlg32/printdlg.c
b/modules/rostests/winetests/comdlg32/printdlg.c
index 5592b8c6c9..b2c20744ee 100644
--- a/modules/rostests/winetests/comdlg32/printdlg.c
+++ b/modules/rostests/winetests/comdlg32/printdlg.c
@@ -20,25 +20,7 @@
*
*/
-#define COBJMACROS
-#define CONST_VTABLE
-#define WIN32_NO_STATUS
-
-#include <wine/test.h>
-
-//#include <stdarg.h>
-#include <stdio.h>
-
-//#include "windef.h"
-//#include "winbase.h"
-//#include "winerror.h"
-#include <wingdi.h>
-#include <winuser.h>
-#include <objbase.h>
-
-#include <cderr.h>
-#include <commdlg.h>
-#include <dlgs.h>
+#include "precomp.h"
/* ########################### */