https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9317220c0032ef62f07af…
commit 9317220c0032ef62f07af6b6fbc671cab1133f5a
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Wed Dec 20 13:36:27 2017 +0100
[SHLWAPI_WINETEST] Add a PCH.
---
modules/rostests/winetests/shlwapi/CMakeLists.txt | 5 +++--
modules/rostests/winetests/shlwapi/assoc.c | 11 +----------
modules/rostests/winetests/shlwapi/clist.c | 13 +------------
modules/rostests/winetests/shlwapi/clsid.c | 18 +++---------------
modules/rostests/winetests/shlwapi/generated.c | 21 +--------------------
modules/rostests/winetests/shlwapi/istream.c | 17 +----------------
modules/rostests/winetests/shlwapi/ordinal.c | 23 +----------------------
modules/rostests/winetests/shlwapi/path.c | 15 +--------------
modules/rostests/winetests/shlwapi/precomp.h | 22 ++++++++++++++++++++++
modules/rostests/winetests/shlwapi/shreg.c | 15 +--------------
modules/rostests/winetests/shlwapi/string.c | 18 +-----------------
modules/rostests/winetests/shlwapi/thread.c | 19 +------------------
modules/rostests/winetests/shlwapi/url.c | 16 ++--------------
13 files changed, 39 insertions(+), 174 deletions(-)
diff --git a/modules/rostests/winetests/shlwapi/CMakeLists.txt
b/modules/rostests/winetests/shlwapi/CMakeLists.txt
index dfd73e607c..f46f22d70e 100644
--- a/modules/rostests/winetests/shlwapi/CMakeLists.txt
+++ b/modules/rostests/winetests/shlwapi/CMakeLists.txt
@@ -15,9 +15,9 @@ list(APPEND SOURCE
string.c
thread.c
url.c
- testlist.c)
+ precomp.h)
-add_executable(shlwapi_winetest ${SOURCE})
+add_executable(shlwapi_winetest ${SOURCE} testlist.c)
target_link_libraries(shlwapi_winetest uuid)
set_module_type(shlwapi_winetest win32cui)
add_importlibs(shlwapi_winetest shlwapi ole32 oleaut32 user32 advapi32 msvcrt kernel32)
@@ -26,4 +26,5 @@ if(MSVC)
add_importlibs(shlwapi_winetest ntdll)
endif()
+add_pch(shlwapi_winetest precomp.h SOURCE)
add_rostests_file(TARGET shlwapi_winetest)
diff --git a/modules/rostests/winetests/shlwapi/assoc.c
b/modules/rostests/winetests/shlwapi/assoc.c
index 5e37dd6123..8915b3a7aa 100644
--- a/modules/rostests/winetests/shlwapi/assoc.c
+++ b/modules/rostests/winetests/shlwapi/assoc.c
@@ -17,16 +17,7 @@
* 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 <stdarg.h>
-
-#include <wine/test.h>
-#include <winreg.h>
-#include <shlwapi.h>
-#include <shlguid.h>
+#include "precomp.h"
#define expect(expected, got) ok( (expected) == (got), "Expected %d, got %d\n",
(expected), (got))
#define expect_hr(expected, got) ok( (expected) == (got), "Expected %08x, got
%08x\n", (expected), (got))
diff --git a/modules/rostests/winetests/shlwapi/clist.c
b/modules/rostests/winetests/shlwapi/clist.c
index e7fc4f9f59..c621ffc912 100755
--- a/modules/rostests/winetests/shlwapi/clist.c
+++ b/modules/rostests/winetests/shlwapi/clist.c
@@ -17,18 +17,7 @@
* 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 <wine/test.h>
-//#include "windef.h"
-//#include "winbase.h"
-#include <objbase.h>
+#include "precomp.h"
typedef struct tagSHLWAPI_CLIST
{
diff --git a/modules/rostests/winetests/shlwapi/clsid.c
b/modules/rostests/winetests/shlwapi/clsid.c
index afad9aeb55..c86407cab1 100755
--- a/modules/rostests/winetests/shlwapi/clsid.c
+++ b/modules/rostests/winetests/shlwapi/clsid.c
@@ -17,22 +17,10 @@
* 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 <stdio.h>
-
-#include <wine/test.h>
-//#include "winbase.h"
-//#include "winerror.h"
-//#include "winnls.h"
-//#include "winuser.h"
-#include <objbase.h>
-#include <initguid.h>
-#include <shlguid.h>
-#include <shobjidl.h>
+#include "precomp.h"
+
#include <olectl.h>
+#include <initguid.h>
DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
diff --git a/modules/rostests/winetests/shlwapi/generated.c
b/modules/rostests/winetests/shlwapi/generated.c
index 44a449da8b..59fdd9fb26 100755
--- a/modules/rostests/winetests/shlwapi/generated.c
+++ b/modules/rostests/winetests/shlwapi/generated.c
@@ -5,26 +5,7 @@
* Unit tests for data structure packing
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#ifndef __REACTOS__
-#define WINVER 0x0501
-#define _WIN32_IE 0x0501
-#define _WIN32_WINNT 0x0501
-#endif
-
-#define WINE_NOWINSOCK
-
-#include <stdarg.h>
-#include <windef.h>
-#include <winbase.h>
-//#include "wtypes.h"
-#include <winreg.h>
-#include <shlwapi.h>
-
-#include <wine/test.h>
+#include "precomp.h"
/***********************************************************************
* Compatibility macros
diff --git a/modules/rostests/winetests/shlwapi/istream.c
b/modules/rostests/winetests/shlwapi/istream.c
index 9aefb1f439..134a74c32e 100644
--- a/modules/rostests/winetests/shlwapi/istream.c
+++ b/modules/rostests/winetests/shlwapi/istream.c
@@ -17,22 +17,7 @@
* 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 <stdio.h>
-
-#include <wine/test.h>
-//#include "windef.h"
-//#include "winbase.h"
-#include <winnls.h>
-#include <winreg.h>
-#include <objbase.h>
-#include <shlwapi.h>
+#include "precomp.h"
static void test_IStream_invalid_operations(IStream * stream, DWORD mode)
{
diff --git a/modules/rostests/winetests/shlwapi/ordinal.c
b/modules/rostests/winetests/shlwapi/ordinal.c
index c26a716af0..3cc8856e77 100755
--- a/modules/rostests/winetests/shlwapi/ordinal.c
+++ b/modules/rostests/winetests/shlwapi/ordinal.c
@@ -17,28 +17,7 @@
* 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 <stdio.h>
-
-#define COBJMACROS
-#define CONST_VTABLE
-#include <wine/test.h>
-//#include "winbase.h"
-#include <winreg.h>
-#include <winnls.h>
-//#include "winerror.h"
-//#include "winuser.h"
-#include <ole2.h>
-//#include "oaidl.h"
-//#include "ocidl.h"
-//#include "mlang.h"
-#include <shlwapi.h>
-//#include "docobj.h"
-#include <shobjidl.h>
-//#include "shlobj.h"
+#include "precomp.h"
/* Function ptrs for ordinal calls */
static HMODULE hShlwapi;
diff --git a/modules/rostests/winetests/shlwapi/path.c
b/modules/rostests/winetests/shlwapi/path.c
index 6456e81537..d025dbf6a2 100755
--- a/modules/rostests/winetests/shlwapi/path.c
+++ b/modules/rostests/winetests/shlwapi/path.c
@@ -17,20 +17,7 @@
* 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 <stdarg.h>
-#include <stdio.h>
-
-#include <wine/test.h>
-//#include "windef.h"
-//#include "winbase.h"
-#include <winreg.h>
-#include <winnls.h>
-#include <shlwapi.h>
-#include <wininet.h>
+#include "precomp.h"
static BOOL (WINAPI *pPathIsValidCharA)(char,DWORD);
static BOOL (WINAPI *pPathIsValidCharW)(WCHAR,DWORD);
diff --git a/modules/rostests/winetests/shlwapi/precomp.h
b/modules/rostests/winetests/shlwapi/precomp.h
new file mode 100644
index 0000000000..0d6f5ba1ca
--- /dev/null
+++ b/modules/rostests/winetests/shlwapi/precomp.h
@@ -0,0 +1,22 @@
+#ifndef _SHLWAPI_WINETEST_PRECOMP_H_
+#define _SHLWAPI_WINETEST_PRECOMP_H_
+
+#include <stdio.h>
+
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+#define COBJMACROS
+#define CONST_VTABLE
+
+#include <wine/test.h>
+
+#include <winnls.h>
+#include <winreg.h>
+#include <shlwapi.h>
+#include <shlguid.h>
+#include <shobjidl.h>
+#include <ole2.h>
+#include <wininet.h>
+
+#endif /* !_SHLWAPI_WINETEST_PRECOMP_H_ */
diff --git a/modules/rostests/winetests/shlwapi/shreg.c
b/modules/rostests/winetests/shlwapi/shreg.c
index a175e31eeb..50c62b64d9 100755
--- a/modules/rostests/winetests/shlwapi/shreg.c
+++ b/modules/rostests/winetests/shlwapi/shreg.c
@@ -17,20 +17,7 @@
* 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 <stdarg.h>
-//#include <stdio.h>
-
-#include <wine/test.h>
-//#include "windef.h"
-//#include "winbase.h"
-//#include "winerror.h"
-#include <winreg.h>
-//#include "winuser.h"
-#include <shlwapi.h>
+#include "precomp.h"
/* Keys used for testing */
#define REG_TEST_KEY "Software\\Wine\\Test"
diff --git a/modules/rostests/winetests/shlwapi/string.c
b/modules/rostests/winetests/shlwapi/string.c
index 1d8a6af1be..d12d82055b 100755
--- a/modules/rostests/winetests/shlwapi/string.c
+++ b/modules/rostests/winetests/shlwapi/string.c
@@ -17,23 +17,7 @@
* 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 <stdio.h>
-
-#include <wine/test.h>
-//#include "winbase.h"
-//#include "winerror.h"
-#include <winnls.h>
-#include <ole2.h>
-#define NO_SHLWAPI_REG
-#define NO_SHLWAPI_PATH
-#define NO_SHLWAPI_GDI
-#define NO_SHLWAPI_STREAM
-#include <shlwapi.h>
-//#include "shtypes.h"
+#include "precomp.h"
#define expect_eq(expr, val, type, fmt) do { \
type ret = expr; \
diff --git a/modules/rostests/winetests/shlwapi/thread.c
b/modules/rostests/winetests/shlwapi/thread.c
index 28b4ccd59a..17ff7a73ed 100644
--- a/modules/rostests/winetests/shlwapi/thread.c
+++ b/modules/rostests/winetests/shlwapi/thread.c
@@ -17,24 +17,7 @@
* 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 <stdio.h>
-#include <stdarg.h>
-
-#define COBJMACROS
-#define CONST_VTABLE
-
-#include <windef.h>
-#include <winbase.h>
-//#include "winreg.h"
-//#include "winerror.h"
-#include <ole2.h>
-//#include "shlwapi.h"
-
-#include <wine/test.h>
+#include "precomp.h"
static HRESULT (WINAPI *pSHCreateThreadRef)(LONG*, IUnknown**);
static HRESULT (WINAPI *pSHGetThreadRef)(IUnknown**);
diff --git a/modules/rostests/winetests/shlwapi/url.c
b/modules/rostests/winetests/shlwapi/url.c
index f3756e42df..1e7679f339 100644
--- a/modules/rostests/winetests/shlwapi/url.c
+++ b/modules/rostests/winetests/shlwapi/url.c
@@ -18,20 +18,8 @@
* 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 <stdarg.h>
-//#include <stdio.h>
-
-#include <wine/test.h>
-//#include "windef.h"
-//#include "winbase.h"
-#include <winreg.h>
-#include <winnls.h>
-#include <shlwapi.h>
-#include <wininet.h>
+#include "precomp.h"
+
#include <intshcut.h>
/* ################ */